summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-24 22:51:46 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-24 22:51:46 +0000
commit5c21d2befc9d684ab2d04b0796301adf6fd1328e (patch)
treeca6c75cf476c10c1a70b0cfd1c64fb857547f2b5
parentdad3b61636ff5f3781f966b2b44b51b088dc4631 (diff)
downloadruby-5c21d2befc9d684ab2d04b0796301adf6fd1328e.tar.gz
ruby-5c21d2befc9d684ab2d04b0796301adf6fd1328e.tar.xz
ruby-5c21d2befc9d684ab2d04b0796301adf6fd1328e.zip
Matrix used range.size, which no longer exists
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/matrix.rb6
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 28c955a1c..ee77d1610 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2003-04-24 Dave Thomas <dave@thomases.com>
+ * lib/matrix.rb (Matrix#minor): Used Range#size, which no longer
+ exists.
+
+2003-04-24 Dave Thomas <dave@thomases.com>
+
* lib/complex.rb (new!): Complex.new had been made private, but
Kernel#Complex called it. Re-exposed as new!.
diff --git a/lib/matrix.rb b/lib/matrix.rb
index d17b3517b..fcb16d6c4 100644
--- a/lib/matrix.rb
+++ b/lib/matrix.rb
@@ -435,9 +435,11 @@ class Matrix
case param.size
when 2
from_row = param[0].first
- size_row = param[0].size
+ size_row = param[0].end - from_row
+ size_row += 1 unless param[0].exclude_end?
from_col = param[1].first
- size_col = param[1].size
+ size_col = param[1].end - from_col
+ size_col += 1 unless param[1].exclude_end?
when 4
from_row = param[0]
size_row = param[1]