From 0e03a296e63b9694709de9bc462c08de60873a58 Mon Sep 17 00:00:00 2001 From: ko1 Date: Wed, 15 Jul 2009 23:57:33 +0000 Subject: [PATCH] * dir.c (push_glob): re-fix GC problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ dir.c | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a8b2881a638c33..fe45746e17464a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Jul 16 08:56:32 2009 Koichi Sasada + + * dir.c (push_glob): re-fix GC problem. + Thu Jul 16 08:55:27 2009 Koichi Sasada * common.mk: add method.h. diff --git a/dir.c b/dir.c index d438a492a590c6..f3ffc45f4fdd45 100644 --- a/dir.c +++ b/dir.c @@ -1561,14 +1561,13 @@ push_glob(VALUE ary, VALUE str, int flags) { struct glob_args args; rb_encoding *enc = rb_enc_get(str); - volatile VALUE vstr = str; /* for GC mark */ if (enc == rb_usascii_encoding()) enc = rb_filesystem_encoding(); args.func = push_pattern; args.value = ary; args.enc = enc; - return ruby_brace_glob0(RSTRING_PTR(str), flags | GLOB_VERBOSE, + return ruby_brace_glob0(StringValuePtr(str), flags | GLOB_VERBOSE, rb_glob_caller, (VALUE)&args, enc); }