diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-06-03 16:45:12 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-06-03 16:47:04 +0900 |
| commit | 01a21085f6348b1f1b070f2c64a6ed71b6d5afce (patch) | |
| tree | 7de9a62c859e2afa924abd9920a1148aa816b7cc /mrbgems/mruby-metaprog | |
| parent | 9775315240961a14cd6dd0cf51641c694c900149 (diff) | |
| download | mruby-01a21085f6348b1f1b070f2c64a6ed71b6d5afce.tar.gz mruby-01a21085f6348b1f1b070f2c64a6ed71b6d5afce.zip | |
add a few regressions test from #2313
The code was contributed from Carson McDonald (@carsonmcdonald)
Diffstat (limited to 'mrbgems/mruby-metaprog')
| -rw-r--r-- | mrbgems/mruby-metaprog/test/metaprog.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mrbgems/mruby-metaprog/test/metaprog.rb b/mrbgems/mruby-metaprog/test/metaprog.rb index d63913020..4d2651702 100644 --- a/mrbgems/mruby-metaprog/test/metaprog.rb +++ b/mrbgems/mruby-metaprog/test/metaprog.rb @@ -104,6 +104,17 @@ assert('Kernel#global_variables', '15.3.1.3.14') do assert_equal(1, variables2.size - variables1.size) end +assert('Kernel#local_variables', '15.3.1.3.28') do + assert_equal Array, local_variables.class + + def local_var_list + a = "hello" + local_variables + end + + assert_equal [:a], local_var_list +end + assert('Kernel.local_variables', '15.3.1.2.7') do a, b = 0, 1 a += b |
