Project

General

Profile

Actions

Bug #790

closed

Unexpected Behaviour: Fibers as superclass don

Added by Skade (Florian Gilcher) almost 16 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
Backport:
[ruby-core:20086]

Description

=begin
This is possibly just undocumented and intended behaviour:
=end

Actions #1

Updated by Skade (Florian Gilcher) almost 16 years ago

=begin
Sorry, hit the wrong button:

Fibers as superclass don't call initialize of derived class. This is probably intended, but not documented.

Description by Wolfgang NĂ¡dasi-Donner:

The following code...

class Hugo < Fiber
def initialize(&b)
puts "in 'Hugo'" # !!! never executed !!!
super(&b)
end
end

h = Hugo.new{42}
p h

...results in...

ruby19 myfiber_test.rb
#Hugo:0xb24ee0
Exit code: 0

...which I didn't expect.

=end

Actions #2

Updated by matz (Yukihiro Matsumoto) almost 16 years ago

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

=begin
Applied in changeset r20388.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0