aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 7169a0f7c1..b4db670b74 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -733,6 +733,14 @@ vm_check_if_namespace(VALUE klass)
}
}
+static inline void
+vm_ensure_not_refinement_module(VALUE self)
+{
+ if (RB_TYPE_P(self, T_MODULE) && FL_TEST(self, RMODULE_IS_REFINEMENT)) {
+ rb_warn("not defined at the refinement, but at the outer class/module");
+ }
+}
+
static inline VALUE
vm_get_iclass(rb_control_frame_t *cfp, VALUE klass)
{