Issue #10903 has been updated by Hiroshi SHIBATA.

Status changed from Open to Assigned
Assignee set to Marc-Andre Lafortune

----------------------------------------
Bug #10903: [PATCH] Matrix#zip returns a matrix
https://bugs.ruby-lang.org/issues/10903#change-52556

* Author: Lito Nicolai
* Status: Assigned
* Priority: Normal
* Assignee: Marc-Andre Lafortune
* ruby -v: 2.3.0
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
Currently:
    > x = Matrix.I 2
    > x.zip x
    => [[1, 1], [0, 0], [0, 0], [1, 1]] # It's an array!

With the patch:
    > x.zip x
    => Matrix[[1, 1], [0, 0], [0, 0], [1, 1]]

And also:
    > x.zip x, x  # and so on
    => Matrix[[1, 1, 1], [0, 0, 0], [0, 0, 0], [1, 1, 1]]


---Files--------------------------------
matrix_zip.patch (1.42 KB)


-- 
https://bugs.ruby-lang.org/