From 66d3b9750b0070f4aec8790a13035021d0721e43 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Fri, 29 Aug 2014 21:41:02 +0000 Subject: * ext/psych/lib/psych/visitors/yaml_tree.rb: fix NameError dumping and loading. Fixes GH #85. Thanks @brentdax for the patch! * test/psych/test_exception.rb: test for fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/psych/test_exception.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/psych/test_exception.rb b/test/psych/test_exception.rb index a9fe5c43d1..30dfb24f3b 100644 --- a/test/psych/test_exception.rb +++ b/test/psych/test_exception.rb @@ -16,6 +16,12 @@ module Psych @wups = Wups.new end + def test_naming_exception + err = String.xxx rescue $! + new_err = Psych.load(Psych.dump(err)) + assert_equal err.message, new_err.message + end + def test_load_takes_file ex = assert_raises(Psych::SyntaxError) do Psych.load '--- `' -- cgit v1.2.3