Forum: IronRuby Re: apparently only with extension methods nil != System::Object

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ivan P. (Guest)
on 2009-05-01 18:25
(Received via mailing list)
I've done some more investigation and it appears that it has to do with
Extension methods.

public static bool IsNull(this object value)
return value == null;


public static bool IsNull2(object value)
return value == null;

>>> System::Web::Mvc::IronRuby::Extensions::ObjectExtensions.is_null nil
:0: can't convert NilClass into Object (TypeError)

>>> System::Web::Mvc::IronRuby::Extensions::ObjectExtensions.is_null2 nil
=> true

I've commented the issue on codeplex but couldn't change the title of

Author of IronRuby in Action (

Andy Warhol
- "I am a deeply superficial person."
This topic is locked and can not be replied to.