summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-29 14:48:12 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-29 14:48:12 +0000
commita90b1b574c2506a58ca5dacabcdaaa676b99a5c8 (patch)
treef255a41a3db80f22148c93dd42bdbdc80d1c6411 /ext
parent55f779aaabb4942366067e7145c2ccc014872202 (diff)
merges r28361 from trunk into ruby_1_9_2.
-- * ext/psych/lib/psych/visitors/to_ruby.rb (resolve_klass): fix the exception message when attempting to load an unknown class. Thanks nobu! [ruby-dev:41399] * test/psych/test_psych.rb: test for the exception message git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/psych/lib/psych/visitors/to_ruby.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/psych/lib/psych/visitors/to_ruby.rb b/ext/psych/lib/psych/visitors/to_ruby.rb
index e28ac7bf87..ffff636d8e 100644
--- a/ext/psych/lib/psych/visitors/to_ruby.rb
+++ b/ext/psych/lib/psych/visitors/to_ruby.rb
@@ -246,13 +246,13 @@ module Psych
begin
path2class(name)
- rescue ArgumentError => ex
- name = "Struct::#{name}"
+ rescue ArgumentError, NameError => ex
unless retried
- retried = true
+ name = "Struct::#{name}"
+ retried = ex
retry
end
- raise ex
+ raise retried
end
end
end