зеркало из https://github.com/github/ruby.git
dir.c: expand ruby_brace_glob0
* dir.c (ruby_brace_glob_with_enc): call ruby_brace_glob_with_enc in ruby_brace_glob, and expanded ruby_brace_glob0 which is no longer used anywhere else. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
93f6b2a36e
Коммит
ec85609f23
15
dir.c
15
dir.c
|
@ -2035,12 +2035,12 @@ glob_brace(const char *path, VALUE val, void *enc)
|
||||||
return ruby_glob0(path, arg->flags, arg->func, arg->value, enc);
|
return ruby_glob0(path, arg->flags, arg->func, arg->value, enc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
int
|
||||||
ruby_brace_glob0(const char *str, int flags, ruby_glob_func *func, VALUE arg,
|
ruby_brace_glob_with_enc(const char *str, int flags, ruby_glob_func *func, VALUE arg, rb_encoding *enc)
|
||||||
rb_encoding* enc)
|
|
||||||
{
|
{
|
||||||
struct brace_args args;
|
struct brace_args args;
|
||||||
|
|
||||||
|
flags &= ~GLOB_VERBOSE;
|
||||||
args.func = func;
|
args.func = func;
|
||||||
args.value = arg;
|
args.value = arg;
|
||||||
args.flags = flags;
|
args.flags = flags;
|
||||||
|
@ -2050,14 +2050,7 @@ ruby_brace_glob0(const char *str, int flags, ruby_glob_func *func, VALUE arg,
|
||||||
int
|
int
|
||||||
ruby_brace_glob(const char *str, int flags, ruby_glob_func *func, VALUE arg)
|
ruby_brace_glob(const char *str, int flags, ruby_glob_func *func, VALUE arg)
|
||||||
{
|
{
|
||||||
return ruby_brace_glob0(str, flags & ~GLOB_VERBOSE, func, arg,
|
return ruby_brace_glob_with_enc(str, flags, func, arg, rb_ascii8bit_encoding());
|
||||||
rb_ascii8bit_encoding());
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
ruby_brace_glob_with_enc(const char *str, int flags, ruby_glob_func *func, VALUE arg, rb_encoding *enc)
|
|
||||||
{
|
|
||||||
return ruby_brace_glob0(str, flags & ~GLOB_VERBOSE, func, arg, enc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct push_glob_args {
|
struct push_glob_args {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче