Bug #7610
Updated by nobu (Nobuyoshi Nakada) almost 12 years ago
=begin Percent literal regexp brings SyntaxError with parenthesis. If I use | as separator, then it works fine, but I use () as separator, then it does not work. $ (({$ ruby -v ruby 2.0.0dev (2012-12-23 trunk 38571) [x86_64-darwin11.4.2] $ irb irb(main):001:0> %r(<telephoneNumber>\(555\)555-5555</telephoneNumber>) SyntaxError: (irb):1: unmatched close parenthesis: /<telephoneNumber>\(555)555-5555<\/telephoneNumber>/ from /Users/sane/.rbenv/versions/2.0.0-dev/bin/irb:12:in `<main>' irb(main):003:0> %r|<telephoneNumber>\(555\)555-5555</telephoneNumber>| => /<telephoneNumber>\(555\)555-5555<\/telephoneNumber>/ $ })) (({$ ruby -v ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin11.4.2] $ irb irb(main):001:0> %r(<telephoneNumber>\(555\)555-5555</telephoneNumber>) => /<telephoneNumber>\(555\)555-5555<\/telephoneNumber>/ irb(main):002:0> %r|<telephoneNumber>\(555\)555-5555</telephoneNumber>| => /<telephoneNumber>\(555\)555-5555<\/telephoneNumber>/ =end }))