summaryrefslogtreecommitdiff
path: root/test/psych/test_exception.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/psych/test_exception.rb')
-rw-r--r--test/psych/test_exception.rb6
1 files changed, 6 insertions, 0 deletions
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 '--- `'