summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-19 11:45:39 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-19 11:45:39 +0000
commit09f5560c5721ad779cc2e740c4a77ad6aca1b530 (patch)
tree5d8d6ada2d2bed32c7d8f39dc616d9c26dbfac51 /test
parent8e3bfe98614414f027eed4e33b80dab0e938d13b (diff)
Merge everything from ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/yaml/test_yaml.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/yaml/test_yaml.rb b/test/yaml/test_yaml.rb
index 676310e..023a8b9 100644
--- a/test/yaml/test_yaml.rb
+++ b/test/yaml/test_yaml.rb
@@ -1272,6 +1272,14 @@ EOY
assert_equal([{}], o.keys)
end
+ #
+ # contributed by riley lynch [ruby-Bugs-8548]
+ #
+ def test_object_id_collision
+ omap = YAML::Omap.new
+ 1000.times { |i| omap["key_#{i}"] = { "value" => i } }
+ raise "id collision in ordered map" if omap.to_yaml =~ /id\d+/
+ end
end
if $0 == __FILE__