summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorAlan Wu <alanwu@ruby-lang.org>2020-11-25 17:05:06 -0500
committerAlan Wu <alanwu@ruby-lang.org>2020-11-25 17:05:06 -0500
commite0944bde9178fda7281717a159d0ffbfd3154f47 (patch)
treef1640da9a1f3207f36fa4530d83c8358b362b190 /vm_insnhelper.c
parent526d0f46f3c6de931ecb1d7c3d5f089a9e2c8074 (diff)
Prefer rb_module_new() over rb_define_module_id()
rb_define_module_id() doesn't do anything with its parameter so it's a bit confusing.
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 4f5d18a355..b6ad18cd51 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -4043,7 +4043,7 @@ static VALUE
vm_declare_module(ID id, VALUE cbase)
{
/* new module declaration */
- return declare_under(id, cbase, rb_define_module_id(id));
+ return declare_under(id, cbase, rb_module_new());
}
NORETURN(static void unmatched_redefinition(const char *type, VALUE cbase, ID id, VALUE old));