From: "shugo (Shugo Maeda)" Date: 2021-11-18T06:14:56+00:00 Subject: [ruby-core:106117] [Ruby master Feature#18270] Refinement#{extend_object, append_features, prepend_features} should be removed 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 ' from -e:1:in `refine' from -e:1:in `' from -e:1:in `
' ``` ---------------------------------------- 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: