Today’s a good day of you’re a .NET developer and want to use Ruby. Wayne Kelly of the Queensland University of Technology has announced the first public beta of their native Ruby .NET compiler that generates verifiable CIL!
I just ran their unit tests here. No attempt to interop with .NET libraries appears to be enabled in this release, but it definitely compiles a non-trivial chunk of the Ruby language. Here’s a sample:
class IterTest
def initialize(e); @body = e; end
def each0(&block); @body.each(&block); end
def each1(&block); @body.each {|*x| block.call(*x) } end
def each2(&block); @body.each {|*x| block.call(x) } end
def each3(&block); @body.each {|x| block.call(*x) } end
def each4(&block); @body.each {|x| block.call(x) } end
def each5; @body.each {|*x| yield(*x) } end
def each6; @body.each {|*x| yield(x) } end
def each7; @body.each {|x| yield(*x) } end
def each8; @body.each {|x| yield(x) } end
def f(a)
a
end
end