From: matz@... (Yukihiro Matsumoto) Date: 2003-07-22T21:34:00+09:00 Subject: Re: gsub(/\s*$/, "") doubling string Hi, In message "Re: gsub(/\s*$/, "") doubling string" on 03/07/22, ts writes: |P> # very odd (at least to me) in 1.8.0p3 |P> irb(main):005:0> " TEST .".gsub(/\s*$/, "") |P> => " TEST . TEST ." | | Can you try this Thank you for the fix, Guy. And thank you for finding a bug, Paul. |P> irb(main):002:0> " string ".gsub(/\s*$/, 'P') |P> " stringPP" | | this is normal The first try replaces all trailing spaces with "P", then second try replaces empty at the end of string with "P". matz.