diff options
-rw-r--r-- | test/psych/visitors/test_yaml_tree.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/psych/visitors/test_yaml_tree.rb b/test/psych/visitors/test_yaml_tree.rb index 01f1aecd08..69885ee9c6 100644 --- a/test/psych/visitors/test_yaml_tree.rb +++ b/test/psych/visitors/test_yaml_tree.rb @@ -7,7 +7,7 @@ module Psych class TestDelegatorClass < Delegator def initialize(obj); super; @obj = obj; end def __setobj__(obj); @obj = obj; end - def __getobj__; @obj; end + def __getobj__; @obj if defined?(@obj); end end class TestSimpleDelegatorClass < SimpleDelegator |