From 92aca12ccd159c0690944abb653c2e975828795f Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 25 May 2009 20:39:30 +0000 Subject: * include/ruby/ruby.h (FilePathValue): prevent from GC. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/ruby.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/ruby') diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 54018ab27..7da0b9e90 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)) -- cgit