Bug #5154

method_missing and module scope, regression in 1.9.3

Added by hemant kumar over 2 years ago. Updated over 2 years ago.

[ruby-core:38739]
Status:Closed
Priority:High
Assignee:Yukihiro Matsumoto
Category:core
Target version:1.9.3
ruby -v:ruby 1.9.3dev (2011-07-31 revision 32789) [x86_64-darwin10.8.0] Backport:

Description

There is this bug against, factory_girl, for complete story

https://github.com/thoughtbot/factory_girl/issues/167

A minimum reproducible case is:

module Something
module Another
def self.great
puts "great was called"
end
end
end

include Something

module Another
def self.method_missing(name, *args, &block)
p "method missing: #{name}"
end
end

Another.great()

In Ruby 1.9.2 the output is @great was called@ and with Ruby 1.9.3 @method missing: great@.


Related issues

Duplicates ruby-trunk - Bug #3422: Object.const_get(:A, false) can access BasicObject::A Closed 06/11/2010
Duplicates ruby-trunk - Bug #5143: include not properly registering modular methods Closed 08/02/2011

History

#1 Updated by Motohiro KOSAKI over 2 years ago

  • Category set to core
  • Status changed from Open to Assigned
  • Assignee set to Yukihiro Matsumoto
  • Priority changed from Normal to High

#2 Updated by Nobuyoshi Nakada over 2 years ago

  • Status changed from Assigned to Closed

Also available in: Atom PDF