Permalink
Browse files

Ensure a valid return value for empty method

  • Loading branch information...
vidarh committed Sep 10, 2014
1 parent 36e3da5 commit 7b4cf9108e39cbe5251782f718b73b331132f0d5
Showing with 3 additions and 0 deletions.
  1. +3 −0 transform.rb
View
@@ -263,6 +263,9 @@ def rewrite_let_env(exp)
end
e[3] = [E[:sexp,E[:assign, :__env__, E[:call, :malloc, [aenv.size * 4]]]]]
e[3].concat(extra_assigns)
if body.empty?
body = [:nil]
end
e[3].concat(body)
end
# Always adding __env__ here is a waste, but it saves us (for now)

0 comments on commit 7b4cf91

Please sign in to comment.