From: matz@... (Yukihiro Matsumoto) Date: 2002-12-04T02:16:10+09:00 Subject: Re: Inconsistency while playing with Symbol in IRB Hi, In message "Inconsistency while playing with Symbol in IRB" on 02/12/04, "Mills Thomas (app1tam)" writes: |Can I assume that the following inconsistency (See the diff between cmd 1 |and cmd 2) has something to do with the eval-print loop in IRB and not |something internal to Ruby (after all, cmd 3 works)? I'm not sure what you meant by "inconsistency". |irb(main):021:0> print "some string with blanks".intern |some string with blanksnil "print" prints symbols by "to_s". So printed string is "some string with blanks", and its returned value is "nil" |irb(main):022:0> p ("some string with blanks".intern) |:some string with blanks |nil "p" prints symbols by "intern" with a newline. So printed string is ":some string with blanks\n", and its returned value is "nil" |irb(main):023:0> print "some string with blanks".intern == ("some string |with blanks".intern) ? "Equal" : "Not Equal" |Equalnil So even though their representation is different, they are still same symbols. matz.