Skip to content

Instantly share code, notes, and snippets.

@jstorimer
Created August 4, 2012 05:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jstorimer/3254777 to your computer and use it in GitHub Desktop.
Save jstorimer/3254777 to your computer and use it in GitHub Desktop.
require 'socket'
# Ruby 1.8
Process.getrlimit(Process::RLIMIT_CORE)
Process.getrlimit(Process::RLIMIT_NOFILE)
# Ruby 1.9
Process.getrlimit(:CORE)
Process.getrlimit(:NOFILE)
# Ruby 1.8
Socket.new(Socket::AF_INET, Socket::SOCK_STREAM)
Socket.new(Socket::AF_UNIX, Socket::SOCK_DGRAM)
# Ruby 1.9
Socket.new(:INET, :STREAM)
Socket.new(:UNIX, :DGRAM)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment