diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/matrix.rb | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Fri Jul 18 19:03:53 2014 Marc-Andre Lafortune <ruby-core@marc-andre.ca> + + * lib/matrix.rb: Avoid using `and`. + Patch by gogo tanaka [#10058] + Fri Jul 18 17:41:54 2014 GoGo tanaka <qlli.illb@gmail.com> * test/matrix/test_matrix.rb: Add tests for Matrix class. diff --git a/lib/matrix.rb b/lib/matrix.rb index 026492b6b8..76bec9228b 100644 --- a/lib/matrix.rb +++ b/lib/matrix.rb @@ -894,7 +894,7 @@ class Matrix return apply_through_coercion(m, __method__) end - Matrix.Raise ErrDimensionMismatch unless row_count == m.row_count and column_count == m.column_count + Matrix.Raise ErrDimensionMismatch unless row_count == m.row_count && column_count == m.column_count rows = Array.new(row_count) {|i| Array.new(column_count) {|j| @@ -921,7 +921,7 @@ class Matrix return apply_through_coercion(m, __method__) end - Matrix.Raise ErrDimensionMismatch unless row_count == m.row_count and column_count == m.column_count + Matrix.Raise ErrDimensionMismatch unless row_count == m.row_count && column_count == m.column_count rows = Array.new(row_count) {|i| Array.new(column_count) {|j| |