Nil != null?

I had specs that used to work but now apparently they don’t anymore.
I’d expect that a nil from ruby maps to null in C# but this doesn’t seem
be the case.

I’m using the following code

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

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

:0: can’t convert NilClass into Object (TypeError)

I’d expect it to return true :wink:

Author of IronRuby in Action (

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs