# Generated by ffi-gen. Please do not change this file by hand.
require 'ffi'
module foo
extend FFI::Library
ffi_lib 'foo'
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
FOO = 123
end
foo.h
Result:
BAR
is nowhere to be found.Maybe related: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-January/012983.html