<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Lucida Console";
        panose-1:2 11 6 9 4 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Consolas","serif";}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=Section1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>What is the class being created that fails?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Tomas<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> ironruby-core-bounces@rubyforge.org [mailto:ironruby-core-bounces@rubyforge.org] <b>On Behalf Of </b>Ivan Porto Carrero<br><b>Sent:</b> Saturday, July 25, 2009 4:01 PM<br><b>To:</b> ironruby-core<br><b>Subject:</b> [Ironruby-core] Can't create instances<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Hi<o:p></o:p></p><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>I just updated from github and ironrubymvc broke.<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>This method would happily execute before the update.<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><div><p class=MsoNormal>public object CreateInstance(RubyClass rubyClass)<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return Operations.CreateInstance(rubyClass);<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Now it throws an exception. Do I need to change something?<o:p></o:p></p></div><div><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'><o:p>&nbsp;</o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'><o:p>&nbsp;</o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>ArgumentException: wrong number of arguments (0 for 1)]<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   Microsoft.Scripting.Interpreter.ThrowInstruction.Run(InterpretedFrame frame) +58<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   Microsoft.Scripting.Interpreter.Interpreter.RunInstructions(InterpretedFrame frame) +90<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) +104<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   Microsoft.Scripting.Interpreter.LightLambda.Run2(T0 arg0, T1 arg1) +337<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   IronRuby.Runtime.Calls.InterpretedFuncDispatcher`2.Invoke(CallSite callSite, T0 arg0) +574<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0) +1217<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   CallSite.Target(Closure , CallSite , Object ) +414<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0) +1217<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   Microsoft.Scripting.Runtime.DynamicOperations.CreateInstance(Object obj, Object[] parameters) +209<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   Microsoft.Scripting.Hosting.ObjectOperations.CreateInstance(Object obj, Object[] parameters) +51<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   System.Web.Mvc.IronRuby.Core.RubyEngine.CreateInstance(RubyClass rubyClass) in C:\dev\ironrubymvc\IronRubyMvc\Core\RubyEngine.cs:100<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   System.Web.Mvc.IronRuby.Controllers.RubyControllerFactory.ConfigureController(RubyClass rubyClass, RequestContext requestContext) in C:\dev\ironrubymvc\IronRubyMvc\Controllers\RubyControllerFactory.cs:87<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   System.Web.Mvc.IronRuby.Controllers.RubyControllerFactory.LoadController(RequestContext requestContext, String controllerName) in C:\dev\ironrubymvc\IronRubyMvc\Controllers\RubyControllerFactory.cs:73<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   System.Web.Mvc.IronRuby.Controllers.RubyControllerFactory.CreateController(RequestContext requestContext, String controllerName) in C:\dev\ironrubymvc\IronRubyMvc\Controllers\RubyControllerFactory.cs:40<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +128<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) +57<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) +7<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Lucida Console"'>   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +75<o:p></o:p></span></pre></div><p class=MsoNormal style='margin-bottom:12.0pt'>---<br>Met vriendelijke groeten - Best regards - Salutations<br>Ivan Porto Carrero<br>Blog: <a href="http://flanders.co.nz">http://flanders.co.nz</a><br>Twitter: <a href="http://twitter.com/casualjim">http://twitter.com/casualjim</a><br>Author of IronRuby in Action (<a href="http://manning.com/carrero">http://manning.com/carrero</a>)<o:p></o:p></p></div></div></body></html>