Project

General

Profile

Actions

Bug #1020

closed

Matrix#rank loops in some circumstances

Added by pragdave (Dave Thomas) over 15 years ago. Updated almost 13 years ago.

Status:
Closed
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

Actions #1

Updated by ko1 (Koichi Sasada) about 15 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

Actions #2

Updated by runpaint (Run Paint Run Run) almost 15 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

Actions #3

Updated by wanabe (_ wanabe) over 14 years ago

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

=begin
Applied in changeset r24211.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0