9 lines
173 B
Ruby
9 lines
173 B
Ruby
require 'rubygems'
|
|
require 'ffi'
|
|
module Foo
|
|
extend FFI::Library
|
|
ffi_lib FFI::Library::LIBC
|
|
attach_function :getlogin, [ ], :string
|
|
end
|
|
puts "getlogin=#{Foo.getlogin}"
|