From: James Date: 2011-04-16T11:15:12+09:00 Subject: Re: chomp behaviour --bcaec5215af7636cbe04a0ffba4e Content-Type: text/plain; charset=UTF-8 What are you trying to accomplish? Bear in mind that, on the command line, you have bash or cmd intercepting everything. It's not the same as trying things inside irb. Look up what string.chomp(arg) does in irb vs the same thing on the command line. On Fri, Apr 15, 2011 at 8:08 PM, Steel Steel wrote: > Using 1.9.1 > I noticed something with chomp > > $ echo "abc" | ruby -e 'puts gets.chomp("c")' > abc > > $ irb > irb(main):001:0> "abc".chomp("c") > => "ab" > > It doesn't work on the command line, or am i doing it wrong.? > comments? > > -- > Posted via http://www.ruby-forum.com/. > > --bcaec5215af7636cbe04a0ffba4e--