Skip to content

Instantly share code, notes, and snippets.

@peta
Created April 19, 2013 20:06
Show Gist options
  • Save peta/3b60af2be0517f18a43a to your computer and use it in GitHub Desktop.
Save peta/3b60af2be0517f18a43a to your computer and use it in GitHub Desktop.
arr = ['A', 'B', 'C']
puts arr.map do |e|
e.downcase
end
puts '------'
puts arr.map {|e|
e.downcase
}
#> #<Enumerator:0x007fd60a02d0e0>
#> ------
#> a
#> b
#> c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment