Skip to content

Instantly share code, notes, and snippets.

@djberg96
Created June 9, 2012 16:49
Show Gist options
  • Save djberg96/2901753 to your computer and use it in GitHub Desktop.
Save djberg96/2901753 to your computer and use it in GitHub Desktop.
private_class_method confusion
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