fix module handling at ruby level
Was returning arrays instead of Statements, which messed things up
This commit is contained in:
@ -4,11 +4,14 @@ module Ruby
|
||||
class ModuleNameTest < Minitest::Test
|
||||
include RubyTests
|
||||
|
||||
def test_parfait_module
|
||||
assert_equal [nil], compile("module Parfait ; end")
|
||||
def test_parfait_module_scoped
|
||||
lst = compile("module Parfait ; 1 ; 1 ; end")
|
||||
assert_equal ScopeStatement, lst.class
|
||||
assert_equal IntegerConstant, lst.first.class
|
||||
assert_equal 2, lst.length
|
||||
end
|
||||
def test_parfait_module_const
|
||||
assert_equal IntegerConstant, compile("module Parfait ; 1;end").first.class
|
||||
assert_equal IntegerConstant, compile("module Parfait ; 1;end").class
|
||||
end
|
||||
|
||||
def test_module_parfait_removed
|
||||
|
Reference in New Issue
Block a user