diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-03-15 18:09:55 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-03-15 18:09:55 -0300 |
commit | 8e1f25e3f80bbefbbd1e3de20caf255b95b4d9d6 (patch) | |
tree | 57d5f2fd691131200168cc63baf6287e16cb51f6 | |
parent | 48a8d781020ec86e9870cdca2f5276b30cd20fa4 (diff) | |
download | lua-8e1f25e3f80bbefbbd1e3de20caf255b95b4d9d6.tar.gz lua-8e1f25e3f80bbefbbd1e3de20caf255b95b4d9d6.tar.bz2 lua-8e1f25e3f80bbefbbd1e3de20caf255b95b4d9d6.zip |
bug in `dofile'
-rw-r--r-- | bugs | 38 |
1 files changed, 34 insertions, 4 deletions
@@ -450,11 +450,17 @@ pcall(co) | |||
450 | report = [[Nick Trout, 07/07/2003]], | 450 | report = [[Nick Trout, 07/07/2003]], |
451 | patch = [[ | 451 | patch = [[ |
452 | * lvm.c: | 452 | * lvm.c: |
453 | 402d401 | 453 | 402,403c402,403 |
454 | < L->ci->u.l.pc = &pc; | 454 | < L->ci->u.l.pc = &pc; |
455 | 405a405 | 455 | < if (L->hookmask & LUA_MASKCALL) |
456 | --- | ||
457 | > if (L->hookmask & LUA_MASKCALL) { | ||
458 | > L->ci->u.l.pc = &pc; | ||
459 | 404a405 | ||
460 | > } | ||
461 | 405a407 | ||
456 | > L->ci->u.l.pc = &pc; | 462 | > L->ci->u.l.pc = &pc; |
457 | 676,678c676 | 463 | 676,678c678 |
458 | < lua_assert(ci->u.l.pc == &pc && | 464 | < lua_assert(ci->u.l.pc == &pc && |
459 | < ttisfunction(ci->base - 1) && | 465 | < ttisfunction(ci->base - 1) && |
460 | < (ci->state & CI_SAVEDPC)); | 466 | < (ci->state & CI_SAVEDPC)); |
@@ -579,7 +585,7 @@ patch = [[ | |||
579 | } | 585 | } |
580 | 586 | ||
581 | 587 | ||
582 | Bugs = { | 588 | Bug{ |
583 | 589 | ||
584 | what = [[count hook may be called without being set]], | 590 | what = [[count hook may be called without being set]], |
585 | 591 | ||
@@ -603,3 +609,27 @@ patch = [[ | |||
603 | ]], | 609 | ]], |
604 | 610 | ||
605 | } | 611 | } |
612 | |||
613 | |||
614 | Bug{ | ||
615 | |||
616 | what = [[`dofile' eats one return value when called without arguments]], | ||
617 | |||
618 | report = [[Frederico Abraham, 15/01/2004]], | ||
619 | |||
620 | example = [[ | ||
621 | a,b = dofile() --< here you enter `return 1,2,3 <eof>' | ||
622 | print(a,b) --> 2 3 (should be 1 and 2) | ||
623 | ]], | ||
624 | |||
625 | patch = [[ | ||
626 | * lbaselib.c: | ||
627 | 313a314 | ||
628 | > int n = lua_gettop(L); | ||
629 | 317c318 | ||
630 | < return lua_gettop(L) - 1; | ||
631 | --- | ||
632 | > return lua_gettop(L) - n; | ||
633 | ]], | ||
634 | |||
635 | } | ||