Actions
Bug #12514
closedRefinements: when including Module as refinement, can't call other module methods
Bug #12514:
Refinements: when including Module as refinement, can't call other module methods
Description
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 `': undefined method `vegetables' for "tomatoe":String
failing from ruby 2.0 to 2.3
Actions