mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* dir.c (push_glob): clear up the previous commit (RB_GC_GUARD can
precede the last reference). [ruby-dev:40942] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5dd8daaa27
commit
1f2def7dd8
2 changed files with 7 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Apr 9 20:29:13 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* dir.c (push_glob): clear up the previous commit (RB_GC_GUARD can
|
||||
precede the last reference). [ruby-dev:40942]
|
||||
|
||||
Fri Apr 9 20:05:05 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* dir.c (push_glob): add RB_GC_GUARD to prevent str being free'ed.
|
||||
|
|
6
dir.c
6
dir.c
|
@ -1622,17 +1622,15 @@ push_glob(VALUE ary, VALUE str, int flags)
|
|||
{
|
||||
struct glob_args args;
|
||||
rb_encoding *enc = rb_enc_get(str);
|
||||
int ret;
|
||||
|
||||
if (enc == rb_usascii_encoding()) enc = rb_filesystem_encoding();
|
||||
args.func = push_pattern;
|
||||
args.value = ary;
|
||||
args.enc = enc;
|
||||
|
||||
ret = ruby_brace_glob0(RSTRING_PTR(str), flags | GLOB_VERBOSE,
|
||||
rb_glob_caller, (VALUE)&args, enc);
|
||||
RB_GC_GUARD(str);
|
||||
return ret;
|
||||
return ruby_brace_glob0(RSTRING_PTR(str), flags | GLOB_VERBOSE,
|
||||
rb_glob_caller, (VALUE)&args, enc);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
|
|
Loading…
Reference in a new issue