From: "naruse (Yui NARUSE)" Date: 2013-03-22T16:26:26+09:00 Subject: [ruby-core:53623] [ruby-trunk - Bug #8133] Regexp macro %r{} is loosing backslash on "\}" Issue #8133 has been updated by naruse (Yui NARUSE). nagachika (Tomoyuki Chikanaga) wrote: > Hmm, is it a bug introduced in 2.0.0? > I personally feel the behavior of 2.0.0 is natural. \} in this case doesn't escape a regexp meta character, it escapes closing terminator of %r{...} literal. ---------------------------------------- Bug #8133: Regexp macro %r{} is loosing backslash on "\}" https://bugs.ruby-lang.org/issues/8133#change-37804 Author: jstribny (Josef Stribny) Status: Closed Priority: Normal Assignee: Category: core Target version: current: 2.1.0 ruby -v: 2.0.0 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. -- http://bugs.ruby-lang.org/