From: Wybo Dekker Date: 2009-12-10T18:50:09+09:00 Subject: Re: which is better? Robert Klemme wrote: > And then there's also > > irb(main):001:0> "123ab".tr "0-9", "" > => "ab" > irb(main):002:0> "123ab".tr! "0-9", "" > => "ab" But why no parentheses?: irb >> $-w=true => true >> "abcd1234".gsub! /\d+/,'' (irb):13: warning: ambiguous first argument; put parentheses or even spaces => "abcd" >> "123ab".tr! "0-9","" => "ab" what is the ambiguity in the first case, and why is there no warning in the second case? -- Wybo