From: Robert Klemme Date: 2012-02-13T21:22:28+09:00 Subject: Re: the ruby syntax On Mon, Feb 13, 2012 at 1:10 PM, maven apache wrote: > > 2012/2/13 Josh Cheek > > > 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. > > But without knowing the syntax of this language,what is the meaning of the > API reference? > > I think there should be some documents about the syntax of ruby including > the hidden feature like the hash exmple in this post. And the std lib (especially documentation of a particular class) is not the proper place for such a documentation. That's all Josh said. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/