Actions
Bug #4994
closedDelegateClass don't find extern global public method in 1.9.2
    Bug #4994:
    DelegateClass don't find extern global public method in 1.9.2
  
Description
How to reproduce:
require 'delegate'
require 'pp'
def test_that?(str)
    str.size > 0
end
class String2 < DelegateClass(String)
    def initialize(*param)
        @s = String.new(*param)
        super(@s)
    end
    def dummy
        test_that?(@s)
    end
end
s2 = String2.new("pipo")
pp s2.dummy
The code above works under 1.9.1 and 1.8 but not under 1.9.2
- ruby1.9.1 -v => ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux]
 - ruby1.8 -v => ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
 - ruby -v => ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
 
error message:
!ruby draft/tdelegate.rb
draft/tdelegate.rb:15:in `dummy': undefined method `test_that?' for "pipo":String2 (NoMethodError)
        from draft/tdelegate.rb:21:in `'
shell returned 1
  
Actions