From 4588cedd1a31788bdb2b38b6049cd5bda86ef292 Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Fri, 11 Aug 2006 16:47:55 +0200 Subject: [PATCH] Freeze the key in newly added entries in Ogg::Vorbis::Comments#[]=. This makes MainTest#test_modify_key pass. --- ext/comments.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/comments.c b/ext/comments.c index bc7d844..27ea5c7 100644 --- a/ext/comments.c +++ b/ext/comments.c @@ -355,7 +355,7 @@ c_aset (VALUE self, VALUE key, VALUE value) } } - tmp = rb_ary_new3 (2, key, value); + tmp = rb_ary_new3 (2, rb_str_dup_frozen (key), value); OBJ_FREEZE (tmp); rb_ary_push (o->items, tmp); -- 2.30.2