aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-25 20:39:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-25 20:39:30 +0000
commit5a9f87f17912f863624bd475b9589e29d6b79056 (patch)
tree43e5a4808e291ba341ecab29e5dc48f06f2228b9
parenta273dc9b1669f7659a894f3b46ae7fbbedfdb89c (diff)
downloadruby-5a9f87f17912f863624bd475b9589e29d6b79056.tar.gz
* include/ruby/ruby.h (FilePathValue): prevent from GC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--include/ruby/ruby.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6b5e117cf8..d985d77bcd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,6 @@
-Tue May 26 05:38:03 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue May 26 05:39:28 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * include/ruby/ruby.h (FilePathValue): prevent from GC.
* include/ruby/ruby.h (NUM2LONG): added GCC specific optimization.
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 54018ab277..7da0b9e908 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -417,7 +417,7 @@ VALUE rb_str_export(VALUE);
VALUE rb_str_export_locale(VALUE);
VALUE rb_get_path(VALUE);
-#define FilePathValue(v) ((v) = rb_get_path(v))
+#define FilePathValue(v) (RB_GC_GUARD(v) = rb_get_path(v))
VALUE rb_get_path_no_checksafe(VALUE);
#define FilePathStringValue(v) ((v) = rb_get_path_no_checksafe(v))