summaryrefslogtreecommitdiff
path: root/lib/matrix.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/matrix.rb')
-rw-r--r--lib/matrix.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/matrix.rb b/lib/matrix.rb
index 5d350bb8f8..95c8273522 100644
--- a/lib/matrix.rb
+++ b/lib/matrix.rb
@@ -770,7 +770,7 @@ class Matrix
end
rank = 0
k = 0
- loop do
+ begin
if (akk = a[k][k]) == 0
i = k
exists = true
@@ -812,8 +812,7 @@ class Matrix
end
end
rank += 1
- break unless (k += 1) <= a_column_size - 1
- end
+ end while (k += 1) <= a_column_size - 1
return rank
end