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.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index 112af60c96..2c4c9709f7 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -205,6 +205,15 @@ class TestRegexp < Test::Unit::TestCase
assert_not_include(local_variables, :nil, "[ruby-dev:32675]")
end
+ def test_assign_named_capture_trace
+ bug = '[ruby-core:79940] [Bug #13287]'
+ assert_normal_exit("#{<<-"begin;"}\n#{<<-"end;"}", bug)
+ begin;
+ / (?<foo>.*)/ =~ "bar" &&
+ true
+ end;
+ end
+
def test_match_regexp
r = /./
m = r.match("a")