summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-01 02:42:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-01 02:42:19 +0000
commitec85609f2329d4ce5062dd56746bdcddbeed4daf (patch)
tree90e01e7a68d08da093a4526236e15d02475a5929
parent93f6b2a36ed097cf615606bcc30f69a13c0bc8e6 (diff)
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
-rw-r--r--dir.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/dir.c b/dir.c
index 4b83563717..cfd22e301c 100644
--- a/dir.c
+++ b/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 {