Project

General

Profile

Actions

Bug #18385

closed

Refinement#import_methods(Enumerable) doesn't work

Added by zverok (Victor Shepelev) almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Target version:
-
[ruby-core:106483]

Description

Very simple to reproduce:

module M
  refine String do
    import_methods Enumerable
  end
end

Leads to: import_methods': Can't import method: Enumerable#drop (ArgumentError)
Which, grepping through code, seems to be raised here but I am not versed enough in Ruby internals to debug further.

An attempt to import_methods Comparable leads to the same problem, BTW: Can't import method: Comparable#between?

Am I missing something crucial about import_method behavior?

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0