Issue #18270 has been updated by shugo (Shugo Maeda).

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>'
```


----------------------------------------
Feature #18270: Refinement#{extend_object,append_features,prepend_features} should be removed
https://bugs.ruby-lang.org/issues/18270#change-94714

* Author: shugo (Shugo Maeda)
* Status: Assigned
* Priority: Normal
* Assignee: shugo (Shugo Maeda)
----------------------------------------
Refinement#{extend_object,append_features,prepend_features} are not useful and should be removed.

How about to deprecate them in Ruby 3.1 and remove in Ruby 3.1?




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>