add a few regressions test from
The code was contributed from Carson McDonald (@carsonmcdonald)
MODIFY
mrbgems/mruby-metaprog/test/metaprog.rb
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

MODIFY
test/t/class.rb
test/t/class.rb
@@ -375,6 +375,20 @@ assert('clone Class') do
assert_true(Foo.clone.new.func)
end
+assert('class definition in singleton class') do
+ class AClassS
+ class << self
+ class BClass
+ end
+
+ def iclass
+ BClass
+ end
+ end
+ end
+ assert_equal(Class, AClassS.iclass.class)
+end
+
assert('class variable and class << self style class method') do
class ClassVariableTest
@@class_variable = "value"

add a few regressions test from #2313

The code was contributed from Carson McDonald (@carsonmcdonald)