@@ -1346,9 +1346,9 @@ rb_using_module(const rb_cref_t *cref, VALUE module)
13461346
13471347/*
13481348 * call-seq:
1349- * refined_class -> class
1349+ * target -> class
13501350 *
1351- * Return the class refined by the receiver.
1351+ * Return the class or module refined by the receiver.
13521352 */
13531353VALUE
13541354rb_refinement_module_get_refined_class (VALUE module )
@@ -1359,6 +1359,19 @@ rb_refinement_module_get_refined_class(VALUE module)
13591359 return rb_attr_get (module , id_refined_class );
13601360}
13611361
1362+ /*
1363+ * call-seq:
1364+ * refined_class -> class
1365+ *
1366+ * Return the class refined by the receiver.
1367+ */
1368+ static VALUE
1369+ rb_refinement_refined_class (VALUE module )
1370+ {
1371+ rb_warn_deprecated_to_remove ("3.4" , "Refinement#refined_class" , "Refinement#target" );
1372+ return rb_refinement_module_get_refined_class (module );
1373+ }
1374+
13621375static void
13631376add_activated_refinement (VALUE activated_refinements ,
13641377 VALUE klass , VALUE refinement )
@@ -2067,7 +2080,8 @@ Init_eval(void)
20672080 rb_mod_s_used_refinements , 0 );
20682081 rb_undef_method (rb_cClass , "refine" );
20692082 rb_define_private_method (rb_cRefinement , "import_methods" , refinement_import_methods , -1 );
2070- rb_define_method (rb_cRefinement , "refined_class" , rb_refinement_module_get_refined_class , 0 );
2083+ rb_define_method (rb_cRefinement , "target" , rb_refinement_module_get_refined_class , 0 );
2084+ rb_define_method (rb_cRefinement , "refined_class" , rb_refinement_refined_class , 0 );
20712085 rb_undef_method (rb_cRefinement , "append_features" );
20722086 rb_undef_method (rb_cRefinement , "prepend_features" );
20732087 rb_undef_method (rb_cRefinement , "extend_object" );
0 commit comments