Forum: IronRuby Calling super from CLS override

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0e5987d3f0456799c5327d5ae47b72e1?d=identicon&s=25 Andrew Peters (Guest)
on 2008-10-30 04:38
(Received via mailing list)
Hi,

Was wondering if this is currently possible as I'm currently getting:

System.ArgumentException : wrong number or type of arguments for
`Render'
  at _stub_$19##19(Closure , CallSite , RubyMethodScope , Object , Proc
, Object )
  C:\Dev\ironruby\trunk\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs(40,0):
at System.Scripting.Actions.MatchCaller.Call4[T0,T1,T2,T3,TRet](Func`6
target, CallSite site, Object[] args)
  C:\Dev\ironruby\trunk\src\Microsoft.Scripting.Core\Actions\CallSite.cs(275,0):
at System.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
  C:\Dev\ironruby\trunk\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs(52,0):
at
System.Scripting.Actions.UpdateDelegates.Update4[T,T0,T1,T2,T3,TRet](CallSite
site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)

// c#

public abstract class ViewBase {
  public virtual void Render(TextWriter textWriter)
  {
  }
}

// rb

class MyView < ViewBase
  def Render(text_writer)
    super
  end
end

Cheers,

Andrew.
F983f0c990cba2fe743ef62a975ec99c?d=identicon&s=25 Curt Hagenlocher (Guest)
on 2008-10-30 05:43
(Received via mailing list)
I'm fairly sure this was working at some point -- my bad for not adding
an appropriate test :(.
Ade8632553a9243ae05fc920f68644c1?d=identicon&s=25 Jim Deville (Guest)
on 2008-10-30 07:53
(Received via mailing list)
I'll try to get the barebones structure in tomorrow so we can get tests
in.

JD
________________________________________
From: ironruby-core-bounces@rubyforge.org
[ironruby-core-bounces@rubyforge.org] On Behalf Of Curt Hagenlocher
[curth@microsoft.com]
Sent: Wednesday, October 29, 2008 9:43 PM
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] Calling super from CLS override

I'm fairly sure this was working at some point -- my bad for not adding
an appropriate test :(.
This topic is locked and can not be replied to.