Created
July 29, 2011 17:49
-
-
Save radamant/1114333 to your computer and use it in GitHub Desktop.
Alias Enumerable#map to Enumerable#transform
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
>> module Enumerable | |
>> alias_method :transform, :map | |
>> end | |
=> Enumerable | |
>> names.transform{|n| n.upcase} | |
=> ["FRYE", "BENDER", "LEELA", "ZOIDBERG"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment