diff options
Diffstat (limited to 'cpp/src/Slice/RubyUtil.cpp')
-rw-r--r-- | cpp/src/Slice/RubyUtil.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp index f0c664629f8..bd995ce21aa 100644 --- a/cpp/src/Slice/RubyUtil.cpp +++ b/cpp/src/Slice/RubyUtil.cpp @@ -182,9 +182,13 @@ Slice::Ruby::CodeVisitor::visitClassDecl(const ClassDeclPtr& p) string name = "T_" + fixIdent(p->name(), IdentToUpper); _out << sp << nl << "if not defined?(" << getAbsolute(p, IdentToUpper, "T_") << ')'; _out.inc(); - _out << nl << name << " = ::Ice::__declareClass('" << scoped << "')"; - if(!p->isLocal()) + if(p->isLocal()) { + _out << nl << name << " = ::Ice::__declareLocalClass('" << scoped << "')"; + } + else + { + _out << nl << name << " = ::Ice::__declareClass('" << scoped << "')"; _out << nl << name << "Prx = ::Ice::__declareProxy('" << scoped << "')"; } _out.dec(); @@ -562,9 +566,13 @@ Slice::Ruby::CodeVisitor::visitClassDefStart(const ClassDefPtr& p) // _out << sp << nl << "if not defined?(" << getAbsolute(p, IdentToUpper, "T_") << ')'; _out.inc(); - _out << nl << "T_" << name << " = ::Ice::__declareClass('" << scoped << "')"; - if(!p->isLocal()) + if(p->isLocal()) + { + _out << nl << "T_" << name << " = ::Ice::__declareLocalClass('" << scoped << "')"; + } + else { + _out << nl << "T_" << name << " = ::Ice::__declareClass('" << scoped << "')"; _out << nl << "T_" << name << "Prx = ::Ice::__declareProxy('" << scoped << "')"; } _out.dec(); |