From: 7stud -- Date: 2011-08-04T23:35:20+09:00 Subject: Re: Kernel.load and local scope Mark Beek wrote in post #1014954: > Thanks, that confirms my suspicions. > > I wonder why this is rarely mentioned in books and articles on Ruby > scope, even the best. For example, here's a quote from a great Ruby book > I'm reading now (emphasis mine): > > "There are *exactly* three places where a program leaves the previous > scope behind and opens a new one: > > Class definitions > Module definitions > Methods" > > That's why I thought there might be some force at work other than > scoping mechanisms. One could argue that calling load() does not 'open' a new scope. load() leaves the current scope and then returns, but did load() 'open' a new scope for you to write code in? I know what book that is. :) -- Posted via http://www.ruby-forum.com/.