1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/dl/lib/dl.rb
naruse 75033ea16f * ext/dl/lib/dl.rb: don't require when already loaded.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-12 15:28:47 +00:00

12 lines
176 B
Ruby

require 'dl.so'
begin
require 'fiddle' unless Object.const_defined?(:Fiddle)
rescue LoadError
end
module DL
def self.fiddle?
Object.const_defined?(:Fiddle)
end
end