Created
December 29, 2014 15:09
-
-
Save kkabetani/d48703dad05ca38c465b to your computer and use it in GitHub Desktop.
uniq と uniq! の戻り値
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
ary1 = [1, 2, 3] | |
ary2 = [1, 1, 3] | |
p 'uniq' | |
p ary1.uniq | |
p ary2.uniq | |
p 'uniq!' | |
p ary1.uniq! | |
p ary2.uniq! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment