summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-12-09 13:47:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-12-09 13:47:54 +0000
commit7f082166641c76e4a61658967462cb28c3ecccdf (patch)
tree65e72d8b4ee0902d1716d02049d9f4602d357fed
parent5a7f9a9a9819bbbee1566202cf7a5c49a045de38 (diff)
downloadruby-7f082166641c76e4a61658967462cb28c3ecccdf.tar.gz
ruby-7f082166641c76e4a61658967462cb28c3ecccdf.tar.xz
ruby-7f082166641c76e4a61658967462cb28c3ecccdf.zip
* enum.c (enum_sort_by): should replace with last elements.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--enum.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e14f2d0b..0de0c95ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Dec 9 22:15:59 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+
+ * enum.c (enum_sort_by): should replace with last elements.
+
Sun Dec 9 18:06:26 2001 Minero Aoki <aamine@loveruby.net>
* lib/net/protocol.rb: calls on_connect before conn_command
diff --git a/enum.c b/enum.c
index fb7284934..352771fca 100644
--- a/enum.c
+++ b/enum.c
@@ -250,7 +250,7 @@ enum_sort_by(obj)
rb_ary_sort_inplace(ary);
for (i=0; i<RARRAY(ary)->len; i++) {
VALUE e = RARRAY(ary)->ptr[i];
- RARRAY(ary)->ptr[i] = RARRAY(e)->ptr[2];
+ RARRAY(ary)->ptr[i] = RARRAY(e)->ptr[RARRAY(e)->len - 1];
}
return ary;