Mercurial > spidermonkey-playground
changeset 14:1f48075a404e
changed tcb and sample module again
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Fri, 19 Jun 2009 16:43:02 -0700 |
parents | d200a8158bd5 |
children | 1d73446eef62 |
files | sample-module.js tcb.js |
diffstat | 2 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/sample-module.js Fri Jun 19 15:25:32 2009 -0700 +++ b/sample-module.js Fri Jun 19 16:43:02 2009 -0700 @@ -3,5 +3,5 @@ } exports.foo = function foo() { - return imports.blop + " " + foo.caller + " " + boo(); + imports.print(imports.blop + " " + foo.caller + " " + boo()); };
--- a/tcb.js Fri Jun 19 15:25:32 2009 -0700 +++ b/tcb.js Fri Jun 19 16:43:02 2009 -0700 @@ -53,8 +53,10 @@ print(" " + name + ": " + scopeChain[name]); } -var module = require("sample-module.js", {blop: "hello"}); +var module = require("sample-module.js", {blop: "hello", print: print}); -print("module.foo() is " + module.foo()); +(function() { + print("module.foo() is " + module.foo()); + })(); var wrapped = wrap({}, {});