Skip to content

Instantly share code, notes, and snippets.

@freshtonic
Created April 30, 2010 02:17
Show Gist options
  • Save freshtonic/384623 to your computer and use it in GitHub Desktop.
Save freshtonic/384623 to your computer and use it in GitHub Desktop.
# foo.coffee
kiwi: require('kiwi')
kiwi.require('ext') # The magic line. Commented-out everything works as it should; left in you get an exception (see below)
require('./bar')
# bar.coffee
sys: require('sys')
class Bar
someMethod: ->
for x in [1,2,3]
sys.puts(x)
bar: new Bar()
bar.someMethod()
# Exception
TypeError: Object function (fn, context) {
var filtered = []
this.each(function(val, key) {
if (fn.call(context, val, key, this))
filtered.push(val)
}, this)
return filtered
} has no method 'is_pure_statement'
at /usr/local/lib/coffee-script/lib/nodes.js:145:18
at ForNode.contains (/usr/local/lib/coffee-script/lib/nodes.js:126:13)
at ForNode.contains_pure_statement (/usr/local/lib/coffee-script/lib/nodes.js:144:47)
at Expressions.make_return (/usr/local/lib/coffee-script/lib/nodes.js:243:18)
at CodeNode.compile_node (/usr/local/lib/coffee-script/lib/nodes.js:1042:17)
at CodeNode.compile (/usr/local/lib/coffee-script/lib/nodes.js:82:21)
at AssignNode.compile_node (/usr/local/lib/coffee-script/lib/nodes.js:909:24)
at AssignNode.compile (/usr/local/lib/coffee-script/lib/nodes.js:82:21)
at Expressions.compile_expression (/usr/local/lib/coffee-script/lib/nodes.js:301:28)
at Expressions.<anonymous> (/usr/local/lib/coffee-script/lib/nodes.js:263:24)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment