Project

General

Profile

Actions

Bug #1531

closed

Matrix#determinant fails on some matrices

Added by marcandre (Marc-Andre Lafortune) almost 15 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.2dev (2009-05-24 trunk 23554) [i386-darwin9.7.0]
Backport:
[ruby-core:23597]

Description

=begin
ruby1.9 -r matrix -e 'Matrix[[0,1],[1,0]].determinant'
/usr/local/ruby191/lib/ruby/1.9.1/matrix.rb:685:in block (2 levels) in determinant': undefined method +' for nil:NilClass (NoMethodError)
from /usr/local/ruby191/lib/ruby/1.9.1/matrix.rb:684:in loop' from /usr/local/ruby191/lib/ruby/1.9.1/matrix.rb:684:in block in determinant'
from /usr/local/ruby191/lib/ruby/1.9.1/matrix.rb:681:in loop' from /usr/local/ruby191/lib/ruby/1.9.1/matrix.rb:681:in determinant'
from -e:1:in `'

Same with determinant_e.

To fix: gsub('ii','i') in matrix.rb
=end

Actions #1

Updated by yugui (Yuki Sonoda) over 14 years ago

  • Assignee set to keiju (Keiju Ishitsuka)

=begin

=end

Actions #2

Updated by marcandre (Marc-Andre Lafortune) over 14 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r24949.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0