From: niceview Date: 2007-02-22T03:10:06+09:00 Subject: weird thing with gsub! I'd like to show you some example. -- def t1(str) str = str.gsub(/1/, "!") end def t2(str) str.gsub!(/1/, "!") end a = "123" p t1(a) # => "!23" p a # => "123" a = "123" p t2(a) # => "!23" p a # => "!23" -- Is 'str' variable a local variable in 't2' method? Why 'str.gsub!(/1/, "!")' change 'a' variable?