Created
April 4, 2013 23:23
-
-
Save adamcooper/5315262 to your computer and use it in GitHub Desktop.
Don't use "and" in ruby.
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
>> [1,2,3, 4].each {|x| puts x; break if x == 1} | |
1 | |
=> nil | |
>> [1,2,3, 4].each {|x| puts x; puts 'broken' and break if x == 1} | |
1 | |
broken | |
2 | |
3 | |
4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment