Made glob option keyword IDs static
This commit is contained in:
parent
79f0ed3529
commit
eb96e4e981
8
dir.c
8
dir.c
@ -2755,10 +2755,12 @@ dir_globs(long argc, const VALUE *argv, VALUE base, int flags)
|
|||||||
static void
|
static void
|
||||||
dir_glob_options(VALUE opt, VALUE *base, int *flags)
|
dir_glob_options(VALUE opt, VALUE *base, int *flags)
|
||||||
{
|
{
|
||||||
ID kw[2];
|
static ID kw[2];
|
||||||
VALUE args[2];
|
VALUE args[2];
|
||||||
kw[0] = rb_intern("base");
|
if (!kw[0]) {
|
||||||
if (flags) kw[1] = rb_intern("flags");
|
kw[0] = rb_intern_const("base");
|
||||||
|
kw[1] = rb_intern_const("flags");
|
||||||
|
}
|
||||||
rb_get_kwargs(opt, kw, 0, flags ? 2 : 1, args);
|
rb_get_kwargs(opt, kw, 0, flags ? 2 : 1, args);
|
||||||
if (args[0] == Qundef || NIL_P(args[0])) {
|
if (args[0] == Qundef || NIL_P(args[0])) {
|
||||||
*base = Qnil;
|
*base = Qnil;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user