Try Ruby is a interactive shell that quickly and whimsically teaches the Ruby programming language. Originally _why's idea, it has been recreated from the ground up by Rubyists who have a passion for Ruby and for teaching their fellow (wo)man how to program.
It would be expected that the interpreter returns (lets me type the rest of the code when I am in mid coding e.g. after typing the ','.
The code snippet and hash struct is documented by the original author of Ruby at http://www.ruby-doc.org/docs/ProgrammingRuby, under heading 'Arrays and Hashes'.