J
Javier Valencia
Look this:
tigre@enigma tigre $ irb
irb(main):001:0> events = {}
=> {}
irb(main):002:0> events.default = []
=> []
irb(main):003:0> events["trying"] << "hello"
=> ["hello"]
irb(main):004:0> events
=> {}
irb(main):005:0> events.inspect
=> "{}"
irb(main):006:0> events["trying"]
=> ["hello"]
irb(main):007:0> quit
tigre@enigma tigre $
why is happening this behaviour?
tigre@enigma tigre $ irb
irb(main):001:0> events = {}
=> {}
irb(main):002:0> events.default = []
=> []
irb(main):003:0> events["trying"] << "hello"
=> ["hello"]
irb(main):004:0> events
=> {}
irb(main):005:0> events.inspect
=> "{}"
irb(main):006:0> events["trying"]
=> ["hello"]
irb(main):007:0> quit
tigre@enigma tigre $
why is happening this behaviour?