summaryrefslogtreecommitdiff
path: root/rb/src/IceRuby/Communicator.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2010-02-15 16:46:51 -0800
committerMark Spruiell <mes@zeroc.com>2010-02-15 16:46:51 -0800
commitfa528e7ec8458904548eeb724d8b3fe272bd4c63 (patch)
tree967ffcb59dc13e12e1a2fbd8fdf5c573e9b0ad99 /rb/src/IceRuby/Communicator.cpp
parentminor fixes to makefiles (diff)
downloadice-fa528e7ec8458904548eeb724d8b3fe272bd4c63.tar.bz2
ice-fa528e7ec8458904548eeb724d8b3fe272bd4c63.tar.xz
ice-fa528e7ec8458904548eeb724d8b3fe272bd4c63.zip
bug 4633 - ICE_CONFIG fixes
Diffstat (limited to 'rb/src/IceRuby/Communicator.cpp')
-rw-r--r--rb/src/IceRuby/Communicator.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/rb/src/IceRuby/Communicator.cpp b/rb/src/IceRuby/Communicator.cpp
index 9a78f0346ab..c52bc4595ca 100644
--- a/rb/src/IceRuby/Communicator.cpp
+++ b/rb/src/IceRuby/Communicator.cpp
@@ -100,7 +100,7 @@ IceRuby_initialize(int argc, VALUE* argv, VALUE self)
//
// Use the with-args or the without-args version of initialize()?
//
- bool hasArgs = !seq.empty();
+ bool hasArgs = !NIL_P(args);
Ice::InitializationData data;
if(!NIL_P(initData))
@@ -126,8 +126,14 @@ IceRuby_initialize(int argc, VALUE* argv, VALUE self)
volatile VALUE progName = callRuby(rb_gv_get, "$0");
seq.insert(seq.begin(), getString(progName));
- data.properties = Ice::createProperties(seq, data.properties);
-
+ if(hasArgs)
+ {
+ data.properties = Ice::createProperties(seq, data.properties);
+ }
+ else if(!data.properties)
+ {
+ data.properties = Ice::createProperties();
+ }
//
// Disable collocation optimization, otherwise an invocation on a
// collocated servant results in a CollocationOptimizationException