Skip to content

Instantly share code, notes, and snippets.

@oberhamsi
Created August 23, 2012 14:07
Show Gist options
  • Select an option

  • Save oberhamsi/3436999 to your computer and use it in GitHub Desktop.

Select an option

Save oberhamsi/3436999 to your computer and use it in GitHub Desktop.
ringojs instanceof
var {Worker} = require("ringo/worker");
var Foo = function() { return this;}
function main() {
var w = new Worker(module.id);
w.postMessage(new Foo());
}
function onmessage(e) {
print('instanceof?', e.data instanceof Foo);
}
if (require.main === module) {
main();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment