aboutsummaryrefslogtreecommitdiffstats
path: root/test/psych/test_deprecated.rb
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-24 19:58:34 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-24 19:58:34 +0000
commitb57db764b0856ddae30deed32a104c4016f0ffae (patch)
tree164b0d5823e086607a51793623a8d01e3b2d661e /test/psych/test_deprecated.rb
parent9ac224eb2699d528f7c3544861f02a5255605f4f (diff)
downloadruby-b57db764b0856ddae30deed32a104c4016f0ffae.tar.gz
* ext/psych/lib/psych/deprecated.rb: supporting detect_implicit method
* test/psych/test_deprecated.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/psych/test_deprecated.rb')
-rw-r--r--test/psych/test_deprecated.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/psych/test_deprecated.rb b/test/psych/test_deprecated.rb
index c93b36ed44..f5ff79b56d 100644
--- a/test/psych/test_deprecated.rb
+++ b/test/psych/test_deprecated.rb
@@ -163,5 +163,13 @@ module Psych
assert_equal [["tag:ruby.yaml.org,2002:foo", "bar"]], types
end
+
+ def test_detect_implicit
+ assert_equal '', Psych.detect_implicit(nil)
+ assert_equal '', Psych.detect_implicit(Object.new)
+ assert_equal '', Psych.detect_implicit(1.2)
+ assert_equal 'null', Psych.detect_implicit('')
+ assert_equal 'string', Psych.detect_implicit('foo')
+ end
end
end