#65: #sub!, #gsub!, and other bang methods mutate frozen strings --------------------------------+------------------------------------------- Reporter: binary42@gmail.com | Owner: lsansonetti@apple.com Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.2 Component: MacRuby | Resolution: fixed Keywords: | --------------------------------+------------------------------------------- Changes (by lsansonetti@apple.com): * status: reopened => closed * resolution: => fixed * milestone: => MacRuby 0.2 Comment: Should be fixed in r234/trunk. {{{ $ ./miniruby -ve 's="foo";s.freeze;s.gsub!(/./,"x");p s' MacRuby version 0.2 (ruby 1.9.0 2008-05-17) [universal-darwin9.0] -e:1:in `gsub!': can't modify frozen string (RuntimeError) from -e:1:in `<main>' }}} -- Ticket URL: <http://ruby.macosforge.org/trac/ticket/65#comment:4> macruby <http://ruby.macosforge.org/>