Kero van Gelder wrote:
> Hi!
....
> B.new() { puts "hello" }  # results in two lines printed, OK
> B.new()                   # nothing printed :(
> 
Hi,

this is what I got (with todays CVS)

---
class A
   def initialize
     if block_given?
       p "A block"
     else
       p "A no-block"
     end
   end
end

class B < A
   def initialize
     super &(proc { puts "world" })
     if block_given?
       p "B block"
     else
       p "B no-block"
     end
   end
end

B.new() { puts "hello" }
B.new()
---
"A block"
"B block"
"A block"
"B no-block"
---

and

---
class A
   def initialize
     if block_given?
       p "A block"
     else
       p "A no-block"
     end
   end
end

class B < A
   def initialize
     super { puts "world" }
     if block_given?
       p "B block"
     else
       p "B no-block"
     end
   end
end

B.new() { puts "hello" }
B.new()
---
"A block"
"B block"
"A no-block"
"B no-block"
---



/Christoph