Last active
August 29, 2015 13:56
-
-
Save mikelikesbikes/8809504 to your computer and use it in GitHub Desktop.
Revisions
-
mikelikesbikes revised this gist
Feb 4, 2014 . No changes.There are no files selected for viewing
-
mikelikesbikes revised this gist
Feb 4, 2014 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,3 @@ $ ruby -e "a = (0..5).to_a; c = a.map do |x| x*2; end; p c.class" Array $ ruby -e "a = (0..5).to_a; c = a.map { |x| x*2; }; p c.class" -
mikelikesbikes renamed this gist
Feb 4, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
mikelikesbikes created this gist
Feb 4, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ # What'chu doin' ruby? $ ruby -e "a = (0..5).to_a; c = a.map do |x| x*2; end; p c.class" Array $ ruby -e "a = (0..5).to_a; c = a.map { |x| x*2; }; p c.class" Array $ ruby -e "a = (0..5).to_a; p a.map do |x| x*2; end" #<Enumerator: [0, 1, 2, 3, 4, 5]:map> $ ruby -e "a = (0..5).to_a; p a.map { |x| x*2; }" [0, 2, 4, 6, 8, 10]