On Wed, Aug 29, 2012 at 11:33 AM, Joakim Langvand <[email protected]> wrote: > Thanks, Robert!
YWC. > That helped :) Good! > I suppose pname.chomp! would mean the same as pname = pname.chomp then. It has the same effects in your specific example. But effects will be different if there is another reference the object referred to by pname. In that case #chomp! and #chomp will behave differently because with exclamation mark you'll see the same object through both references but without and assignment you won't. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ -- You received this message because you are subscribed to the Google Groups ruby-talk-google group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at https://groups.google.com/d/forum/ruby-talk-google?hl=en
