summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-22 05:31:31 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-22 05:31:31 +0000
commit10a129cee72512315e84d5b29a8ca471058e80ff (patch)
tree3ac61ac81abd3719c410cddea49a53da6ed60e07 /ext
parent1b107d48ef2f67a48cb974890c2944381fd4ee4a (diff)
escape.c: should not freeze
* ext/cgi/escape/escape.c (optimized_escape_html): CGI.escapeHTML should return unfrozen new string. [ruby-core:72426] [Bug #11858] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/cgi/escape/escape.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/cgi/escape/escape.c b/ext/cgi/escape/escape.c
index 939b054..e8f64f6 100644
--- a/ext/cgi/escape/escape.c
+++ b/ext/cgi/escape/escape.c
@@ -30,7 +30,7 @@ preserve_original_state(VALUE orig, VALUE dest)
{
rb_enc_associate(dest, rb_enc_get(orig));
- FL_SET_RAW(dest, FL_TEST_RAW(orig, FL_FREEZE|FL_TAINT));
+ RB_OBJ_INFECT_RAW(dest, orig);
}
static VALUE
@@ -69,7 +69,7 @@ optimized_escape_html(VALUE str)
return dest;
}
else {
- return str;
+ return rb_str_dup(str);
}
}