From: Josh Cheek Date: 2012-02-13T20:55:17+09:00 Subject: Re: the ruby syntax --f46d04388ee9c98f5a04b8d7264b Content-Type: text/plain; charset=ISO-8859-1 On Mon, Feb 13, 2012 at 5:19 AM, Saji Hameed wrote: > On Sun, Feb 12, 2012 at 10:49 PM, maven apache > wrote: > > > But in the ruby document:http://www.ruby-doc.org/docs/ProgrammingRuby/ > > > > Definiation of a hash should like this: > > > > {'key'=>'value'.....} > > > > Now in the IO.new exmaple,it is written as {key:value}. Is the ':' > symbol > > same as '=>'?? I do not find it is methioned in any document. > > > > Unfortunately, even the latest rubydoc > http://ruby-doc.org/core-1.9.3/Hash.html somehow does not mention this > new syntax. > > Okay, but ruby-doc's purpose isn't to teach you the language, it's to give you an API reference. --f46d04388ee9c98f5a04b8d7264b--