Project

General

Profile

Actions

Bug #8133

closed

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

Added by jstribny (Josef Stribny) about 11 years ago. Updated about 11 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 2 (0 open2 closed)

Related to Ruby master - Bug #7610: Incompatible with percent literal regexp between 1.9.3 and 2.0.0Closed12/23/2012Actions
Has duplicate Backport200 - Backport #8135: Backport escape all closing parens - r39858 (Regexp macro %r{} is loosing backslash on "\}")Closednagachika (Tomoyuki Chikanaga)03/21/2013Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0