rf-web/vendor/bundle/gems/ffi-1.11.1/samples/getlogin.rb

9 lines
173 B
Ruby
Raw Normal View History

2019-10-21 08:18:17 +00:00
require 'rubygems'
require 'ffi'
module Foo
extend FFI::Library
ffi_lib FFI::Library::LIBC
attach_function :getlogin, [ ], :string
end
puts "getlogin=#{Foo.getlogin}"