Project

General

Profile

Bug #1020

Matrix#rank loops in some circumstances

Added by pragdave (Dave Thomas) almost 12 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
ruby 1.9.1p5000 (2009-01-16 trunk 21610) [i386-darwin9.6.0]
Backport:
[ruby-core:21385]

Description

=begin
$ ruby -v -r matrix -e 'p Matrix[ [1,2,3], [4,5,6], [7,8,9] ].rank'
ruby 1.9.1p5000 (2009-01-16 trunk 21610) [i386-darwin9.6.0]
<< loops... >>

The answer should be 2.
=end

#1

Updated by ko1 (Koichi Sasada) over 11 years ago

  • Assignee set to yugui (Yuki Sonoda)
  • Target version set to 3.0
  • ruby -v set to ruby 1.9.1p5000 (2009-01-16 trunk 21610) [i386-darwin9.6.0]

=begin

=end

#2

Updated by runpaint (Run Paint Run Run) over 11 years ago

=begin
Similarly:

 $ ruby1.8 -rmatrix -ve 'p Matrix[ [1, 2, 0, 3], [1, -2, 3, 0], [0, 0, 4, 8], [2, 4, 0, 6] ].rank'
 ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
 3

 $ ruby -rmatrix -ve 'p Matrix[ [1, 2, 0, 3], [1, -2, 3, 0], [0, 0, 4, 8], [2, 4, 0, 6] ].rank'
 ruby 1.9.1p129 (2009-05-12 revision 23412) [i686-linux]
 ^C/usr/local/lib/ruby/1.9.1/matrix.rb:775:in `block in rank': Interrupt
from /usr/local/lib/ruby/1.9.1/matrix.rb:774:in `loop'
from /usr/local/lib/ruby/1.9.1/matrix.rb:774:in `rank'
from -e:1:in `<main>'

The second example just hangs until I kill it.
=end

#3

Updated by wanabe (_ wanabe) over 11 years ago

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

=begin
Applied in changeset r24211.
=end

Also available in: Atom PDF