summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_yaml.rb5
-rw-r--r--test/syck/test_yaml.rb5
2 files changed, 10 insertions, 0 deletions
diff --git a/test/psych/test_yaml.rb b/test/psych/test_yaml.rb
index 45cd39d676..20bf26e5b4 100644
--- a/test/psych/test_yaml.rb
+++ b/test/psych/test_yaml.rb
@@ -13,6 +13,11 @@ class Psych_Unit_Tests < Psych::TestCase
def teardown
Psych.domain_types.clear
end
+
+ # [ruby-core:34969]
+ def test_regexp_with_n
+ assert_cycle(Regexp.new('',0,'n'))
+ end
#
# Tests modified from 00basic.t in Psych.pm
#
diff --git a/test/syck/test_yaml.rb b/test/syck/test_yaml.rb
index 3d9d7abe1d..b346de4bee 100644
--- a/test/syck/test_yaml.rb
+++ b/test/syck/test_yaml.rb
@@ -22,6 +22,11 @@ class YAML_Unit_Tests < Test::Unit::TestCase
YAML::ENGINE.yamler = @current_engine
end
+ # [ruby-core:34969]
+ def test_regexp_with_n
+ assert_cycle(Regexp.new('',0,'n'))
+ end
+
#
# Convert between YAML and the object to verify correct parsing and
# emitting