fix ruby return

This commit is contained in:
Torsten Ruger 2018-07-20 20:05:32 +03:00
parent 172327f045
commit d03592dfb1
2 changed files with 3 additions and 5 deletions

View File

@ -10,10 +10,9 @@ module Ruby
def to_vool
val , rest = *normalize_name(@return_value)
me = Vool::ReturnStatement.new(val)
me = Vool::ReturnStatement.new(val.to_vool)
return me unless rest
rest << me
rest
Vool::Statements.new([ rest.to_vool , me])
end
def to_s(depth = 0)

View File

@ -26,8 +26,7 @@ module Ruby
def <<(o)
@statements << o
self
end
end
def to_vool
if( single? )
first.to_vool