[ruby-trunk - Bug #9380][Assigned] Enumerator does not work in timeout

Issue #9380 has been reported by nobu (Nobuyoshi N.).


Bug #9380: Enumerator does not work in timeout
https://bugs.ruby-lang.org/issues/9380

Author: nobu (Nobuyoshi N.)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi N.)
Category: lib
Target version: current: 2.2.0
ruby -v: r44522
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN

Enumeratorとtimeoutの組み合わせで、Timeout::Errorが起きるべきところでArgumentErrorが発生します。

$ ruby -v -rtimeout -e ‘def (o=Object.new).each; sleep; end’ -e
‘Timeout.timeout(0.01) {o.to_enum.next}’
ruby 2.2.0dev (2014-01-07 trunk 44522) [universal.x86_64-darwin13.0]
/opt/local/lib/ruby/2.2.0/timeout.rb:39:in throw': uncaught throw #<Timeout::ExitException: Timeout::ExitException> (ArgumentError) from /opt/local/lib/ruby/2.2.0/timeout.rb:39:inexception’
from -e:1:in sleep' from -e:1:ineach’
from -e:1:in `each’

Issue #9380 has been updated by nobu (Nobuyoshi N.).

Description updated


Bug #9380: Enumerator does not work in timeout
https://bugs.ruby-lang.org/issues/9380#change-44164

Author: nobu (Nobuyoshi N.)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi N.)
Category: lib
Target version: current: 2.2.0
ruby -v: r44522
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN

=begin
(({Enumerator}))と(({timeout}))の組み合わせで、(({Timeout::Error}))が起きるべきところで(({ArgumentError}))が発生します。

$ ruby -v -rtimeout -e ‘def (o=Object.new).each; sleep; end’ -e
‘Timeout.timeout(0.01) {o.to_enum.next}’
ruby 2.2.0dev (2014-01-07 trunk 44522) [universal.x86_64-darwin13.0]
/opt/local/lib/ruby/2.2.0/timeout.rb:39:in throw': uncaught throw #<Timeout::ExitException: Timeout::ExitException> (ArgumentError) from /opt/local/lib/ruby/2.2.0/timeout.rb:39:inexception’
from -e:1:in sleep' from -e:1:ineach’
from -e:1:in `each’
=end

Issue #9380 has been updated by nobu (Nobuyoshi N.).

Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN to
1.9.3: DONTNEED, 2.0.0: DONTNEED, 2.1: REQUIRED


Bug #9380: Enumerator does not work in timeout
https://bugs.ruby-lang.org/issues/9380#change-44166

Author: nobu (Nobuyoshi N.)
Status: Closed
Priority: Normal
Assignee: nobu (Nobuyoshi N.)
Category: lib
Target version: current: 2.2.0
ruby -v: r44522
Backport: 1.9.3: DONTNEED, 2.0.0: DONTNEED, 2.1: REQUIRED

=begin
(({Enumerator}))と(({timeout}))の組み合わせで、(({Timeout::Error}))が起きるべきところで(({ArgumentError}))が発生します。

$ ruby -v -rtimeout -e ‘def (o=Object.new).each; sleep; end’ -e
‘Timeout.timeout(0.01) {o.to_enum.next}’
ruby 2.2.0dev (2014-01-07 trunk 44522) [universal.x86_64-darwin13.0]
/opt/local/lib/ruby/2.2.0/timeout.rb:39:in throw': uncaught throw #<Timeout::ExitException: Timeout::ExitException> (ArgumentError) from /opt/local/lib/ruby/2.2.0/timeout.rb:39:inexception’
from -e:1:in sleep' from -e:1:ineach’
from -e:1:in `each’
=end

チケット #9380 が Nobuyoshi N. によって更新されました。

説明 を更新


Bug #9380: Enumerator does not work in timeout
https://bugs.ruby-lang.org/issues/9380#change-44379

  • 作成者: Nobuyoshi N.
  • ステータス: Closed
  • 優先度: Normal
  • 担当者: Nobuyoshi N.
  • カテゴリ: lib
  • 対象バージョン: current: 2.2.0
  • ruby -v: r44522
  • Backport: 1.9.3: DONTNEED, 2.0.0: DONTNEED, 2.1: REQUIRED

Enumeratortimeoutの組み合わせで、Timeout::Errorが起きるべきところでArgumentErrorが発生します。

$ ruby -v -rtimeout -e 'def (o=Object.new).each; sleep; end' -e 
'Timeout.timeout(0.01) {o.to_enum.next}'
ruby 2.2.0dev (2014-01-07 trunk 44522) [universal.x86_64-darwin13.0]
/opt/local/lib/ruby/2.2.0/timeout.rb:39:in `throw': uncaught throw 
#<Timeout::ExitException: Timeout::ExitException> (ArgumentError)
  from /opt/local/lib/ruby/2.2.0/timeout.rb:39:in `exception'
  from -e:1:in `sleep'
  from -e:1:in `each'
  from -e:1:in `each'

Issue #9380 has been updated by Yui NARUSE.

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


Bug #9380: Enumerator does not work in timeout
https://bugs.ruby-lang.org/issues/9380#change-45289

  • Author: Nobuyoshi N.
  • Status: Closed
  • Priority: Normal
  • Assignee: Nobuyoshi N.
  • Category: lib
  • Target version: current: 2.2.0
  • ruby -v: r44522
  • Backport: 1.9.3: DONTNEED, 2.0.0: DONTNEED, 2.1: DONE

Enumeratortimeoutの組み合わせで、Timeout::Errorが起きるべきところでArgumentErrorが発生します。

$ ruby -v -rtimeout -e 'def (o=Object.new).each; sleep; end' -e 
'Timeout.timeout(0.01) {o.to_enum.next}'
ruby 2.2.0dev (2014-01-07 trunk 44522) [universal.x86_64-darwin13.0]
/opt/local/lib/ruby/2.2.0/timeout.rb:39:in `throw': uncaught throw 
#<Timeout::ExitException: Timeout::ExitException> (ArgumentError)
  from /opt/local/lib/ruby/2.2.0/timeout.rb:39:in `exception'
  from -e:1:in `sleep'
  from -e:1:in `each'
  from -e:1:in `each'

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs