Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
>> require 'map'
=> true
>> m = Std::Map.new
=> #<Std::Map:0xb78aaa04>
>> m[0] = 1
=> 1
>> m.each { |x| p x }
[0, 1]
=> #<Std::Map:0xb78aaa04>
>> require 'sample_enum'
=> true
>> m = Std::Map.new
=> #<Std::Map:0xb789ef10>
>> m[0] = 1
RuntimeError: Derived type is unbound
from (irb):7:in `[]='
from (irb):7
>> Sample_Enum.each { |x| p x }
#<Sample_Enum::FOO>
#<Sample_Enum::BAR>
#<Sample_Enum::BAZ>
=> nil
>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.