From bd4c5f908f33362fb705ba466f381a23ca90d1bb Mon Sep 17 00:00:00 2001 From: Jose Date: Mon, 13 Feb 2017 20:40:50 +0100 Subject: Fixed (ICE-7276) - Comparing struct with Ice::Unset results in error in Ruby --- cpp/src/Slice/RubyUtil.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'cpp/src/Slice/RubyUtil.cpp') diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp index 6364e88133e..87b766009be 100644 --- a/cpp/src/Slice/RubyUtil.cpp +++ b/cpp/src/Slice/RubyUtil.cpp @@ -1005,13 +1005,10 @@ Slice::Ruby::CodeVisitor::visitStructStart(const StructPtr& p) _out.inc(); _out << nl << "return false if"; _out.inc(); + _out << " !other.is_a? " << getAbsolute(p, IdentToUpper); for(MemberInfoList::iterator r = memberList.begin(); r != memberList.end(); ++r) { - if(r != memberList.begin()) - { - _out << " or"; - } - _out << nl << "@" << r->fixedName << " != other." << r->fixedName; + _out << " or" << nl << "@" << r->fixedName << " != other." << r->fixedName; } _out.dec(); _out << nl << "true"; -- cgit v1.2.3