Adding simple implicit return

Ruby return semantics are easy to grasp, not so easy to code. So many cases.
Added support for common cases, return const/variable or call.
This commit is contained in:
2019-08-17 23:27:55 +03:00
parent 4c76ff3388
commit 32f908c127
4 changed files with 29 additions and 2 deletions

View File

@ -23,6 +23,9 @@ module Ruby
def shift
@statements.shift
end
def pop
@statements.pop
end
def [](i)
@statements[i]
end