summaryrefslogtreecommitdiff
path: root/test/ruby/test_regexp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_regexp.rb')
-rw-r--r--test/ruby/test_regexp.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index 03c7fd4443..faafe336ec 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -179,6 +179,12 @@ class TestRegexp < Test::Unit::TestCase
assert_equal(expected, result)
end
+ def test_source_escaped_paren
+ bug7610 = '[ruby-core:51088]'
+ s = '\(a\)'
+ assert_equal(/#{s}/, eval("%r(#{s})"), bug7610)
+ end
+
def test_source_unescaped
expected, result = "!\"#%&',-/:;=@_`~".each_char.map {|c|
[