mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
4ba88161ee
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
15 lines
280 B
Ruby
15 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
|