lib/hash/hash_struct.rb in bblib-0.4.1 vs lib/hash/hash_struct.rb in bblib-1.0.2
- old
+ new
@@ -4,10 +4,10 @@
class HashStruct < Hash
protected
def method_missing(method, *args, &block)
- if args.empty?
+ if args.empty? && ![:to_ary].include?(method)
define_singleton_method(method) do
self[method]
end
self[method]
elsif method.to_s.end_with?('=')