Bug #3833: "foo+bar".gsub("+","\\+") == "foobar" ?
http://redmine.ruby-lang.org/issues/show/3833
Author: Grant Olson
Status: Open, Priority: Normal
ruby -v: tryruby.org (I'm running 1.8.7 locally, same problem)
The following gsub with a minus seems to work correctly:
>> "foo-bar".gsub("-","\\-")
=> "foo\\-bar"
But with a plus, it seems to run incorrectly by stripping the plus:
>> "foo+bar".gsub("+","\\+")
=> "foobar"
----------------------------------------
http://redmine.ruby-lang.org