summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-05 05:43:36 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-05 05:43:36 +0000
commit9a912c66d4f720e90c3522d40ac29c04dbd86a9b (patch)
tree433406bca3640e10b6daf79636ea0521f08b0d59 /lib
parentd22ce4a522141c2f6e847846944ddc1ec3a949f2 (diff)
* lib/matrix.rb: Fix error message, patch by pypypy [Bug #7777]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/matrix.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/matrix.rb b/lib/matrix.rb
index 7a3857ae99..b1d1a5c2bd 100644
--- a/lib/matrix.rb
+++ b/lib/matrix.rb
@@ -156,7 +156,7 @@ class Matrix
end
size = (rows[0] || []).size
rows.each do |row|
- Matrix.Raise ErrDimensionMismatch, "row size differs (#{row.size} should be #{size})" unless row.size == size
+ raise ErrDimensionMismatch, "row size differs (#{row.size} should be #{size})" unless row.size == size
end
new rows, size
end
@@ -286,8 +286,8 @@ class Matrix
# => Matrix[[0, 0, 0], [0, 0, 0]]
#
def Matrix.empty(row_count = 0, column_count = 0)
- Matrix.Raise ArgumentError, "One size must be 0" if column_count != 0 && row_count != 0
- Matrix.Raise ArgumentError, "Negative size" if column_count < 0 || row_count < 0
+ raise ArgumentError, "One size must be 0" if column_count != 0 && row_count != 0
+ raise ArgumentError, "Negative size" if column_count < 0 || row_count < 0
new([[]]*row_count, column_count)
end
@@ -446,7 +446,7 @@ class Matrix
end
end
else
- Matrix.Raise ArgumentError, "expected #{which.inspect} to be one of :all, :diagonal, :off_diagonal, :lower, :strict_lower, :strict_upper or :upper"
+ raise ArgumentError, "expected #{which.inspect} to be one of :all, :diagonal, :off_diagonal, :lower, :strict_lower, :strict_upper or :upper"
end
self
end
@@ -508,7 +508,7 @@ class Matrix
end
end
else
- Matrix.Raise ArgumentError, "expected #{which.inspect} to be one of :all, :diagonal, :off_diagonal, :lower, :strict_lower, :strict_upper or :upper"
+ raise ArgumentError, "expected #{which.inspect} to be one of :all, :diagonal, :off_diagonal, :lower, :strict_lower, :strict_upper or :upper"
end
self
end
@@ -579,7 +579,7 @@ class Matrix
from_row += row_count if from_row < 0
from_col += column_count if from_col < 0
else
- Matrix.Raise ArgumentError, param.inspect
+ raise ArgumentError, param.inspect
end
return nil if from_row > row_count || from_col > column_count || from_row < 0 || from_col < 0