Bug #7777

wrong use of "Raise" method in matrix.rb

Added by py _ about 1 year ago. Updated about 1 year ago.

[ruby-core:51826]
Status:Closed
Priority:Normal
Assignee:Marc-Andre Lafortune
Category:-
Target version:-
ruby -v:ruby 2.0.0dev (2013-01-07) [i386-mswin32_100] Backport:

Description

=begin
"Raise" method added by e2mmap library shows customized error messages according to pre-registered formats:

$ irb
irb(main):001:0> require 'matrix'
=> true
irb(main):002:0> Matrix.Raise ArgumentError, 2, 3 rescue $!
=> #

However it's not needed if we make messages by hand.

irb(main):003:0> Matrix.Raise ArgumentError, "One size must be 0"
ArgumentError: invalid value for Integer(): "One size must be 0"
from C:/ruby200/lib/ruby/2.0.0/e2mmap.rb:144:in sprintf'
from C:/ruby200/lib/ruby/2.0.0/e2mmap.rb:144:in
Raise'
from C:/ruby200/lib/ruby/2.0.0/e2mmap.rb:78:in Raise'
from (irb):3
from C:/ruby200/bin/irb.bat:19:in
'
irb(main):004:0> raise ArgumentError, "One size must be 0" rescue $!
=> #
=end

matrix.rb.raise.patch Magnifier (2.07 KB) py _, 02/04/2013 12:28 AM

Associated revisions

Revision 39065
Added by Marc-Andre Lafortune about 1 year ago

  • lib/matrix.rb: Fix error message, patch by pypypy [Bug #7777]

History

#1 Updated by Marc-Andre Lafortune about 1 year ago

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

This issue was solved with changeset r39065.
py, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/matrix.rb: Fix error message, patch by pypypy [Bug #7777]

Also available in: Atom PDF