summaryrefslogtreecommitdiffstats
path: root/ruby.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-27 04:55:55 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-27 04:55:55 +0000
commitb9a4340cf2c33ee39f6291c3b0cebbd9cfac2c62 (patch)
tree52ec9a958d80cdead6c9f608a749d6e8767c3202 /ruby.c
parente08b56b9f70211526c89b3820fec5d8946e4cc53 (diff)
downloadruby-b9a4340cf2c33ee39f6291c3b0cebbd9cfac2c62.tar.gz
ruby-b9a4340cf2c33ee39f6291c3b0cebbd9cfac2c62.tar.xz
ruby-b9a4340cf2c33ee39f6291c3b0cebbd9cfac2c62.zip
* ruby.c (ruby_init_loadpath_safe): suppressed warnings.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ruby.c b/ruby.c
index 2bfd88c89..bcc49d4ef 100644
--- a/ruby.c
+++ b/ruby.c
@@ -370,8 +370,11 @@ ruby_init_loadpath_safe(int safe_level)
VALUE fname = rb_str_new_cstr(dli.dli_fname);
sopath = rb_file_absolute_path(fname, Qnil);
rb_str_resize(fname, 0);
- libpath = RSTRING_PTR(sopath);
}
+ else {
+ sopath = rb_str_new(0, 0);
+ }
+ libpath = RSTRING_PTR(sopath);
#endif
#if !VARIABLE_LIBPATH