From: "Martin J. Dürst" Date: 2015-03-13T12:06:26+09:00 Subject: [ruby-core:68513] Re: Seven stacks (and two questions) Hello Jakub, On 2015/03/12 22:00, Nobuyoshi Nakada wrote: > On 2015/03/12 19:15, Jakub Trzebiatowski wrote: >> The Ruby Hacking Guide says that Ruby has��� seven stacks. Is it an >> implementation choice (and it could be implemented with one stack), >> or is there really a need for seven logical stacks? For example, Lua >> has one stack, and still closures with upvalues are totally possible >> (it���s like Ruby���s blocks that can reference local variables of >> their enclosing method, but it works for any function with any >> upvalues). > > RHG is a good book, but quite old for the core implementation. I suggest you look at "Ruby Under a Microscope: An Illustrated Guide to Ruby Internals". It's much less detailed than the Ruby Hacking Guide, but much more up to date. And as far as I can remember, it talks about 2 stacks, not seven. Regards, Martin.