Created
October 11, 2016 21:33
-
-
Save eam/6affef1ccd15217c09e6e17a65d30692 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ffi' | |
class IO | |
extend FFI::Library | |
ffi_lib 'c' | |
attach_function 'dup2', [:int, :int], :int | |
end | |
IO.dup2(3, 4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment