diff options
author | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-08-05 01:24:13 +0000 |
---|---|---|
committer | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-08-05 01:24:13 +0000 |
commit | 9dab5bc3b0404fe183f13c0b1c3351eab1bf257a (patch) | |
tree | 73092f18b2864c6668d7d5e65dae6f52aeb6105c /ext/dl/handle.c | |
parent | 45a08a4296b57df13190cb9065ee44974f44c7ce (diff) | |
download | ruby-9dab5bc3b0404fe183f13c0b1c3351eab1bf257a.tar.gz |
Multiple call of the initialize.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/handle.c')
-rw-r--r-- | ext/dl/handle.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/dl/handle.c b/ext/dl/handle.c index 0ba4397010..4b0a129793 100644 --- a/ext/dl/handle.c +++ b/ext/dl/handle.c @@ -75,6 +75,9 @@ rb_dlhandle_initialize(int argc, VALUE argv[], VALUE self) }; #endif Data_Get_Struct(self, struct dl_handle, dlhandle); + if( dlhandle->ptr && dlhandle->open && dlhandle->enable_close ){ + dlclose(dlhandle->ptr); + } dlhandle->ptr = ptr; dlhandle->open = 1; dlhandle->enable_close = 0; |