diff options
Diffstat (limited to 'rb/src/IceRuby/ObjectFactory.cpp')
-rw-r--r-- | rb/src/IceRuby/ObjectFactory.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/rb/src/IceRuby/ObjectFactory.cpp b/rb/src/IceRuby/ObjectFactory.cpp index 7e46d958785..499f6f9ac9c 100644 --- a/rb/src/IceRuby/ObjectFactory.cpp +++ b/rb/src/IceRuby/ObjectFactory.cpp @@ -32,7 +32,20 @@ IceRuby::ObjectFactory::create(const string& id) // // Get the type information. // - ClassInfoPtr info = lookupClassInfo(id); + ClassInfoPtr info; + if(id == Ice::Object::ice_staticId()) + { + // + // When the ID is that of Ice::Object, it indicates that the stream has not + // found a factory and is providing us an opportunity to preserve the object. + // + info = lookupClassInfo("::Ice::UnknownSlicedObject"); + } + else + { + info = lookupClassInfo(id); + } + if(!info) { return 0; |