diff options
author | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2017-03-03 15:20:40 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2017-03-03 15:20:40 +0900 |
commit | b0bbb2f2884dcfc731bb61e59c962d91e558b378 (patch) | |
tree | e2d30ff811ceec8645e8a9dea0e22ca4515920e2 | |
parent | bb5b2644c1b39c54bbe4250936ed4023247c1aab (diff) | |
download | psych-b0bbb2f2884dcfc731bb61e59c962d91e558b378.tar.gz |
avoid to shadowing outer local variables.
-rw-r--r-- | test/psych/test_array.rb | 4 | ||||
-rw-r--r-- | test/psych/test_string.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/psych/test_array.rb b/test/psych/test_array.rb index f1e71fb..6306a04 100644 --- a/test/psych/test_array.rb +++ b/test/psych/test_array.rb @@ -16,7 +16,7 @@ module Psych end def test_another_subclass_with_attributes - y = Y.new.tap {|y| y.val = 1} + y = Y.new.tap {|o| o.val = 1} y << "foo" << "bar" y = Psych.load Psych.dump y @@ -36,7 +36,7 @@ module Psych end def test_subclass_with_attributes - y = Psych.load Psych.dump Y.new.tap {|y| y.val = 1} + y = Psych.load Psych.dump Y.new.tap {|o| o.val = 1} assert_equal Y, y.class assert_equal 1, y.val end diff --git a/test/psych/test_string.rb b/test/psych/test_string.rb index cf61a90..4aa6016 100644 --- a/test/psych/test_string.rb +++ b/test/psych/test_string.rb @@ -129,7 +129,7 @@ string: &70121654388580 !ruby/string end def test_another_subclass_with_attributes - y = Psych.load Psych.dump Y.new("foo").tap {|y| y.val = 1} + y = Psych.load Psych.dump Y.new("foo").tap {|o| o.val = 1} assert_equal "foo", y assert_equal Y, y.class assert_equal 1, y.val @@ -154,7 +154,7 @@ string: &70121654388580 !ruby/string end def test_subclass_with_attributes - y = Psych.load Psych.dump Y.new.tap {|y| y.val = 1} + y = Psych.load Psych.dump Y.new.tap {|o| o.val = 1} assert_equal Y, y.class assert_equal 1, y.val end |