fix while statements each

wasn’t picking up condition
This commit is contained in:
Torsten Ruger 2018-03-20 13:29:18 +05:30
parent c8980595a3
commit 8bac096f74
2 changed files with 1 additions and 4 deletions

View File

@ -29,7 +29,7 @@ module Vool
def each(&block)
block.call(self)
@condition.each(&block)
block.call(@condition)
@body.each(&block)
end

View File

@ -11,9 +11,6 @@ module Vool
@ins = compile_first_method( "while(@a) ; 5.mod4 ; end")
end
def test_compiles_not_array
assert Array != @ins.class , @ins
end
def test_compiles_as_while
assert_equal Label , @ins.class , @ins
end