summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-13 09:36:40 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-13 09:36:40 +0000
commit9c4d2d79f3c2deca695fd6f08f48c5ece6211f12 (patch)
tree978c2ec4e6cc5202519ca5950f2a7a833e93db81 /re.c
parentdc853e330b427feb8a9545cd4900611664d9c2dd (diff)
re.c (rb_reg_regcomp): remove volatile
* re.c (rb_reg_regcomp): remove volatile Unnecessary since r13261 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c3
1 files changed, 1 insertions, 2 deletions
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);