File tree 1 file changed +1
-7
lines changed
1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -825,20 +825,14 @@ VALUE
825
825
rb_include_class_new (VALUE module , VALUE super )
826
826
{
827
827
VALUE klass = class_alloc (T_ICLASS , rb_cClass );
828
- RCLASS_SET_ORIGIN (klass , klass );
829
828
830
829
RCLASS_M_TBL (OBJ_WB_UNPROTECT (klass )) =
831
830
RCLASS_M_TBL (OBJ_WB_UNPROTECT (module )); /* TODO: unprotected? */
832
831
832
+ RCLASS_SET_ORIGIN (klass , module == RCLASS_ORIGIN (module ) ? klass : RCLASS_ORIGIN (module ));
833
833
if (BUILTIN_TYPE (module ) == T_ICLASS ) {
834
- if (module != RCLASS_ORIGIN (module )) {
835
- RCLASS_SET_ORIGIN (klass , RCLASS_ORIGIN (module ));
836
- }
837
834
module = RBASIC (module )-> klass ;
838
835
}
839
- else if (module != RCLASS_ORIGIN (module )) {
840
- RCLASS_SET_ORIGIN (klass , RCLASS_ORIGIN (module ));
841
- }
842
836
if (!RCLASS_IV_TBL (module )) {
843
837
RCLASS_IV_TBL (module ) = st_init_numtable ();
844
838
}
You can’t perform that action at this time.
0 commit comments