aboutsummaryrefslogtreecommitdiffstats
path: root/proc.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-09-23 17:42:27 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-09-30 10:26:38 +0900
commit595b3c4fddc5cde58add2fa2637acb2664694194 (patch)
tree6a77f258999c267804556506a7fef3751ed44af8 /proc.c
parent1521f7cf89fe3cf356a589c45bce4ccb57dce7fd (diff)
downloadruby-595b3c4fddc5cde58add2fa2637acb2664694194.tar.gz
refactor rb_method_definition_create take opts
Before this changeset rb_method_definition_create only allocated a memory region and we had to destructively initialize it later. That is not a good design so we change the API to return a complete struct instead.
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/proc.c b/proc.c
index 496baa41f1..465135d505 100644
--- a/proc.c
+++ b/proc.c
@@ -15,7 +15,7 @@
#include "vm_core.h"
#include "iseq.h"
-extern const rb_method_definition_t *rb_method_definition_create(rb_method_type_t type, ID mid);
+extern const rb_method_definition_t *rb_method_definition_create(rb_method_type_t type, ID mid, const void *opts);
/* Proc.new with no block will raise an exception in the future
* versions */
@@ -1482,7 +1482,7 @@ mnew_missing(VALUE klass, VALUE obj, ID id, VALUE mclass)
RB_OBJ_WRITE(method, &data->recv, obj);
RB_OBJ_WRITE(method, &data->klass, klass);
- def = rb_method_definition_create(VM_METHOD_TYPE_MISSING, id);
+ def = rb_method_definition_create(VM_METHOD_TYPE_MISSING, id, NULL);
me = rb_method_entry_create(id, klass, METHOD_VISI_UNDEF, def);
RB_OBJ_WRITE(method, &data->me, me);