From: Robert Dober Date: 2006-04-07T19:09:07+09:00 Subject: Re: easy question about inspect method ------=_Part_17123_10515888.1144404544307 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 4/7/06, Les Nightingill wrote: > > When I use myarray.inspect, the result has some odd asymmetrical > formatting, like: > #nil, "role_id"=3D>"1", "last"=3D>"Normal", "first"=3D>"Norman", "id"=3D>= "17"}> > > what is the significance of the # at the start, and the } and > at the > end of this myarray.inspect result? > > thanks in advance > > Les > > -- > Posted via http://www.ruby-forum.com/. > > Looks like (1) myarray is an Object having an instance method being a Hash (2) the # looks like a value of the hash is a method :nil (3) and it looks like the output was cut before the "#" There is an alternative of course: class Array def inspect "#nil, "role_id"=3D>"1", "last"=3D>"Normal", "first"=3D>"Norman", "id"=3D>"17"}>" end end which I consider unlikely Cheers Robert -- Deux choses sont infinies : l'univers et la b=EAtise humaine ; en ce qui concerne l'univers, je n'en ai pas acquis la certitude absolue. - Albert Einstein ------=_Part_17123_10515888.1144404544307--