Skip to content

Conversation

@kohkimakimoto
Copy link
Contributor

Fixes #67 .

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 92.379% when pulling 98b2068 on kohkimakimoto:fix-bug-dofile into b5ca24a on yuin:master.

@kohkimakimoto
Copy link
Contributor Author

To fix the issue, I updated code in the two places.
I tested this code by using glua. I got the below result.

a.lua

dofile "b.lua"

b.lua

error("error!")
$ glua a.lus
b.lua:1: error!
stack traceback:
    [G]: in function 'error'
    b.lua:1: in function <b.lua:0>
    [G]: in function 'dofile'
    a.lua:1: in main chunk
    [G]: ?

Please merge it if you want.

@yuin
Copy link
Owner

yuin commented Apr 25, 2016

Thanks for your PR.

But it seems just dofile bug. Lua reference manual says "that is, dofile does not run in protected mode" .
So I've changed PCall to Call in dofile .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants