summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-08-26 13:30:04 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-08-27 15:52:26 +0900
commit7329b3339adab12092056bd8159513645d4f9e8a (patch)
tree0a9f5e23d07b47b4b459077ccb2c963dbac8dc41 /enum.c
parent0c8592b9af304dfcac0d08ba96d5f22ad8312e1a (diff)
#define RB_BLOCK_CALL_FUNC_STRICT 1
After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. Let's start from making rb_block_call_func_t strict, and apply RB_BLOCK_CALL_FUNC_ARGLIST liberally.
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/enum.c b/enum.c
index bae32cb..665c97f 100644
--- a/enum.c
+++ b/enum.c
@@ -1535,7 +1535,7 @@ nmin_filter(struct nmin_data *data)
}
static VALUE
-nmin_i(VALUE i, VALUE *_data, int argc, VALUE *argv)
+nmin_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, _data))
{
struct nmin_data *data = (struct nmin_data *)_data;
VALUE cmpv;
@@ -1595,7 +1595,7 @@ rb_nmin_run(VALUE obj, VALUE num, int by, int rev, int ary)
for (i = 0; i < RARRAY_LEN(obj); i++) {
VALUE args[1];
args[0] = RARRAY_AREF(obj, i);
- nmin_i(obj, (VALUE*)&data, 1, args);
+ nmin_i(obj, (VALUE)&data, 1, args, Qundef);
}
}
else {