Actions
Bug #18799
closedRefinement#import_methods vs attr_reader
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x86_64-darwin21]
Description
Currently, it's not possible to import methods defined as attr_{reader, accessor,writer}:
module M
attr_reader :fuu
end
module R
refine Object do
import_methods M
end
end
#=> Can't import method which is not defined with Ruby code: M#fuu (ArgumentError)
Is that a known/intentional limitation or a bug? From the error message it might seem that this is a bug (since attr_smth
is a Ruby code).
Actions
Like0
Like0Like0Like0Like0