RubyCLR now inlines C#:

class InliningTests < TestCase
def test_class_inline
Inline::compile :csharp, <<-EOF
namespace Scratch {
public class Fibonnaci {
public static long Calc(long n) {
long x1 = 1, x2 = 2, tmp;
for (long i = 1; i < n; ++i) {
x1 += x2;
tmp = x2; x2 = x1; x1 = tmp;
}
return x1;
}
}
}
EOF
assert_equal 8, Scratch::Fibonnaci.calc(5)
end
end

I shell out to the C# compiler to compile the embedded C# source code. I’ll be adding some code to inline C# methods as well so that you can define a Ruby method signature that has a C# implementation.

Update: Please disregard this grotesque hack. See the new and improved version.