CLR DateTime type is currently mapped to Time Ruby class, so "new" uses only Ruby constructors to be compatible. However, you can use clr_new to call the CLR constructor for any CLR type with a public constructor:
Time.clr_new(2009, 9, 28) You can also get the constructor method and call it like so: Time.clr_ctor.call(2009, 9, 28) This is useful when there are multiple overloads of the constructor among which we are not able to choose based upon the types of the actual arguments. Tomas From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Patrick Brown Sent: Thursday, November 12, 2009 3:49 PM To: ironruby-core@rubyforge.org Subject: [Ironruby-core] call an overloaded constructor?? Hi Is there a way for me to call an overloaded constructor?? I want to say date = new DateTime(2009,9,28) using IronRuby 0.9.2. I have been searching quite a bit and haven't seen anything so far. Thank you, Patrick
_______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core