diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-18 06:33:03 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-18 06:33:03 +0000 |
| commit | 69f784c11e10316ab78611465aae543e8801e0da (patch) | |
| tree | 039a36cde0c3f5c74525a2539f56798e7b2a5bb6 | |
| parent | 773fe1d6e97cc3bd80d08d57bf0260a6c1b673e5 (diff) | |
| download | ruby-69f784c11e10316ab78611465aae543e8801e0da.tar.gz ruby-69f784c11e10316ab78611465aae543e8801e0da.tar.xz ruby-69f784c11e10316ab78611465aae543e8801e0da.zip | |
* dir.c (dir_s_glob): restore GC protection volatile variable.
[ruby-dev:29588]
* re.c (rb_reg_regcomp): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | dir.c | 3 | ||||
| -rw-r--r-- | re.c | 3 |
3 files changed, 11 insertions, 2 deletions
@@ -1,3 +1,10 @@ +Mon Sep 18 15:29:21 2006 Yukihiro Matsumoto <matz@ruby-lang.org> + + * dir.c (dir_s_glob): restore GC protection volatile variable. + [ruby-dev:29588] + + * re.c (rb_reg_regcomp): ditto. + Mon Sep 18 12:16:48 2006 Nobuyoshi Nakada <nobu@ruby-lang.org> * numeric.c (fix_mul): get rid of shift overflow. @@ -1629,7 +1629,8 @@ dir_s_glob(int argc, VALUE *argv, VALUE obj) ary = rb_push_glob(str, flags); } else { - ary = dir_globs(RARRAY_LEN(ary), RARRAY_PTR(ary), flags); + volatile VALUE v = ary; + ary = dir_globs(RARRAY_LEN(v), RARRAY_PTR(v), flags); } if (rb_block_given_p()) { @@ -1508,6 +1508,7 @@ static VALUE reg_cache; VALUE rb_reg_regcomp(VALUE str) { + volatile VALUE save_str = str; if (reg_cache && RREGEXP(reg_cache)->len == RSTRING_LEN(str) && case_cache == ruby_ignorecase && kcode_cache == reg_kcode @@ -1516,7 +1517,7 @@ rb_reg_regcomp(VALUE str) case_cache = ruby_ignorecase; kcode_cache = reg_kcode; - return reg_cache = rb_reg_new(RSTRING_PTR(str), RSTRING_LEN(str), + return reg_cache = rb_reg_new(RSTRING_PTR(save_str), RSTRING_LEN(save_str), ruby_ignorecase); } |
