From: Eric Christopherson Date: 2012-03-01T16:32:31+09:00 Subject: Re: Rubymoticons On Thu, Mar 1, 2012 at 1:12 AM, Florian Gilcher wrote: >> >> Adam Prescott wrote: >>> Maybe I'm missing something, but: >>> >>> >>> $ ruby -ve 'puts :- >>> .class' >>> ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux] >>> Symbol >> >> So Ruby and IRB are consistent in this respect. But I would still >> expect Ruby *not* to wait for the next line when it encounters a >> symbol like :- at the end of a line. >> > > This is not a bug. Ruby 1.9 can chain methods like this: > > "foo \n" >  .chomp >  .reverse > > So, it works with any expression, also with symbols. Yes, but not in irb; in irb, after you type "foo \n", it is immediately evaluated. irb should also treat symbols that way -- and not halfway interpret them as operators. (I say "halfway" because on the one hand it waits for the next line, as it would with a dangling operator; but on the other hand, it then just throws away the symbol and evaluates the next line as if it stood alone.)