If you can verify that the string from user input is safe, or can remove the offending parts, you can untaint the object. The following method will remove any characters other than lowercase letters, untaint the string and return it. It can then be safely passed to the safe_resize method without fear of mischief.
def sanitize_input(string)
safe_string = string.gsub(/[^a-z]/, '')
safe_string.untaint
return safe_string
end

