rb_scan_args
never fills optional arguments with Qundef
This commit is contained in:
parent
883871d722
commit
8ee604b9d4
Notes:
git
2023-03-06 04:57:38 +00:00
4
re.c
4
re.c
@ -3937,11 +3937,11 @@ reg_extract_args(int argc, VALUE *argv, struct reg_init_args *args)
|
|||||||
str = RREGEXP_SRC(re);
|
str = RREGEXP_SRC(re);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!UNDEF_P(opts)) {
|
if (!NIL_P(opts)) {
|
||||||
int f;
|
int f;
|
||||||
if (FIXNUM_P(opts)) flags = FIX2INT(opts);
|
if (FIXNUM_P(opts)) flags = FIX2INT(opts);
|
||||||
else if ((f = str_to_option(opts)) >= 0) flags = f;
|
else if ((f = str_to_option(opts)) >= 0) flags = f;
|
||||||
else if (!NIL_P(opts) && rb_bool_expected(opts, "ignorecase", FALSE))
|
else if (rb_bool_expected(opts, "ignorecase", FALSE))
|
||||||
flags = ONIG_OPTION_IGNORECASE;
|
flags = ONIG_OPTION_IGNORECASE;
|
||||||
}
|
}
|
||||||
str = StringValue(src);
|
str = StringValue(src);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user