summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-24 06:05:10 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-24 06:05:10 +0000
commit27e57f572000aac812833034f3725a826d64864e (patch)
tree498562da14101a9076bc93704f5d7e0aa72ee6d2
parent7ee764489bd97336659d67b9f2a2ef6577aa4f1a (diff)
downloadruby-27e57f572000aac812833034f3725a826d64864e.tar.gz
ruby-27e57f572000aac812833034f3725a826d64864e.tar.xz
ruby-27e57f572000aac812833034f3725a826d64864e.zip
* lib/matrix (transpose): bug fix for Matrix.empty(0,42).t
cf [ruby-core:23598] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/matrix.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/matrix.rb b/lib/matrix.rb
index a8d9b98ff..b577ef311 100644
--- a/lib/matrix.rb
+++ b/lib/matrix.rb
@@ -858,6 +858,7 @@ class Matrix
# 2 4 6
#
def transpose
+ return Matrix.empty(column_size, 0) if row_size.zero?
new_matrix @rows.transpose, row_size
end
alias t transpose