From: matz@... (Yukihiro Matsumoto) Date: 2000-06-14T13:02:15+09:00 Subject: [ruby-talk:03383] Re: chomp! Hi, In message "[ruby-talk:03381] Re: chomp!" on 00/06/13, Dave Thomas writes: |> |chomp: |> | Equivalent to $_.chomp!(aString), except nil is never |> | returned. If $_ is changed, the new version is returned, |> | otherwise a copy of the original value is returned. See |> | String#chomp! on page 1. |> |> Equivalent to `$_ = $_.chomp(aString)'. | |Well yes... but our version uses more words, so it must be better ;-) Are you saying the same thing? Well, sorry. I wanted to emphasize $_ assignment. By the way, do you prefer the behavior like: str = $_.dup if str.chomp! $_ = str end It may be better to incorporate with $_ usage. But use of $_ is not recommended anyway though. matz.