Sha256: d77ae6a4ea00be21256aa551ca83245ab49a33735e6f15b44a7ab566ff58e7c9
Contents?: true
Size: 385 Bytes
Versions: 4
Compression:
Stored size: 385 Bytes
Contents
= StaticHash A StaticHash is simply a Hash that can only be assigned once per key. Once assigned a subsequent attempt to assign a value to the same key will raise an ArgumentError. h = StaticHash.new h["x"] = 1 expect ArgumentError do h["x"] = 2 end The same error will be raised when using #update or #merge!. expect ArgumentError do h.update( "x"=>3 ) end
Version data entries
4 entries across 3 versions & 2 rubygems