Closed DanRathbun closed 13 years ago
I can't make them module functions. If I do that they couldn't be mixed into classes. I'm not sure why you can't include them within another module. Perhaps there's a bug in windows-api?
Dan
DJB said, "I can't make them module functions. If I do that they couldn't be mixed into classes." -- wrong see the the other thread.
DJB said," I'm not sure why you can't include them within another module."
-- Because.. include()
and extend()
work differently depending upon if the receiver is a class or another module or an instance object.
Generally.. the "mixin" instance methods get "mixed-into" classes but not modules; and the reverse for module methods.
As per the other thread, yes, I understand that they can be mixed in, but they become private, making them useless. Rejected.
process.rb : (line 150)
(1) make
windows_64?()
amodule_function
: module_function def windows_64?method code as is
(2) Add a wrapper method to system_info.rb to complement the other versioning methods. module_function def windows_64? require('windows/process') Process::windows_64? end The alternative to
require
ing 'windows/process' for the system_info.rb file, is to create API calls within theSystemInfo
module for theIsWow64Process()
andGetCurrentProcess()
functions.