From b0bbb2f2884dcfc731bb61e59c962d91e558b378 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 3 Mar 2017 15:20:40 +0900 Subject: avoid to shadowing outer local variables. --- test/psych/test_array.rb | 4 ++-- 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 -- cgit v1.2.1