topazproject / topaz

A high performance ruby, written in RPython
topazruby.com
BSD 3-Clause "New" or "Revised" License
1k stars 85 forks source link

Constant lookup bug #199

Closed alex closed 11 years ago

alex commented 12 years ago

I'm not sure what the underlying cause is, but inside of rubyspec, any spec which defines a class, looking up that class doesn't work.

alex commented 12 years ago

Found it, the cause is the difference between lexical_scope and w_scope in instance_eval. Not yet sure what the correct fix is:

module M
    C = proc {
        class X
        end 
        X   
    }   
end

class T
end

t = T.new
t.instance_eval(&M::C)
alex commented 11 years ago

@timfel do you have a sense of what the correct fix (I'm thinking part of it will be to unify lexical_scope and w_scope)? This is blocking a ton of specs, so I want to make it my number one priority.

alex commented 11 years ago

Fixed wtih the scope-cleanup branch.