-
-
Save anonymous/1ddf03ac969b7b070bfef20477ecbc43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Foo | |
module Symbols__ | |
module ExtLibC | |
extend Fiddle::Importer | |
dllload "cygwin1.dll" | |
extern "int puts(const char*);" | |
end | |
end | |
def self.method_missing(m, *a, &b) | |
if Symbols__::ExtLibC.respond_to?(m) | |
Symbols__::ExtLibC.public_send(m, *a, &b) | |
else | |
super | |
end | |
end | |
end | |
p Foo.puts("Hello") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment