Project

General

Profile

Actions

Bug #4994

closed

DelegateClass don't find extern global public method in 1.9.2

Added by sylvain303 (Sylvain Viart) almost 13 years ago. Updated over 12 years ago.

Status:
Rejected
Assignee:
-
Target version:
ruby -v:
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
Backport:
[ruby-core:37864]

Description

How to reproduce:

require 'delegate'
require 'pp'

def test_that?(str)
    str.size > 0
end

class String2 

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

Also available in: Atom PDF

Like0
Like0Like0Like0Like0