mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
93f6b2a36e
commit
ec85609f23
1 changed files with 4 additions and 11 deletions
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);
|
||||
}
|
||||
|
||||
static int
|
||||
ruby_brace_glob0(const char *str, int flags, ruby_glob_func *func, VALUE arg,
|
||||
rb_encoding* enc)
|
||||
int
|
||||
ruby_brace_glob_with_enc(const char *str, int flags, ruby_glob_func *func, VALUE arg, rb_encoding *enc)
|
||||
{
|
||||
struct brace_args args;
|
||||
|
||||
flags &= ~GLOB_VERBOSE;
|
||||
args.func = func;
|
||||
args.value = arg;
|
||||
args.flags = flags;
|
||||
|
@ -2050,14 +2050,7 @@ ruby_brace_glob0(const char *str, int flags, ruby_glob_func *func, VALUE arg,
|
|||
int
|
||||
ruby_brace_glob(const char *str, int flags, ruby_glob_func *func, VALUE arg)
|
||||
{
|
||||
return ruby_brace_glob0(str, flags & ~GLOB_VERBOSE, func, arg,
|
||||
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);
|
||||
return ruby_brace_glob_with_enc(str, flags, func, arg, rb_ascii8bit_encoding());
|
||||
}
|
||||
|
||||
struct push_glob_args {
|
||||
|
|
Loading…
Add table
Reference in a new issue