Project

General

Profile

Actions

Bug #8133

closed

Regexp macro %r{} is loosing backslash on "\}"

Added by jstribny (Josef Stribny) about 12 years ago. Updated about 12 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
2.0.0
Backport:
[ruby-core:53578]

Description

Hello,

Ruby 2.0.0 is loosing the backslash when used on "}" string (exact match).

How to reproduce in irb:

2.0.0-p0 :003 > %r{}}
=> /}/
2.0.0-p0 :004 > %r{{}
=> /{/

Compared to:

1.9.3p392 :001 > %r{{}
=> /{/
1.9.3p392 :002 > %r{}}
=> /}/

This shouldn't probably happen.


Related issues 1 (0 open1 closed)

Related to Ruby - Bug #7610: Incompatible with percent literal regexp between 1.9.3 and 2.0.0Closed12/23/2012Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0