Created
June 9, 2012 16:49
-
-
Save djberg96/2901753 to your computer and use it in GitHub Desktop.
private_class_method confusion
This file contains hidden or 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
require 'ffi' | |
module Process::Functions | |
extend FFI::Library | |
ffi_lib :kernel32 | |
attach_function :CloseHandle, [:ulong], :bool | |
private_class_method :CloseHandle | |
end | |
module Process | |
extend Process::Functions | |
# private_class_method :CloseHandle # => This works as expected if here | |
end | |
p Process.respond_to?(:CloseHandle) # true? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment