Remove unused RMODULE_INCLUDED_INTO_REFINEMENT flag

This commit is contained in:
Jemma Issroff 2022-05-23 13:57:40 -04:00 committed by Aaron Patterson
parent adc709adb8
commit 33fdff3c30
Notes: git 2022-05-27 04:09:26 +09:00
2 changed files with 0 additions and 38 deletions

View File

@ -1274,7 +1274,6 @@ do_include_modules_at(const VALUE klass, VALUE c, VALUE module, int search_super
rb_id_table_foreach(RCLASS_M_TBL(module), add_refined_method_entry_i, (void *)refined_class); rb_id_table_foreach(RCLASS_M_TBL(module), add_refined_method_entry_i, (void *)refined_class);
RUBY_ASSERT(BUILTIN_TYPE(c) == T_MODULE); RUBY_ASSERT(BUILTIN_TYPE(c) == T_MODULE);
FL_SET(c, RMODULE_INCLUDED_INTO_REFINEMENT);
} }
tbl = RCLASS_CONST_TBL(module); tbl = RCLASS_CONST_TBL(module);

View File

@ -27,7 +27,6 @@
/** @cond INTERNAL_MACRO */ /** @cond INTERNAL_MACRO */
#define RMODULE_IS_REFINEMENT RMODULE_IS_REFINEMENT #define RMODULE_IS_REFINEMENT RMODULE_IS_REFINEMENT
#define RMODULE_INCLUDED_INTO_REFINEMENT RMODULE_INCLUDED_INTO_REFINEMENT
/** @endcond */ /** @endcond */
/** /**
@ -60,42 +59,6 @@ enum ruby_rmodule_flags {
* difference between normal inclusion versus refinements. * difference between normal inclusion versus refinements.
*/ */
RMODULE_IS_REFINEMENT = RUBY_FL_USER3, RMODULE_IS_REFINEMENT = RUBY_FL_USER3,
/**
* This flag has something to do with refinements. This is set when a
* (non-refinement) module is included into another module, which is a
* refinement. This amends the way `super` searches for a super method.
*
* ```ruby
* class Foo
* def foo
* "Foo"
* end
* end
*
* module Bar
* def foo
* "[#{super}]" # this
* end
* end
*
* module Baz
* refine Foo do
* include Bar
* def foo
* "<#{super}>"
* end
* end
* end
*
* using Baz
* Foo.new.foo # => "[<Foo>]"
* ```
*
* The `super` marked with "this" comment shall look for overlaid
* `Foo#foo`, which is not the ordinal method lookup direction.
*/
RMODULE_INCLUDED_INTO_REFINEMENT = RUBY_FL_USER4
}; };
struct RClass; /* Opaque, declared here for RCLASS() macro. */ struct RClass; /* Opaque, declared here for RCLASS() macro. */