Project

General

Profile

Actions

Bug #3833

closed

"foo+bar".gsub("+","\\+") == "foobar" ?

Added by grant (Grant Olson) over 14 years ago. Updated about 14 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
tryruby.org (I'm running 1.8.7 locally, same problem)
Backport:
[ruby-core:32404]

Description

=begin
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"
=end

Actions #1

Updated by nobu (Nobuyoshi Nakada) over 14 years ago

  • Status changed from Open to Rejected

=begin

=end

Actions

Also available in: Atom PDF

Like0
Like0