diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-16 04:39:51 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-16 04:39:51 +0000 |
commit | 0d5fd7a85a47a20bd4d1b60be9a0222ab9ea1b51 (patch) | |
tree | 6bc0db6ed3c72b58e8c6f643bac209a6d4c96d1f /lib | |
parent | fcab927101b6f9b7c2518373fa7ea47a41ca6b9b (diff) | |
download | ruby-0d5fd7a85a47a20bd4d1b60be9a0222ab9ea1b51.tar.gz ruby-0d5fd7a85a47a20bd4d1b60be9a0222ab9ea1b51.tar.xz ruby-0d5fd7a85a47a20bd4d1b60be9a0222ab9ea1b51.zip |
* lib/matrix.rb (determinant): Bug fix where determinant failed on some matrices [ruby-core:23597]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/matrix.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/matrix.rb b/lib/matrix.rb index 2d5dfea42..e4a81ea01 100644 --- a/lib/matrix.rb +++ b/lib/matrix.rb @@ -669,7 +669,7 @@ class Matrix if (akk = a[k][k]) == 0 i = k loop do - return 0 if (ii += 1) > size + return 0 if (i += 1) > size break unless a[i][k] == 0 end a[i], a[k] = a[k], a[i] |