summaryrefslogtreecommitdiff
path: root/test/psych/visitors/test_yaml_tree.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/psych/visitors/test_yaml_tree.rb')
-rw-r--r--test/psych/visitors/test_yaml_tree.rb2
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 01f1aecd086..69885ee9c62 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