summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-01-21 08:01:20 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-01-21 08:01:20 +0000
commitb90b86cab597c553011764477778162f79863051 (patch)
treec1f3fcd48d4b43be850c1f25a91e07345bbecb3a /dir.c
parent13db60aad38c6c258c4831fcc13ff000cd0c4f61 (diff)
* dir.c (rb_push_glob): should work for NUL delimited patterns.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index d60c0fa..698157a 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++;