aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/defs.js2
-rw-r--r--src/lauxlib.js2
-rw-r--r--src/lstring.js2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/defs.js b/src/defs.js
index c836f07..e5ffe35 100644
--- a/src/defs.js
+++ b/src/defs.js
@@ -159,7 +159,7 @@ const is_luastring = function(s) {
/* test two lua strings for equality */
const luastring_eq = function(a, b) {
- return a === b || (a.length === b.length && a.join() === b.join());
+ return a === b || (a.length === b.length && a.toString() === b.toString());
};
const to_jsstring = function(value, from, to) {
diff --git a/src/lauxlib.js b/src/lauxlib.js
index 7f491e1..e94b886 100644
--- a/src/lauxlib.js
+++ b/src/lauxlib.js
@@ -154,7 +154,7 @@ const luaL_argerror = function(L, arg, extramsg) {
lua.lua_getinfo(L, lua.to_luastring("n"), ar);
- if (ar.namewhat.join() === lua.to_luastring("method").join()) {
+ if (ar.namewhat.toString() === lua.to_luastring("method").toString()) { /* TODO: luastring_eq? */
arg--; /* do not count 'self' */
if (arg === 0) /* error is in the self argument itself? */
return luaL_error(L, lua.to_luastring("calling '%s' on bad self (%s)"), ar.name, extramsg);
diff --git a/src/lstring.js b/src/lstring.js
index c145b53..84754f0 100644
--- a/src/lstring.js
+++ b/src/lstring.js
@@ -31,7 +31,7 @@ const luaS_eqlngstr = function(a, b) {
make sure this doesn't conflict with any of the anti-collision strategies in ltable */
const luaS_hash = function(str) {
assert(defs.is_luastring(str));
- return '|'+str.join('|');
+ return '|'+str.toString();
};
const luaS_hashlongstr = function(ts) {