diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-09 00:06:29 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-09 00:06:29 +0000 |
commit | c641e4b23e674e784258b1b3a86df5fb1091753a (patch) | |
tree | 0f642ab8f0571076efe5d94ceefb22b4467dbaf8 /test/psych | |
parent | c84bb5df6dff60d17ff692306aa94fd53bed9638 (diff) | |
download | ruby-c641e4b23e674e784258b1b3a86df5fb1091753a.tar.gz |
* ext/psych/lib/psych/visitors/to_ruby.rb: Ruby classes can be loaded
from YAML files.
* ext/psych/lib/psych/visitors/yaml_tree.rb: Ruby classes can be
dumped to YAML files.
* test/psych/test_class.rb: corresponding test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/psych')
-rw-r--r-- | test/psych/test_class.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/psych/test_class.rb b/test/psych/test_class.rb index cba88ba75b..8fd4ad0952 100644 --- a/test/psych/test_class.rb +++ b/test/psych/test_class.rb @@ -2,16 +2,18 @@ require 'psych/helper' module Psych class TestClass < TestCase - def test_cycle + def test_cycle_anonymous_class assert_raises(::TypeError) do - assert_cycle(TestClass) + assert_cycle(Class.new) end end + def test_cycle + assert_cycle(TestClass) + end + def test_dump - assert_raises(::TypeError) do - Psych.dump TestClass - end + Psych.dump TestClass end end end |