Allow to just warn as bool expected, without an exception

This commit is contained in:
Nobuyoshi Nakada 2022-05-24 16:48:34 +09:00
parent 15db2e9496
commit a58611dfb1
Notes: git 2022-06-20 19:35:35 +09:00
6 changed files with 21 additions and 15 deletions

2
dir.c
View file

@ -2948,7 +2948,7 @@ dir_glob_option_base(VALUE base)
static int
dir_glob_option_sort(VALUE sort)
{
return (rb_bool_expected(sort, "sort") ? 0 : FNM_GLOB_NOSORT);
return (rb_bool_expected(sort, "sort", TRUE) ? 0 : FNM_GLOB_NOSORT);
}
static VALUE