[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Bizarre behavior with debug.setupvalue() in Lua 5.3
- From: Sean Conner <sean@...>
- Date: Sat, 28 Mar 2015 00:41:33 -0400
It was thus said that the Great Dirk Laurie once stated:
> 2015-03-28 6:05 GMT+02:00 Sean Conner <sean@conman.org>:
>
> > Then perhaps I have the wrong mental image of how upvalues work in Lua,
> > because it's doing things I don't expect.
> >
> > Okay, explain to me like I'm five how this works.
>
> I'll start on it right now, but while I do that, you can
> in the meantime check whether the answer is maybe
> already in here:
>
> https://github.com/dlaurie/lua-notes/blob/master/upvalues.html
Not quite. You come close in the "Modifying upvalues from the calling
program" section, but I wasn't expecting the _ENV upvalue to be shared quite
so promiscously.
-spc