summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--dir.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 928c834ef7..d77b7c4ab2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Jan 21 16:58:10 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * dir.c (rb_push_glob): should work for NUL delimited patterns.
+
Fri Jan 21 13:58:37 2005 Shugo Maeda <shugo@ruby-lang.org>
* lib/net/imap.rb (u8tou16): fixed typo. fixed: [ruby-lis:40546]
diff --git a/dir.c b/dir.c
index d60c0fad21..698157ad67 100644
--- a/dir.c
+++ b/dir.c
@@ -1224,11 +1224,11 @@ rb_push_glob(str, flags)
ary = rb_ary_new();
SafeStringValue(str);
- buf = rb_str_new(0, RSTRING(str)->len + 1);
p = RSTRING(str)->ptr;
pend = p + RSTRING(str)->len;
while (p < pend) {
+ buf = rb_str_new(0, pend - p + 1);
t = RSTRING(buf)->ptr;
nest = maxnest = 0;
while (p < pend && isdelim(*p)) p++;