mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 11:31:20 -05:00
making the each fixture a little more like underscore, and avoiding passing assignment into functions from the outside
This commit is contained in:
@@ -338,7 +338,8 @@ module CoffeeScript
|
||||
def compile(indent, scope, opts={})
|
||||
scope = Scope.new(scope)
|
||||
@params.each {|id| scope.find(id.to_s) }
|
||||
opts = opts.merge(:return => true)
|
||||
opts[:return] = true
|
||||
opts.delete(:assign)
|
||||
code = @body.compile(indent + TAB, scope, opts)
|
||||
write("function(#{@params.join(', ')}) {\n#{code}\n#{indent}}")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user