[前][次][番号順一覧][スレッド一覧]

ruby-changes:32918

From: normal <ko1@a...>
Date: Sun, 16 Feb 2014 14:53:19 +0900 (JST)
Subject: [ruby-changes:32918] normal:r44997 (trunk): dir.c (dir_s_glob): RB_GC_GUARD instead of volatile

normal	2014-02-16 14:53:14 +0900 (Sun, 16 Feb 2014)

  New Revision: 44997

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44997

  Log:
    dir.c (dir_s_glob): RB_GC_GUARD instead of volatile

  Modified files:
    trunk/ChangeLog
    trunk/dir.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44996)
+++ ChangeLog	(revision 44997)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Feb 16 14:52:46 2014  Eric Wong  <e@8...>
+
+	* dir.c (dir_s_glob): RB_GC_GUARD instead of volatile
+
 Sun Feb 16 14:33:52 2014  Tanaka Akira  <akr@f...>
 
 	* include/ruby/ruby.h (RBIGNUM_SIGN): Defined for compatibility.
Index: dir.c
===================================================================
--- dir.c	(revision 44996)
+++ dir.c	(revision 44997)
@@ -1912,8 +1912,9 @@ dir_s_glob(int argc, VALUE *argv, VALUE https://github.com/ruby/ruby/blob/trunk/dir.c#L1912
 	ary = rb_push_glob(str, flags);
     }
     else {
-	volatile VALUE v = ary;
+	VALUE v = ary;
 	ary = dir_globs(RARRAY_LEN(v), RARRAY_CONST_PTR(v), flags);
+	RB_GC_GUARD(v);
     }
 
     if (rb_block_given_p()) {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]