From bd72dba8c05056693e42c74b35d90691221f0d0d Mon Sep 17 00:00:00 2001 From: ksss Date: Mon, 6 Feb 2017 11:04:42 +0900 Subject: Kernel#local_variables: Make result array unique --- test/t/kernel.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/t/kernel.rb') diff --git a/test/t/kernel.rb b/test/t/kernel.rb index ca4b73907..aff2dd461 100644 --- a/test/t/kernel.rb +++ b/test/t/kernel.rb @@ -549,11 +549,10 @@ assert('Kernel.local_variables', '15.3.1.2.7') do vars = Kernel.local_variables.sort assert_equal [:a, :b, :vars], vars - Proc.new { + assert_equal [:a, :b, :c, :vars], Proc.new { |a, b| c = 2 - vars = Kernel.local_variables.sort - assert_equal [:a, :b, :c, :vars], vars - }.call + Kernel.local_variables.sort + }.call(-1, -2) end assert('Kernel#!=') do -- cgit v1.2.3