little fixes more examples

This commit is contained in:
Jeremy Ashkenas
2009-12-18 09:55:31 -05:00
parent 253e45fc54
commit 2f75854a61
5 changed files with 59 additions and 4 deletions

View File

@@ -300,7 +300,7 @@ module CoffeeScript
def compile(indent, scope, opts={})
scope = Scope.new(scope)
@params.each {|id| scope.find(id) }
@params.each {|id| scope.find(id.to_s) }
opts = opts.merge(:return => true)
code = @body.compile(indent + TAB, scope, opts)
"function(#{@params.join(', ')}) {\n#{code}\n#{indent}}"