summaryrefslogtreecommitdiff
path: root/src/liolib.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-01-22 11:28:02 +1100
committerdaurnimator <quae@daurnimator.com>2018-01-22 11:28:02 +1100
commitdaeddc461166692743368eb9e68aa041f3994714 (patch)
tree283e86e19a70495d227f2501fce2c0e8b30fbfe0 /src/liolib.js
parentedafa230fd74d06ec5f292c7ba471c932942a7c1 (diff)
downloadfengari-daeddc461166692743368eb9e68aa041f3994714.tar.gz
fengari-daeddc461166692743368eb9e68aa041f3994714.tar.bz2
fengari-daeddc461166692743368eb9e68aa041f3994714.zip
src/l*lib.js: Use lualib.lua_assert from standard library
Diffstat (limited to 'src/liolib.js')
-rw-r--r--src/liolib.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liolib.js b/src/liolib.js
index 6a5e895..bd78f87 100644
--- a/src/liolib.js
+++ b/src/liolib.js
@@ -1,6 +1,5 @@
"use strict";
-const assert = require('assert');
const fs = require('fs');
const {
@@ -32,6 +31,7 @@ const {
luaL_setmetatable,
luaL_testudata
} = require('./lauxlib.js');
+const lualib = require('./lualib.js');
const { to_luastring } = require("./fengaricore.js");
const IO_PREFIX = "_IO_";
@@ -72,7 +72,7 @@ const tofile = function(L) {
let p = tolstream(L);
if (isclosed(p))
luaL_error(L, to_luastring("attempt to use a closed file"));
- assert(p.f);
+ lualib.lua_assert(p.f);
return p.f;
};