Looks like Nick has also posted his findings on IronRuby ... what can I say, it was just released today!! Anyway...I was playing around with IronRuby earlier this evening trying to see how it handled generics...well, currently it doesn't (remember, the code is alpha...but pretty sweet!).  I created a sample C# class (cleverly) called, MyClass:

using System;

namespace CSharpClass
{
    public class MyClass
    {
        // Currently this event type cannot be called from IronRuby.
        public EventHandler<CustomArgs> Custom;

        // This event type will work ok!
        public event EventHandler NonCustom;

        public void RaiseEvents(string name)
        {
            if(!string.IsNullOrEmpty(name))
            {
                Console.WriteLine("Caller is {0}", name);
                
                OnCustom(name);
                OnNonCustom(name);
            }
        }

        protected virtual void OnCustom(string name)
        {
            if(Custom != null)
            {
                CustomArgs args = new CustomArgs();
                args.Name = name;
                Custom(this, args);
            }
        }

        protected  virtual void OnNonCustom(string name)
        {
            if(NonCustom != null)
            {
                CustomArgs args = new CustomArgs();
                args.Name = name;

                NonCustom(this, args);
            }
        }
    }

    // Custom event class
    public class CustomArgs : EventArgs
    {
        private string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }
    }
}

From here, I created the following IronRuby include file called MyClass.rb:

require 'mscorlib'
require 'CSharpClass, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null';

CustomClass = CSharpClass::MyClass;
Console = System::Console;

Notice that the fully qualified name for the assembly needs to named.  Otherwise, it will look for it in the GAC (as you can note, my CSharpClass assembly is not signed).

After having this include file, I created my IronRubyTest.rb file that contained the calling program:

require 'MyClass'

my_class = CustomClass.new

my_class.NonCustom do |sender, args|
    Console.WriteLine 'Catching the event in ' + args.Name
end

# Generic event handler will not work!
# my_class.Custom do |sender, args|
#    Console.WriteLine 'Catching the event in ' + args.Name
# end

my_class.RaiseEvents 'IronRuby'

Console.Write 'PRESS <ENTER> to exit...'
Console.ReadLine

Unfortunately, the  is not currently supported.  But it is still neat to show the dynamism of IronRuby.  Where you ask?  Well, the event handler for the NonCustom event just specifies the name of the variable args.  However, if you look back at the OnNonCustom method in the C# source, you will see that I'm passing an object of type CustomArgs.  Regardless of type, IronRuby was able to figure out the correct type.

Aren't these samples fun?  To get the sample files, go here.