Skip to content

Instantly share code, notes, and snippets.

@adamniedzielski
Created January 26, 2014 16:49
Show Gist options
  • Save adamniedzielski/8635539 to your computer and use it in GitHub Desktop.
Save adamniedzielski/8635539 to your computer and use it in GitHub Desktop.
You will have to adjust the big number depending on your amount of free memory
a = (1..500000000).to_a
if system('ls')
puts "system works"
else
puts "system fails"
end
begin
`ls`
rescue => e
puts "ls fails"
else
puts "ls works"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment