From: Charles Hixson Date: 2003-11-20T10:50:25+09:00 Subject: Re: ! usage Brett H. Williams wrote: >On Nov 20, Greg McIntyre wrote: >... > >What would this do? Something like a = a.join ? > >irb(main):001:0> a = [1,2,3] # => [1, 2, 3] >irb(main):002:0> a.join! # => "123" >irb(main):003:0> a # => "123" > >?? > >The above is doing a variable assignment with a method. So the receiver is >a different object after the method is called. > >This sounds undesirable. I think of ! as either meaning danger OR operate >on an existing object, but not this. > >I'm not sure this is even possible in Ruby, but I know it violates my POLS >:| > To me it seems worse than that. You've been assuming that the memebers ot the list were integers. But they could well be floats, or procs. floats would give you very peculiar results, whereas procs... (shudder!)