package libruby1.8
reopen 329161
retitle 329161 libruby1.8: Matrix class is broken without mathn
thanks

On Wednesday 21 September 2005 23:42, akira yamada wrote:
> Please use "matrix" with "mathn".
> "ri Matrix" saies:
>
>      Also note that the determinant of integer matrices may be
>      incorrectly calculated unless you also +require 'mathn'+. This may
>      be fixed in the future.

Okay, so this doesn't mean it's not a bug, it means that it's a known, but 
obscurely documented bug. (Obscure for two reasons: it doesn't say this in 
the failing methods' ri docs, but only at the top-level "Matrix"; second, 
ri is an optional tool that isn't required by libruby1.8). Also, this 
doesn't document that inverse doesn't work without mathn, and it seemed 
(but I can't say for sure at the moment) that there were other Matrix 
operations failing when mathn was not 'require'd.

I've changed the title this bug to reflect the current situation then: the 
Matrix class is broken without mathn being required. Since Matrix requires 
mathn to work for some important methods, it should either:
  
  1) Do a "require 'mathn'" inside the main matrix.rb file.

  2) Have any methods that require mathn do a "require 'math'" in the global 
scope whenever they are invoked.

  3) Rewrite methods requiring mathn to NOT require mathn unless it's 
already been included.

  4) Disable the Matrix methods that need mathn in matrix.rb (say, make them 
private methods) and only enable them when mathn is 'required'.

One of these, or something like it, needs to be done for this bug to be 
closed. It's not enough to just have ri documentation. If you don't agree, 
please mark this as a wontfix, or upstream, change it to wishlist, or 
whatever, but please do not just close it, as this *is* an issue for many 
users.

-- 
Wesley J. Landaker <[EMAIL PROTECTED]> <xmpp:[EMAIL PROTECTED]>
OpenPGP FP: 4135 2A3B 4726 ACC5 9094  0097 F0A9 8A4C 4CD6 E3D2

Attachment: pgpTekR5PnYhg.pgp
Description: PGP signature

Reply via email to