From: David Unric Date: 2010-11-19T00:35:05+09:00 Subject: Re: Ruby's inconsistency or an IRB issue ? It really was a Wirble's issue the author was aware of. I find it an essential flaw that changes IRB behaviour that leads to unexpected results. After digging in sources I made the following quick fix so now it should display symbols properly. Besides equal-sign, there were discarded/ignored also <, >, and ~ characters that may appear in symbol names. --- wirble-0.1.3/lib/wirble.rb.orig 2010-11-18 16:26:34.000000000 +0100 +++ wirble-0.1.3/lib/wirble.rb 2010-11-18 16:31:10.380273617 +0100 @@ -180,14 +180,20 @@ end when :symbol case c - # XXX: should have =, but that messes up foo=>bar - when /[a-z0-9_!?]/ + when /[a-z0-9_!?~<>]/ val << c else - yield :symbol_prefix, ':' - yield state[-1], val - state.pop; val = '' - repeat = true + # peek ahead if equal sign is part of reference operator '=>' + # and not of comparison method name at the same time '<=>' + if (c == '=' and chars[i, 2].join == '=>' and lc != '<') \ + or (c != '=') + yield :symbol_prefix, ':' + yield state[-1], val + state.pop; val = '' + repeat = true + else + val << c + end end when :string case c Did sent also to author of Wirble. Take care. -- Posted via http://www.ruby-forum.com/.