summaryrefslogtreecommitdiff
path: root/ext/cgi/escape
diff options
context:
space:
mode:
Diffstat (limited to 'ext/cgi/escape')
-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);
}
}