XmiliaH
XmiliaH
This is currently not supported. The `customRequire` is not used for resolving the files but the filesystem is currently used.
Like the comment says `Custom require to require host and built-in modules.` this option can be used to require host or built-in modules. In your case the module is not...
Sorry, I was wrong here. Only actual built-ins are allowed in the `builtin` option. Since `customRequire` is not really documented (only for typescript, not in the readme) you could use...
Since it is currently not possible to give strings as sources instead of loading from files I would do it like this: ```js const { NodeVM, VMScript } = require('vm2');...
This are known [issues](https://github.com/patriksimek/vm2#known-issues).
I don't see a problem with moving https://github.com/dibyendumajumdar/ravi/blob/b0a5b0114230624a58d5aabc923d3128b835bf48/src/lcode.c#L616-L620 out of the `if` to https://github.com/dibyendumajumdar/ravi/blob/b0a5b0114230624a58d5aabc923d3128b835bf48/src/lcode.c#L630 But I don' know your code better then you.
> ravi generates special bytecodes for integer/number types when annotated > You can see by running: > > ``` > ravi.dumplua(function) > ``` > > There are no NIL checks...
> If `n` is not specified, you will try to sum `b` and `nil`. That was intended to show that in such cases the unoptimized `ADD` instruction is used. It...
All of the code seems to be correct. For the second case `ADD_II` can be used since `n or 0` will be an integer and never nil. However, the `TOIARRAY`...
The existing ones are patched to not allow nil any more. See the patch supplied in https://github.com/dibyendumajumdar/ravi/issues/223#issuecomment-844675753.