Is this expected, or a bug? Seems like a bug to me, but I couldn't
find a bug in Bugzilla (possibly because Bugzilla search and I don't
get along well).
js> printStuff = function(str) { print("value="+str+" typeof="+
(typeof str)) }
...
js> String.prototype.printStuff = function() { print("value="+this
+" typeof="+(typeof this)) }
...
js> a = "foo";
foo
js> printStuff(a);
value=foo typeof=string
js> a.printStuff()
value=foo typeof=object
Same with Numbers and Booleans. My solution is to wrap "this" in a
call to String, etc. Not sure if there's a better workaround.
(Rhino 1.7 release 2 PRERELEASE 2008 07 28)
Thanks,
Tom
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino