"abc".tr_s!("x", "y") returns "abc"

“abc”.tr_s!(“x”, “y”) e$B$,e(B “abc” e$B$rJV$7$^$9!#e(B

% ./ruby -ve ‘p “abc”.tr_s!(“x”, “y”)’
ruby 1.9.0 (2008-05-10 revision 16345) [i686-linux]
“abc”

1.8 e$B$G$Oe(B nil e$B$G$9!#e(B

% ruby-1.8 -ve ‘p “abc”.tr_s!(“x”, “y”)’
ruby 1.8.7 (2008-05-07 patchlevel 5000) [i686-linux]
nil

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs