Issue #7777 has been reported by pypypy567 (py _). ---------------------------------------- Bug #7777: wrong use of "Raise" method in matrix.rb https://bugs.ruby-lang.org/issues/7777 Author: pypypy567 (py _) Status: Open Priority: Normal Assignee: marcandre (Marc-Andre Lafortune) Category: Target version: ruby -v: ruby 2.0.0dev (2013-01-07) [i386-mswin32_100] =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 $! => #<ArgumentError: Wrong # of arguments(2 for 3)> 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 `<main>' irb(main):004:0> raise ArgumentError, "One size must be 0" rescue $! => #<ArgumentError: One size must be 0> =end
on 2013-02-03 16:29
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.