Project

General

Profile

ActionsLike0

Bug #9354

closed

timeout() custom exception class cannot require argument

Added by tmm1 (Aman Karmani) about 11 years ago. Updated about 11 years ago.

Status:
Closed
Target version:
[ruby-core:59511]

Description

The following code works on 2.0.0, but raises on 2.1.0:

require 'timeout'
class MyError < StandardError
def initialize(msg)
super
end
end
timeout(1, MyError){}

$ ruby -v
ruby 2.1.0p0-github (2013-12-31 revision 44488) [x86_64-darwin13.0]
$ ruby /tmp/test.rb
/tmp/test.rb:4:in `initialize': wrong number of arguments (0 for 1) (ArgumentError)

The patch attached resolves this issue.


Files

timeout_klass_arg.patch (795 Bytes) timeout_klass_arg.patch tmm1 (Aman Karmani), 01/03/2014 07:09 PM
#2

Updated by nobu (Nobuyoshi Nakada) about 11 years ago

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

Updated by tmm1 (Aman Karmani) about 11 years ago

  • Assignee set to naruse (Yui NARUSE)
  • Target version set to 2.6
  • % Done changed from 100 to 0
  • Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN to 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: REQUIRED

Updated by nobu (Nobuyoshi Nakada) about 11 years ago

  • Status changed from Closed to Open
  • Assignee deleted (naruse (Yui NARUSE))
  • Target version deleted (2.6)
  • Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: REQUIRED to 1.9.3: DONTNEED, 2.0.0: DONTNEED, 2.1: REQUIRED

Updated by nobu (Nobuyoshi Nakada) about 11 years ago

  • Category set to lib
  • Assignee set to naruse (Yui NARUSE)
  • Target version set to 2.6

Updated by naruse (Yui NARUSE) about 11 years ago

  • Status changed from Open to Closed

Updated by naruse (Yui NARUSE) about 11 years ago

  • Backport changed from 1.9.3: DONTNEED, 2.0.0: DONTNEED, 2.1: REQUIRED to 1.9.3: DONTNEED, 2.0.0: DONTNEED, 2.1: DONE
ActionsLike0

Also available in: Atom PDF