diff --git a/ChangeLog b/ChangeLog index 18cdb865c0..dd4c3d35d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Jan 27 22:48:40 2010 Yusuke Endoh + + * lib/matrix.rb (determinant): fix name error. + Wed Jan 27 22:26:25 2010 Yusuke Endoh * vm_eval.c (rb_backtrace): "circular require" warning was output to diff --git a/lib/matrix.rb b/lib/matrix.rb index c7ae64923f..358ac04416 100644 --- a/lib/matrix.rb +++ b/lib/matrix.rb @@ -681,8 +681,8 @@ class Matrix i = (k+1 ... size).find {|ii| a[ii][k] != 0 } - return 0 if ii.nil? - a[ii], a[k] = a[k], a[ii] + return 0 if i.nil? + a[i], a[k] = a[k], a[i] akk = a[k][k] det *= -1 end