summaryrefslogtreecommitdiffstats
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
commit34c74d9ee6f7ff7ae1499bbca7f5b277b84f679f (patch)
treed9f0e16731f5859a4ca2e56bc7807f2ac9be18d0 /enum.c
parentd9c1e15b58f3fc70931cc98a2fc35727df85b77f (diff)
downloadruby-34c74d9ee6f7ff7ae1499bbca7f5b277b84f679f.tar.gz
ruby-34c74d9ee6f7ff7ae1499bbca7f5b277b84f679f.tar.xz
ruby-34c74d9ee6f7ff7ae1499bbca7f5b277b84f679f.zip
* enum.c (sort_by_i): internally used object must not be changed
outside. [ruby-dev:24368] git-svn-id: http://svn.ruby-lang.org/repos/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 fceed391f..67d6ee8bf 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;
}