summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-proc-ext/test/proc.rb
diff options
context:
space:
mode:
authortake_cheeze <[email protected]>2014-04-29 20:46:24 +0900
committertake_cheeze <[email protected]>2014-04-29 20:47:50 +0900
commit7ea82fedd5585bc753464aae7fc406cd2f1ce08e (patch)
tree245665c2b8daa72a1f9cce82ca9a358a93728782 /mrbgems/mruby-proc-ext/test/proc.rb
parent4c7f9897c2fc1b180a7758130c8e6694d2361c96 (diff)
downloadmruby-7ea82fedd5585bc753464aae7fc406cd2f1ce08e.tar.gz
mruby-7ea82fedd5585bc753464aae7fc406cd2f1ce08e.zip
Implement Kernel.local_variables for testing dumped local variables information.
Diffstat (limited to 'mrbgems/mruby-proc-ext/test/proc.rb')
-rw-r--r--mrbgems/mruby-proc-ext/test/proc.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/mrbgems/mruby-proc-ext/test/proc.rb b/mrbgems/mruby-proc-ext/test/proc.rb
index 0f5ecfb94..a5611e586 100644
--- a/mrbgems/mruby-proc-ext/test/proc.rb
+++ b/mrbgems/mruby-proc-ext/test/proc.rb
@@ -74,3 +74,11 @@ assert('mrb_cfunc_env_get') do
assert_equal 1, t.get_int(1)
end
+
+assert('Kernel.local_variables') do
+ a, b = 0, 1
+ a += b
+
+ vars = Kernel.local_variables.sort
+ assert_equal [:a, :b, :vars], vars
+end