summaryrefslogtreecommitdiff
path: root/enum.c
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
commite8c1c4411fdd3f7df87666a84a32d10c148e4710 (patch)
treed9f0e16731f5859a4ca2e56bc7807f2ac9be18d0 /enum.c
parent819994a70257a8c713a0c7ea112fab64bd0ef032 (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/branches/ruby_1_8@6970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/enum.c b/enum.c
index fceed39..67d6ee8 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;
}