From: Florian Frank Date: 2007-11-29T19:43:26+09:00 Subject: Inhering from Proc in 1.9? Hi, I get the following behaviour from the current trunk version ruby 1.9.0 (2007-11-29 patchlevel 0) [i686-linux]: class Foo < Proc def initialize(foo, &block) @foo = foo super(&block) end attr_reader :foo end if RUBY_VERSION >= "1.9" foo = Foo.new :foo do :bar end # ~> -:12:in `new': wrong number of arguments(1 for 0) (ArgumentError) # ~> from -:12:in `
' foo.foo # => foo.call # => else foo = Foo.new :foo do :bar end foo.foo # => :foo foo.call # => :bar end Inheriting from Proc used to work in 1.8, but now it doesn't. Is this a bug or an intended change? -- Florian Frank