aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--re.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c600aa94d..da5e42df5d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Feb 13 18:28:51 2014 Eric Wong <e@80x24.org>
+
+ * re.c (rb_reg_regcomp): remove volatile
+ Unnecessary since r13261
+
Thu Feb 13 16:54:32 2014 Zachary Scott <e@zzak.io>
* test/ruby/test_array.rb: Ensure flatten! is used for test_flatten
diff --git a/re.c b/re.c
index 49b1a5a9d4..036d320770 100644
--- a/re.c
+++ b/re.c
@@ -2569,13 +2569,12 @@ static VALUE reg_cache;
VALUE
rb_reg_regcomp(VALUE str)
{
- volatile VALUE save_str = str;
if (reg_cache && RREGEXP_SRC_LEN(reg_cache) == RSTRING_LEN(str)
&& ENCODING_GET(reg_cache) == ENCODING_GET(str)
&& memcmp(RREGEXP_SRC_PTR(reg_cache), RSTRING_PTR(str), RSTRING_LEN(str)) == 0)
return reg_cache;
- return reg_cache = rb_reg_new_str(save_str, 0);
+ return reg_cache = rb_reg_new_str(str, 0);
}
static st_index_t reg_hash(VALUE re);