diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-12-05 09:56:18 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-12-05 09:56:18 +0000 |
| commit | 139cc0c17eb17727920a36624b068e985135bbce (patch) | |
| tree | bda71ad23df3ac9432609a7862c5322f87058b1d | |
| parent | 5d6b7cc318a169a51c44737469fe5c134b71462d (diff) | |
| download | ruby-139cc0c17eb17727920a36624b068e985135bbce.tar.gz ruby-139cc0c17eb17727920a36624b068e985135bbce.tar.xz ruby-139cc0c17eb17727920a36624b068e985135bbce.zip | |
* misc/ruby-mode.el (ruby-parse-partial): need to parse "/=" as
self assignment operator, not regex. [ruby-talk:227324]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | lib/matrix.rb | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Tue Dec 5 00:59:05 2006 Yukihiro Matsumoto <matz@ruby-lang.org> + + * misc/ruby-mode.el (ruby-parse-partial): need to parse "/=" as + self assignment operator, not regex. [ruby-talk:227324] + Tue Dec 5 00:19:14 2006 Nobuyoshi Nakada <nobu@ruby-lang.org> * intern.h, object.c, variable.c (rb_mod_constants): added an optional diff --git a/lib/matrix.rb b/lib/matrix.rb index 2f70de419..8142a5231 100644 --- a/lib/matrix.rb +++ b/lib/matrix.rb @@ -745,7 +745,7 @@ class Matrix det *= -1 end (k + 1).upto(size) do |i| - q = a[i][k] / a[k][k] + q = a[i][k].quo(a[k][k]) k.upto(size) do |j| a[i][j] -= a[k][j] * q end @@ -846,7 +846,7 @@ class Matrix a[pi], a[i] = a[i], a[pi] end (pi + 1 ... a_row_size).each do |k| - q = a[k][j] / a[pi][j] + q = a[k][j].quo(a[pi][j]) (pi ... a_column_size).each do |j0| a[k][j0] -= q * a[pi][j0] end |
