summaryrefslogtreecommitdiff
path: root/ext/dl/handle.c
diff options
context:
space:
mode:
authorttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-13 11:46:31 +0000
committerttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-13 11:46:31 +0000
commit7924fca23e96b9b5bdfd400beeb09e42a7a4c6de (patch)
tree515517428477b4c1789857a930f43f2389515059 /ext/dl/handle.c
parente008c87423eb369afb4a189ac0b700c8920b7fa6 (diff)
Merge the patch of [ruby-ext:02242]. (Thanks, Masahiro Sakai)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/handle.c')
-rw-r--r--ext/dl/handle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/dl/handle.c b/ext/dl/handle.c
index 9ca2fa0a542..95b6dc74dcd 100644
--- a/ext/dl/handle.c
+++ b/ext/dl/handle.c
@@ -52,11 +52,11 @@ rb_dlhandle_initialize(int argc, VALUE argv[], VALUE self)
switch (rb_scan_args(argc, argv, "11", &lib, &flag)) {
case 1:
- clib = StringValuePtr(lib);
+ clib = NIL_P(lib) ? NULL : StringValuePtr(lib);
cflag = RTLD_LAZY | RTLD_GLOBAL;
break;
case 2:
- clib = StringValuePtr(lib);
+ clib = NIL_P(lib) ? NULL : StringValuePtr(lib);
cflag = NUM2INT(flag);
break;
default: