Created
November 21, 2012 03:53
-
-
Save samueljseay/4122912 to your computer and use it in GitHub Desktop.
tutorial error
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.9.3p327 :013 > pets = %w(rex nibbles fred) | |
=> ["rex", "nibbles", "fred"] | |
1.9.3p327 :014 > puts pets.map do |pet| | |
1.9.3p327 :015 > pet.upcase | |
1.9.3p327 :016?> end | |
#<Enumerator:0x007f9b4d02a4f0> | |
=> nil | |
1.9.3p327 :017 > puts pets.map(&:upcase) | |
REX | |
NIBBLES | |
FRED | |
=> nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@schneems yep, @samueljseay is right.