From: Clemens Hintze Date: 2000-03-09T11:47:32+01:00 Subject: [ruby-talk:01786] Is this a bug? (mailed & posted) Hi, I am using Ruby 1.4.3 yet! Now I have found a behavior that seems not in-line with the documentation. Please consider: /home/hintze/$ ruby $_ = "hello" p "1st: #$_" sub("e","a") p "2nd: #$_" ^D "1st: hello" "2nd: hallo" It seems, that Kernel::sub also updates variable $_. From the documentation I would assume, that it should only return a copy, and shoud *not* update $_. Updating $_ should be the task of Kernel::sub!. Am I wrong? \cle PS: Same is for Kernel::gsub.