Issue #5133 has been updated by Kazuhiro NISHIYAMA.


?????????????????????????????????????????

Array#zip ??????????????????1???????????????(?????????????????????????????????)????
Array#transpose ???1??????????????1???????????????(?????????????????????????)?????????????????
????????????象??????????????????????????????????????説???????????????????????????????????
----------------------------------------
Feature #5133: Array#unzip as an alias of Array#transpose
http://redmine.ruby-lang.org/issues/5133

Author: Kenta Murata
Status: Open
Priority: Normal
Assignee: Yukihiro Matsumoto
Category: core
Target version: 1.9.x


Array#zip ??????? Array#transpose ???????????????
?????対???????????常???????????????????????????????

Haskell ???? zip ?????????????????????? unzip ???????????????????????
unzip ????????????????????zip ?????????????????????????????????????
(transpose ?????????) ??????????????????????????????????????????

?????????????? Array#unzip ??? Array#transpose ?????????????
????????????????????

以???????????????:

diff --git a/array.c b/array.c
index 8caad66..dc411b7 100644
--- a/array.c
+++ b/array.c
@@ -4720,6 +4720,7 @@ Init_Array(void)
     rb_define_method(rb_cArray, "reject!", rb_ary_reject_bang, 0);
     rb_define_method(rb_cArray, "zip", rb_ary_zip, -1);
     rb_define_method(rb_cArray, "transpose", rb_ary_transpose, 0);
+    rb_define_alias(rb_cArray, "unzip", "transpose");
     rb_define_method(rb_cArray, "replace", rb_ary_replace, 1);
     rb_define_method(rb_cArray, "clear", rb_ary_clear, 0);
     rb_define_method(rb_cArray, "fill", rb_ary_fill, -1);



-- 
http://redmine.ruby-lang.org