Bug #5143

include not properly registering modular methods

Added by Quinn Chaffee over 4 years ago. Updated about 4 years ago.

ruby -v:1.9.3-preview1 Backport:


Ran into a bug when using a gem called FactoryGirl. The bug has to do with how 1.9.3 handles handles module inclusion, scope, and method_missing.

Here's a gist: https://gist.github.com/1119516 Where method missing is called, it's because the module Another, while included and referencing Something::Another, doesn't find the method when it should. (quote joshuaclayton)

If you need to dig in deeper to the specific issue, this github thread (https://github.com/thoughtbot/factory_girl/issues/167#issuecomment-1706227) goes into greater background detail.

Related issues

Duplicates Ruby trunk - Bug #3422: Object.const_get(:A, false) can access BasicObject::A Closed 06/11/2010
Duplicated by Ruby trunk - Bug #5154: method_missing and module scope, regression in 1.9.3 Closed 08/03/2011


#1 Updated by Nobuyoshi Nakada about 4 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF