Skip to content

Commit

Permalink
CoffeeScript.run should be able to safely omit options
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra committed Jan 13, 2012
1 parent 6d33a2e commit 0c5726d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/coffee-script/coffee-script.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/coffee-script.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ exports.nodes = (source, options) ->

# Compile and execute a string of CoffeeScript (on the server), correctly
# setting `__filename`, `__dirname`, and relative `require()`.
exports.run = (code, options) ->
exports.run = (code, options = {}) ->
mainModule = require.main

# Set the filename.
Expand Down

1 comment on commit 0c5726d

@geraldalewis
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Banged my head against this for quite a while today and couldn't make out the exact issue :)

Please sign in to comment.