lib/map.rb in map-4.7.1 vs lib/map.rb in map-5.1.0
- old
+ new
@@ -1,7 +1,7 @@
class Map < Hash
- Version = '4.7.1' unless defined?(Version)
+ Version = '5.1.0' unless defined?(Version)
Load = Kernel.method(:load) unless defined?(Load)
class << Map
def version
Map::Version
@@ -615,10 +615,10 @@
key = args.shift.to_s.chomp('?')
self.has?( key )
else
key = method
unless has_key?(key)
- return(block ? fetch(*args, &block) : super(*args))
+ return(block ? fetch(key, &block) : super(*args))
end
self[key]
end
end