From: kranthi reddy Date: 2008-05-07T20:36:53+09:00 Subject: Re: Interesting result of a newbie mistake ------=_Part_22299_1334269.1210160212530 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline When you have somthing like a = %{ ant cat dog } => " ant cat dog " irb(main):002:0> a.class => String irb(main):003:0> a[2] => 110 irb(main):004:0> a[2].chr => "n" it displaying the ascii value of that character at that paticular place cheers, kranthi On Wed, May 7, 2008 at 4:45 PM, Robert Klemme wrote: > 2008/5/7 VICTOR GOLDBERG : > > Instead of writing > > a = %w{ ant cat dog } > > I wrote > > a = %{ ant cat dog } > > puts a[2] --> 110 > > > > I didn't find an explanation for this result in Dave Thomas' book > > Anybody volunteers a response? > > irb(main):001:0> a = %{ ant cat dog } > => " ant cat dog " > irb(main):002:0> a.class > => String > irb(main):003:0> a[2] > => 110 > irb(main):004:0> a[2].chr > => "n" > > Cheers > > robert > > -- > use.inject do |as, often| as.you_can - without end > > ------=_Part_22299_1334269.1210160212530--