bug in `dofile'

This commit is contained in:
Roberto Ierusalimschy 2004-03-15 18:09:55 -03:00
parent 48a8d78102
commit 8e1f25e3f8
1 changed files with 34 additions and 4 deletions

38
bugs
View File

@ -450,11 +450,17 @@ pcall(co)
report = [[Nick Trout, 07/07/2003]],
patch = [[
* lvm.c:
402d401
402,403c402,403
< L->ci->u.l.pc = &pc;
405a405
< if (L->hookmask & LUA_MASKCALL)
---
> if (L->hookmask & LUA_MASKCALL) {
> L->ci->u.l.pc = &pc;
404a405
> }
405a407
> L->ci->u.l.pc = &pc;
676,678c676
676,678c678
< lua_assert(ci->u.l.pc == &pc &&
< ttisfunction(ci->base - 1) &&
< (ci->state & CI_SAVEDPC));
@ -579,7 +585,7 @@ patch = [[
}
Bugs = {
Bug{
what = [[count hook may be called without being set]],
@ -603,3 +609,27 @@ patch = [[
]],
}
Bug{
what = [[`dofile' eats one return value when called without arguments]],
report = [[Frederico Abraham, 15/01/2004]],
example = [[
a,b = dofile() --< here you enter `return 1,2,3 <eof>'
print(a,b) --> 2 3 (should be 1 and 2)
]],
patch = [[
* lbaselib.c:
313a314
> int n = lua_gettop(L);
317c318
< return lua_gettop(L) - 1;
---
> return lua_gettop(L) - n;
]],
}