lib/json/pure/generator.rb in json_pure-1.2.2 vs lib/json/pure/generator.rb in json_pure-1.2.3
- old
+ new
@@ -215,9 +215,14 @@
for iv in %w[indent space space_before object_nl array_nl check_circular allow_nan max_nesting]
result[iv.intern] = instance_variable_get("@#{iv}")
end
result
end
+
+ # Return the value returned by method +name+.
+ def [](name)
+ __send__ name
+ end
end
module GeneratorMethods
module Object
# Converts this object to a string (calling #to_s), converts