diff options
| author | ksss <[email protected]> | 2017-02-06 11:04:42 +0900 |
|---|---|---|
| committer | ksss <[email protected]> | 2017-02-06 11:16:47 +0900 |
| commit | bd72dba8c05056693e42c74b35d90691221f0d0d (patch) | |
| tree | c4f96f2a3aebcacda1a9e3cf2097b59cbf947c2f /test/t/kernel.rb | |
| parent | f2b18a604c6e4db5875b689ba26b377ad720a3ab (diff) | |
| download | mruby-bd72dba8c05056693e42c74b35d90691221f0d0d.tar.gz mruby-bd72dba8c05056693e42c74b35d90691221f0d0d.zip | |
Kernel#local_variables: Make result array unique
Diffstat (limited to 'test/t/kernel.rb')
| -rw-r--r-- | test/t/kernel.rb | 7 |
1 files changed, 3 insertions, 4 deletions
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 |
