From: ts Date: 2001-08-04T21:16:20+09:00 Subject: [ruby-talk:19127] Re: My 1st look @ ruby: No prototypes and problem with String#gsub >>>>> "S" == Stefan Scholl writes: S> Is there no way to prototype Shuffle.new()? I've to handle the S> wrong type on my own. No. S> astr.gsub(/\s/, '\\\&') What do ruby, in this case, is explained in the FAQ 9.18 How can I escape a backslash in a regexp? http://www.rubycentral.com/faq/rubyfaq-9.html#ss9.18 S> irb(main):002:0> astr.gsub(/\s/, '\\\&') astr.gsub(/\s/, '\\\\\&') or astr.gsub(/\s/) {|i| '\\' + i } Guy Decoux