Bug #5143

include not properly registering modular methods

Added by Quinn Chaffee over 2 years ago. Updated over 2 years ago.

[ruby-core:38690]
Status:Closed
Priority:Normal
Assignee:-
Category:-
Target version:1.9.3
ruby -v:1.9.3-preview1 Backport:

Description

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

History

#1 Updated by Nobuyoshi Nakada over 2 years ago

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

Also available in: Atom PDF