Assignee changed from matz (Yukihiro Matsumoto) to shugo (Shugo Maeda)
At the developers meeting on 2011-11-18, Matz accepted the following changes in Ruby 3.2:
Undefine extend_object, append_features, prepend_features in Refinement.
extend, include, and prepend raise a TypeError if the given argument is a Refinement as in the case the argument is a Class.
No warnings will be added in Ruby 3.1, because append_features etc. currently already raises ArgumentError.
excelsior:ruby$ ruby -e 'class Foo; end; module Bar; refine Integer do append_features(Foo); end; end'
-e:1:in `append_features': refinement module is not allowed (ArgumentError)
from -e:1:in `block in <module:Bar>'
from -e:1:in `refine'
from -e:1:in `<module:Bar>'
from -e:1:in `<main>'
Sounds good.
Could you please add tests in ruby/spec to track those changes, under core/refinement?
The structure can be generated with ../mspec/bin/mkspec -b core -c Refinement.
Could you please add tests in ruby/spec to track those changes, under core/refinement?
The structure can be generated with ../mspec/bin/mkspec -b core -c Refinement.
OK, I'll add tests after implementing these changes after the release of Ruby 3.1.