IronRuby.Builtins.RubyStruct.StructReferenceEquals C# (CSharp) Method

StructReferenceEquals() public method

public StructReferenceEquals ( RubyStruct other ) : bool
other RubyStruct
return bool
        public bool StructReferenceEquals(RubyStruct other) {
            // TODO: compare non-singleton classes?
            return ReferenceEquals(this, other) || (other != null && ImmediateClass.GetNonSingletonClass() == other.ImmediateClass.GetNonSingletonClass());
        }

Usage Example

Example #1
0
        public static bool Equals(BinaryOpStorage /*!*/ equals, RubyStruct /*!*/ self, object obj)
        {
            var other = obj as RubyStruct;

            if (!self.StructReferenceEquals(other))
            {
                return(false);
            }
            Debug.Assert(self.ItemCount == other.ItemCount);

            return(IListOps.Equals(equals, self.Values, other.Values));
        }
All Usage Examples Of IronRuby.Builtins.RubyStruct::StructReferenceEquals