diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-13 09:28:51 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-13 09:28:51 +0000 |
commit | db48c307944a9a18877236bdf9e9b778875f38ed (patch) | |
tree | e48512c803a3747f08e744aa1a8d946711300d17 /test/psych | |
parent | cc0313436160b735a3d41361cb5e3eeb10fcbdad (diff) | |
download | ruby-db48c307944a9a18877236bdf9e9b778875f38ed.tar.gz |
psych_emitter.c: check tags range
* ext/psych/psych_emitter.c (start_document): should not exceed
tags array range.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/psych')
-rw-r--r-- | test/psych/test_emitter.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/psych/test_emitter.rb b/test/psych/test_emitter.rb index fe198bd1b1..b19501932b 100644 --- a/test/psych/test_emitter.rb +++ b/test/psych/test_emitter.rb @@ -90,5 +90,20 @@ module Psych @emitter.start_sequence(nil, nil, true, :foo) end end + + def test_resizing_tags + tags = [] + version = [1,1] + obj = Object.new + obj.instance_variable_set(:@tags, tags) + def obj.to_str + (1..10).map{|x| @tags.push(["AAAA","BBBB"])} + return "x" + end + + tags.push([obj, "tag:TALOS"]) + @emitter.start_document(version, tags, 0) + assert(true) + end end end |