I was just going to post about this. Currently it is not possible to call the extension methods in System::Linq::Enumerable and System::Linq::Queryable.<br><br>&gt;&gt;&gt; require &#39;System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&#39;<br>
=&gt; true<br>&gt;&gt;&gt; include System::Linq<br>=&gt; Object<br>&gt;&gt;&gt; Queryable<br>=&gt; System::Linq::Queryable<br>&gt;&gt;&gt; Queryable.where<br>:0:in `CallSite.Target&#39;: wrong number of arguments (1 for 2147483647) (ArgumentError)<br>
...<br><br><div class="gmail_quote">2009/4/7 Tomas Matousek <span dir="ltr">&lt;<a href="mailto:Tomas.Matousek@microsoft.com">Tomas.Matousek@microsoft.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="purple" lang="EN-US">

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Method of Queryable take expression trees. Ruby lambdas are not
convertible to expression trees.</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">You need to build the expression tree yourself.</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Tomas</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">

<p><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;">
<a href="mailto:ironruby-core-bounces@rubyforge.org" target="_blank">ironruby-core-bounces@rubyforge.org</a>
[mailto:<a href="mailto:ironruby-core-bounces@rubyforge.org" target="_blank">ironruby-core-bounces@rubyforge.org</a>] <b>On Behalf Of </b>Ivan Porto
Carrero<br>
<b>Sent:</b> Tuesday, April 07, 2009 11:06 AM<br>
<b>To:</b> ironruby-core<br>
<b>Subject:</b> [Ironruby-core] Linq syntax?</span></p>

</div><div><div></div><div class="h5">

<p> </p>

<p>Hi</p>

<div>

<p> </p>

</div>

<div>

<p>What would be the syntax to call Linq methods?</p>

</div>

<div>

<p> </p>

</div>

<div>

<p>for example: </p>

</div>

<div>

<p>I have an IQueryable&lt;Users&gt; and I want to get the
equivalent out of</p>

</div>

<div>

<p> </p>

</div>

<div>

<p>from user in MyRepository.Users</p>

</div>

<div>

<p>where <a href="http://user.name" target="_blank">user.name</a> ==
&quot;somename&quot;</p>

</div>

<div>

<p> </p>

</div>

<div>

<p>That of course is only one example, I want to do a lot more
:)</p>

</div>

<div>

<p> </p>

</div>

<div>

<p>My best guess is that I would have to do something like this
only it doesn&#39;t work</p>

</div>

<div>

<p> </p>

</div>

<div>

<p>System::Linq::Queryable.where(MyRepository.Users, lambda {
|user| <a href="http://user.name" target="_blank">user.name</a> == &quot;somename&quot; })</p>

</div>

<div>

<p> </p>

</div>

<div>

<p>yields wrong number of arguments (2 for 2147483647)</p>

</div>

<div>

<p> </p>

</div>

<div>

<p>So what is the correct way?</p>

</div>

<div>

<p style="margin-bottom: 12pt;">---<br>
Met vriendelijke groeten - Best regards - Salutations<br>
Ivan Porto Carrero<br>
Blog: <a href="http://flanders.co.nz" target="_blank">http://flanders.co.nz</a><br>
Twitter: <a href="http://twitter.com/casualjim" target="_blank">http://twitter.com/casualjim</a><br>
Author of IronRuby in Action (<a href="http://manning.com/carrero" target="_blank">http://manning.com/carrero</a>)</p>

</div>

</div></div></div>

</div>


<br>_______________________________________________<br>
Ironruby-core mailing list<br>
<a href="mailto:Ironruby-core@rubyforge.org">Ironruby-core@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a><br>
<br></blockquote></div><br>