From: cardoso_tiago@... Date: 2016-06-22T15:09:52+00:00 Subject: [ruby-core:76103] [Ruby trunk Bug#12514] Refinements: when including Module as refinement, can't call other module methods Issue #12514 has been reported by Tiago Cardoso. ---------------------------------------- Bug #12514: Refinements: when including Module as refinement, can't call other module methods https://bugs.ruby-lang.org/issues/12514 * Author: Tiago Cardoso * Status: Open * Priority: Normal * Assignee: * ruby -v: * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- Very simple script which reproduces the problem:
module Extensions def vegetables ; potatoe ; end def potatoe ; "potatoe" ; end end module Refinary refine String do # this doesn't work include Extensions # this would work... # def vegetables ; potatoe ; end # def potatoe ; "potatoe" ; end end end using Refinary puts "tomatoe".vegetables #=> in `failing from ruby 2.0 to 2.3 -- https://bugs.ruby-lang.org/ Unsubscribe:': undefined method `vegetables' for "tomatoe":String