Created
May 4, 2015 16:01
-
-
Save kenzan100/699d53378a087ae13fd6 to your computer and use it in GitHub Desktop.
Rubyの array.map(&:to_s) 記法を紐解く ref: http://qiita.com/kenzan100/items/6344766167299b9f7e91
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 characters
Proc.new do |elem| | |
elem.send(:to_s) | |
end |
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 characters
array = [1,2,3] | |
array.map(&:to_s) | |
# => ["1", "2", "3"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment