From 7924fca23e96b9b5bdfd400beeb09e42a7a4c6de Mon Sep 17 00:00:00 2001 From: ttate Date: Thu, 13 Nov 2003 11:46:31 +0000 Subject: 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 --- ext/dl/handle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/dl') diff --git a/ext/dl/handle.c b/ext/dl/handle.c index 9ca2fa0a54..95b6dc74dc 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: -- cgit v1.2.3