I'm in love with IronRuby

I’ve been playing with IronRuby a lot lately, and it’s turning out to be every bit as amazing as I’d hoped it would be. I’m constantly thinking about new stuff to do with it, but one of the easiest low hanging fruits is rewriting our existing unit tests in ruby.

I’ve been putting together a little library of IronRuby specific modules for tests. You’ve got to love being able to do things like this:

class Class
  def should_implement(interface)
    !to_clr_type.nil? && !to_clr_type.get_interface(interface).nil?
  end
end

>>> MyClass.should_implement "ISomething"
=> true

Bringing the power of Ruby to .NET is going to be incredible. It feels great clicking both the Ruby and .NET tags on a post. More on this to come…

This entry was posted on Sat, 21 Jun 2008 17:08:00 GMT and Posted in , . You can follow any any response to this entry through the Atom feed. You can leave a comments, .


Comments

Leave a response

Leave a comment