From: "Derrick B." Date: 2012-12-29T10:01:12+09:00 Subject: Re: Ruby Koans regarding Hashes. 7stud -- wrote in post #1090519: > 7stud -- wrote in post #1090511: >> >> ...ruby stores the block somewhere, and then every time you try to >> access a non-existent key, ruby executes the block. >> > > I don't know if you know it or not but some of ruby's built in methods > have strange names. For instance, when you write: > > hash[key] << 'hello' > > …the left side is syntactic sugar for this method call: > > hash.[](key) > Yep, read about it in section 4.4 of "The Ruby Programming Language", but don't quiz me on it yet! :) -- Posted via http://www.ruby-forum.com/.