Created
June 29, 2014 18:31
-
-
Save tak1n/6f771b1df362f19d1e7b to your computer and use it in GitHub Desktop.
Rubinius Privatley
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
class User | |
def initialize(name) | |
@name = name | |
end | |
protected | |
def hash | |
@name.hash | |
end | |
end | |
benny = User.new("benny") | |
john = User.new("john") | |
users = [benny, john, benny] | |
p users.uniq! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment