"Eric Anderson" <eric.anderson / sterlingpresence.com> wrote:

> **** CODE ****
>
> class A
> def method1( argument )
>     yield( argument )
> end
> end
>
> class B < A
> def method1( argument )
>     puts argument
>     super.method1( argument )

      super   #    <----------------###

> end
> end
>
> obj = B.new
> obj.method1( 'foo' ) { |arg| puts arg + 'bar' }
>
> **** CODE ****
>
> Thanks,
>
> Eric

Add parameters to super only if you want to
override its default behaviour of passing
all original parameters on.

#-> foo
#-> foobar


daz