logic error in Expressions was causing over-compilation by a factor of the depth of the tree

This commit is contained in:
Jeremy Ashkenas
2010-01-03 18:47:23 -05:00
parent 97f16c0e9c
commit 8e6486a1d7

View File

@@ -96,7 +96,6 @@ module CoffeeScript
compiled = @expressions.map do |node|
o = options.dup
returns = o.delete(:return)
code = node.compile(o)
if last?(node) && returns && !node.statement_only?
if node.statement?
node.compile(o.merge(:return => true))