Module: ServerEngine::Win32
- Extended by:
- Fiddle::Importer
- Defined in:
- lib/serverengine.rb
Class Method Summary collapse
Class Method Details
.ruby_bin_path ⇒ Object
53 54 55 56 57 58 |
# File 'lib/serverengine.rb', line 53 def self.ruby_bin_path ruby_bin_path_buf = Fiddle::Pointer.malloc(1024) len = GetModuleFileNameW(0, ruby_bin_path_buf, ruby_bin_path_buf.size / 2) path_bytes = ruby_bin_path_buf[0, len * 2] path_bytes.encode('UTF-8', 'UTF-16LE').gsub(/\\/, '/') end |