I'm trying to replace single quotes (') with escaped single quotes (\') in a string in ruby 1.9.3 and 1.8.7.
The exact problem string is "Are you sure you want to delete '%@'". This string should become "Are you sure you want to delete \'%@\'"
Using .gsub!(/\'/,"\'") leads to the following string "Are you sure you want to %@'%@".
Any ideas on what's going on?