Bug #4502

strange behaviour

Added by evilbrain (Andy Bogdanov) over 9 years ago. Updated over 7 years ago.

Target version:
ruby -v:
ruby 1.9.1p430 (2010-08-16 revision 28998) [i386-mingw32]


First I create a proc:
p = proc {
self::X =
def self.X
Then I create a module:
A =
puts A.X # => #
Then I create another module:
B =
puts B.X # => #
Everything seems to be ok. But after module B was created (({A.X})) started to return instances of (({B::X}))
puts A.X # => #

When (({})) is used instead of (({})) everything works as expected.

More info can be found here

Updated by shyouhei (Shyouhei Urabe) over 9 years ago

  • Status changed from Open to Assigned
  • Assignee set to ko1 (Koichi Sasada)




Updated by ko1 (Koichi Sasada) over 9 years ago

  • Target version set to 2.0.0

This issue have complex problems. I'll fix it 1.9.4 or later.

Updated by ko1 (Koichi Sasada) almost 8 years ago

  • Assignee changed from ko1 (Koichi Sasada) to nobu (Nobuyoshi Nakada)

nobu, could you check it?
I think you tried something like this issue.

Updated by nobu (Nobuyoshi Nakada) almost 8 years ago

With latest version, A.X occurs NameError instead of returning B::X.

Updated by nobu (Nobuyoshi Nakada) over 7 years ago

  • Status changed from Assigned to Closed

Also available in: Atom PDF