[前][次][番号順一覧][スレッド一覧]

ruby-changes:27013

From: marcandre <ko1@a...>
Date: Tue, 5 Feb 2013 14:43:46 +0900 (JST)
Subject: [ruby-changes:27013] marcandRe: r39065 (trunk): * lib/matrix.rb: Fix error message, patch by pypypy [Bug #7777]

marcandre	2013-02-05 14:43:36 +0900 (Tue, 05 Feb 2013)

  New Revision: 39065

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39065

  Log:
    * lib/matrix.rb: Fix error message, patch by pypypy [Bug #7777]

  Modified files:
    trunk/ChangeLog
    trunk/lib/matrix.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39064)
+++ ChangeLog	(revision 39065)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Feb  5 14:43:15 2013  Marc-Andre Lafortune  <ruby-core@m...>
+
+	* lib/matrix.rb: Fix error message, patch by pypypy [Bug #7777]
+
 Tue Feb  5 14:36:04 2013  Marc-Andre Lafortune  <ruby-core@m...>
 
 	* numeric.c (fix_pow): Handle special cases when base is 0, -1 or +1
Index: lib/matrix.rb
===================================================================
--- lib/matrix.rb	(revision 39064)
+++ lib/matrix.rb	(revision 39065)
@@ -156,7 +156,7 @@ class Matrix https://github.com/ruby/ruby/blob/trunk/lib/matrix.rb#L156
     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 https://github.com/ruby/ruby/blob/trunk/lib/matrix.rb#L286
   #     => 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 https://github.com/ruby/ruby/blob/trunk/lib/matrix.rb#L446
         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 https://github.com/ruby/ruby/blob/trunk/lib/matrix.rb#L508
         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 https://github.com/ruby/ruby/blob/trunk/lib/matrix.rb#L579
       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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]