Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
JSON::Ext::Generator::State#[]
[](name)
ext/json/lib/json/ext/generator/state.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/ext/json/lib/json/ext/generator/state.rb, line 94
def [](name)
if respond_to?(name)
__send__(name)
else
instance_variable_get("@#{name}") if
instance_variables.include?("@#{name}".to_sym) # avoid warning
end
end
Returns the value returned by method name.