Skip to content

Instantly share code, notes, and snippets.

@jfirebaugh
Created April 10, 2012 21:51
Show Gist options
  • Select an option

  • Save jfirebaugh/2354864 to your computer and use it in GitHub Desktop.

Select an option

Save jfirebaugh/2354864 to your computer and use it in GitHub Desktop.
it "ensures the IO's file descriptor is closed in exec'ed processes" do
@io.close_on_exec = true
ruby_exe("IO.open(#{@io.fileno}) rescue print $!.class", :escape => true).should == "Errno::EBADF"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment