banister / include_complete

Fixing the limitations in traditional Module#include
19 stars 0 forks source link

Constant lookup doesn't work #5

Closed banister closed 14 years ago

banister commented 14 years ago
module A
  J = 5
end

module B
  real_include A
end

B::J #=> NameError
banister commented 14 years ago

should work now! problem was a silly bug that used RCLASS_IV_TBL(klass) instead of RCLASS_IV_TBL(meta) - so was creating a new IV_TBL for klass when it should have just been pointing at the IV_TBL of the module itself (where the constants are stored).