Bug #4502

strange behaviour

Added by evilbrain (Andy Bogdanov) about 7 years ago. Updated about 5 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


#1 [ruby-core:35580] Updated by shyouhei (Shyouhei Urabe) almost 7 years ago

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



#2 Updated by ko1 (Koichi Sasada) almost 7 years ago

  • Target version set to 2.0.0

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

#3 [ruby-core:50122] Updated by ko1 (Koichi Sasada) over 5 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.

#4 [ruby-core:51178] Updated by nobu (Nobuyoshi Nakada) about 5 years ago

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

#5 [ruby-core:51717] Updated by nobu (Nobuyoshi Nakada) about 5 years ago

  • Status changed from Assigned to Closed

Also available in: Atom PDF