This code works fine in C#:
Expression.Lambda(LambdaBody);
But none of the methods for building AST seem to visible from IronRuby. I required Microsoft.Scripting.Core and Microsoft.Scripting libraries. Do I need something else? Here is the IronRuby code:
require 'C:\reorganize\software\ironruby-1.0rc3\ironruby\bin\microsoft.scripting.core'
require 'C:\reorganize\software\ironruby-1.0rc3\ironruby\bin\microsoft.dynamic'
require 'C:\reorganize\software\ironruby-1.0rc3\ironruby\bin\microsoft.scripting'
include Microsoft::Scripting::Ast
p Expression.Lambda(lambda_body) #i have already constructed the lambda body
gives:
undefined method `Lambda' for #<TypeGroup: Microsoft::Scripting::Ast::Expression, Microsoft::Scripting::Ast::Expression[TDelegate]> (NoMethodError)
from -e:1:in `load'
from -e:1