mooc/www/sys/fs/usr/lib/ruby/2.1.0/dl.rb

16 lines
280 B
Ruby

require 'dl.so'
begin
require 'fiddle' unless Object.const_defined?(:Fiddle)
rescue LoadError
end
warn "DL is deprecated, please use Fiddle"
module DL
# Returns true if DL is using Fiddle, the libffi wrapper.
def self.fiddle?
Object.const_defined?(:Fiddle)
end
end