summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-09-29 01:58:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-09-29 01:58:43 +0000
commit3615015df08416dbc83393d4bf8f4906ae4c7242 (patch)
tree677a10dcf1cd1be40f6cdd7a5e75e0806774a1b9
parentcf729ce62bdc8f645c22aebc502a81e5ff0dc949 (diff)
* enum.c (sort_by_i): internally used object must not be changed
outside. [ruby-dev:24368] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--enum.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index babe1db2ea..391d1436b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Sep 29 10:58:07 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * enum.c (sort_by_i): internally used object must not be changed
+ outside. [ruby-dev:24368]
+
Mon Sep 27 21:25:12 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (rb_call0): invoke finalizers periodically.
diff --git a/enum.c b/enum.c
index d066af1c25..eee0e04291 100644
--- a/enum.c
+++ b/enum.c
@@ -393,6 +393,7 @@ sort_by_i(i, ary)
v = rb_yield(i);
e = rb_assoc_new(v, i);
+ OBJ_FREEZE(e);
rb_ary_push(ary, e);
return Qnil;
}