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
zzak 4ba88161ee * ext/dl/lib/dl.rb: Deprecation notice for DL
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27 23:27:36 +00:00

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