diff options
Diffstat (limited to 'clojurescript/clj.js')
-rw-r--r-- | clojurescript/clj.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clojurescript/clj.js b/clojurescript/clj.js index b5c1a84e..79f3721e 100644 --- a/clojurescript/clj.js +++ b/clojurescript/clj.js @@ -644,6 +644,11 @@ clojure.JS.defclass( clojure.lang, "Var", { this.push( val ); }, hasRoot: function() { return this.stack.length > 0; }, + toString: function() { + if( this.ns !== null ) + return "#=(var " + this.ns.name + "/" + this.name + ")"; + return "#<Var: " + (this.name !== null ? this.name : "--unnamed--") + ">"; + }, hashCode: function() { return clojure.lang.Util.hash( this.ns + "/" + this.name ); } @@ -1926,6 +1931,8 @@ clojure.lang.Namespace.prototype.hashCode = function() { return clojure.hash( this.name ); }; +clojure.in_ns("'user"); + (function() { var buf = []; function write(s) { |