source "https://rubygems.org"

# Ruby moves stdlib libraries out of the interpreter in waves, and the ground
# truth for which wave a library is in is Gem::BUNDLED_GEMS::SINCE, which the
# running Ruby ships. Measured on this image (ruby:3-alpine is Ruby 3.4.10):
#   abbrev, observer, drb          => "3.4.0"  already ordinary gems
#   ostruct, benchmark, logger     => "4.0.0"  still default gems, next wave
#   set                            => absent   not scheduled at all
# So on Ruby 3.4 a missing ostruct line is NOT what breaks you; a missing drb or
# observer line is. Read the table before adding gems on advice.

# Declared for the 4.0 wave, not for a break that has already happened. The
# measurable effect today is a version swap: the interpreter ships ostruct 0.6.1
# and set 1.1.1 as default gems, and these lines put 0.6.3 and 1.1.3 in front of
# them. set never needs a require -- Ruby autoloads the constant -- and the
# autoload resolves through the bundle once the line exists.
gem "ostruct", "0.6.3"
gem "set", "1.1.3"

# abbrev is in the wave that already landed, so this line is the only reason
# `require "abbrev"` works. drb and observer are deliberately left undeclared
# so the contract can assert the LoadError you get without the line.
gem "abbrev", "0.1.2"

# minitest 5, measured. minitest 6.0.6 depends on prism ~> 1.5; this image
# already ships prism 1.5.3 as a default gem, so plain `gem install minitest -v
# 6.0.6` succeeds here. Bundler does not reuse that copy -- it resolves the
# newest prism, 1.9.0, whose C extension dies in extconf ("You have to install
# development tools first") because the alpine image has no compiler. minitest 6
# also depends on drb, which would have pulled drb into the bundle and destroyed
# the assertion this seed is built on.
gem "minitest", "5.27.0"
