summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/dl/handle.c6
-rw-r--r--test/dl/test_handle.rb10
2 files changed, 16 insertions, 0 deletions
diff --git a/ext/dl/handle.c b/ext/dl/handle.c
index 28be36c099d..f5e7a33f7e5 100644
--- a/ext/dl/handle.c
+++ b/ext/dl/handle.c
@@ -51,6 +51,12 @@ static const rb_data_type_t dlhandle_data_type = {
0, dlhandle_free, dlhandle_memsize,
};
+/*
+ * call-seq: close
+ *
+ * Close this DL::Handle. Calling close more than once will raise a
+ * DL::DLError exception.
+ */
VALUE
rb_dlhandle_close(VALUE self)
{
diff --git a/test/dl/test_handle.rb b/test/dl/test_handle.rb
index 487b8d1a347..f2b1de3c209 100644
--- a/test/dl/test_handle.rb
+++ b/test/dl/test_handle.rb
@@ -122,5 +122,15 @@ module DL
handle.disable_close
assert !handle.close_enabled?, 'close is enabled'
end
+
+ def test_NEXT
+ handle = DL::Handle::NEXT
+ assert handle['malloc']
+ end
+
+ def test_DEFAULT
+ handle = DL::Handle::DEFAULT
+ assert handle['malloc']
+ end
end
end