diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | include/ruby/ruby.h | 2 |
2 files changed, 4 insertions, 2 deletions
@@ -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)) |