End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
OptionParser.each_const
each_const(path, base = ::Object)
lib/optparse/version.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/optparse/version.rb, line 50
def each_const(path, base = ::Object)
path.split(/::|\//).inject(base) do |klass, name|
raise NameError, path unless Module === klass
klass.constants.grep(/#{name}/i) do |c|
klass.const_defined?(c) or next
klass.const_get(c)
end
end
end
No documentation available