* dir.c (dir_s_glob): restore GC protection volatile variable.
[ruby-dev:29588] * re.c (rb_reg_regcomp): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3851ac03b5
commit
6bf30a90ef
@ -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>
|
Mon Sep 18 12:16:48 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* numeric.c (fix_mul): get rid of shift overflow.
|
* numeric.c (fix_mul): get rid of shift overflow.
|
||||||
|
3
dir.c
3
dir.c
@ -1629,7 +1629,8 @@ dir_s_glob(int argc, VALUE *argv, VALUE obj)
|
|||||||
ary = rb_push_glob(str, flags);
|
ary = rb_push_glob(str, flags);
|
||||||
}
|
}
|
||||||
else {
|
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()) {
|
if (rb_block_given_p()) {
|
||||||
|
3
re.c
3
re.c
@ -1508,6 +1508,7 @@ static VALUE reg_cache;
|
|||||||
VALUE
|
VALUE
|
||||||
rb_reg_regcomp(VALUE str)
|
rb_reg_regcomp(VALUE str)
|
||||||
{
|
{
|
||||||
|
volatile VALUE save_str = str;
|
||||||
if (reg_cache && RREGEXP(reg_cache)->len == RSTRING_LEN(str)
|
if (reg_cache && RREGEXP(reg_cache)->len == RSTRING_LEN(str)
|
||||||
&& case_cache == ruby_ignorecase
|
&& case_cache == ruby_ignorecase
|
||||||
&& kcode_cache == reg_kcode
|
&& kcode_cache == reg_kcode
|
||||||
@ -1516,7 +1517,7 @@ rb_reg_regcomp(VALUE str)
|
|||||||
|
|
||||||
case_cache = ruby_ignorecase;
|
case_cache = ruby_ignorecase;
|
||||||
kcode_cache = reg_kcode;
|
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);
|
ruby_ignorecase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user