I would recommend not to rely on whether an object is Ruby object or .NET object if possible. You might be surprised to get a COM object, a Python object, DLR expand, etc. if you do so. Use rather respond_to?, include? to ask for specific methods/protocols.
Tomas -----Original Message----- From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Michael Letterle Sent: Tuesday, April 28, 2009 11:10 AM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] [IronPython] Telling .NET classes from Python objects Class#to_clr_type? Returns nil for custom Ruby objects... depends on what you're looking for... On Tue, Apr 28, 2009 at 1:38 PM, Ivan Porto Carrero <i...@flanders.co.nz> wrote: > +1 for this question only I need it to implement different binding > strategies in IronMVC. > > IronRuby in Action (http://manning.com/carrero) > > Winston Churchill - "The best argument against democracy is a five-minute > conversation with the average voter." > > On Tue, Apr 28, 2009 at 7:35 PM, Michael Foord <fuzzy...@voidspace.org.uk> > wrote: >> >> Hello guys, >> >> I'm continuing my work on generating pi files for the Wing IDE. Actually >> everything I encounter will be a .NET type, but in general what is the best >> way of telling if an object is a .NET type or a Python type? >> >> Obviously for the primitives it is a moot point - but I'm talking about >> user defined classes. >> >> Michael >> >> -- >> http://www.ironpythoninaction.com/ >> http://www.voidspace.org.uk/blog >> >> >> _______________________________________________ >> Users mailing list >> us...@lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core@rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle IronRuby MVP http://blog.prokrams.com _______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core