summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2017-02-13 20:40:50 +0100
committerJose <jose@zeroc.com>2017-02-13 20:40:50 +0100
commit5b04c792293378240c45f822e729ca88172304f8 (patch)
tree585d6f8049cba61f6750484b9c791485b2daeb2c /cpp
parentFixed (ICE-7489) - Add JS Slice tests (diff)
downloadice-5b04c792293378240c45f822e729ca88172304f8.tar.bz2
ice-5b04c792293378240c45f822e729ca88172304f8.tar.xz
ice-5b04c792293378240c45f822e729ca88172304f8.zip
Fixed (ICE-7276) - Comparing struct with Ice::Unset results in error in Ruby
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/Slice/RubyUtil.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp
index 19cb48567c9..3a670035bc4 100644
--- a/cpp/src/Slice/RubyUtil.cpp
+++ b/cpp/src/Slice/RubyUtil.cpp
@@ -905,13 +905,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";