summaryrefslogtreecommitdiff
path: root/rb/src/IceRuby/Communicator.cpp
diff options
context:
space:
mode:
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