Created
January 26, 2014 16:49
-
-
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
This file contains 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
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