diff options
Diffstat (limited to 'ext/strscan')
-rw-r--r-- | ext/strscan/strscan.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c index e843e547fb..490689b3d2 100644 --- a/ext/strscan/strscan.c +++ b/ext/strscan/strscan.c @@ -321,8 +321,7 @@ strscan_set_string(VALUE self, VALUE str) Data_Get_Struct(self, struct strscanner, p); StringValue(str); - p->str = rb_str_dup(str); - rb_obj_freeze(p->str); + p->str = str; p->curr = 0; CLEAR_MATCH_STATUS(p); return str; |