From de6d4f7e7bdb78e5cb443a2e327265b52cde0d44 Mon Sep 17 00:00:00 2001 From: drbrain Date: Tue, 16 Aug 2011 00:34:51 +0000 Subject: * ext/dl: Add documentation. Patch by Vincent Batts. [Ruby 1.9 - Bug #5192] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/dl/lib/dl/import.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ext/dl/lib/dl/import.rb') diff --git a/ext/dl/lib/dl/import.rb b/ext/dl/lib/dl/import.rb index f22a53aa84..eec65cdfd6 100644 --- a/ext/dl/lib/dl/import.rb +++ b/ext/dl/lib/dl/import.rb @@ -31,6 +31,22 @@ module DL end end + # DL::Importer includes the means to dynamically load libraries and build + # modules around them including calling extern functions within the C + # library that has been loaded. + # + # == Example + # + # require 'dl' + # require 'dl/import' + # + # module LibSum + # extend DL::Importer + # dlload './libsum.so' + # extern 'double sum(double*, int)' + # extern 'double split(double)' + # end + # module Importer include DL include CParser -- cgit v1.2.3