Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >> x = EmailAddress.find(1)
- => #<EmailAddress:0x3721ac0 @attributes={"name"=>nil, "updated_at"=>"2007-06-12 14:47:32", "crypt"=>"d4bf5ca873b0f2c0", "id"=>"1", "address"=>"eunji@deeptechinc.com", "created_at"=>"2007-06-12 14:47:32"}>
- >> y = EmailAddress.find(1)
- => #<EmailAddress:0x371e258 @attributes={"name"=>nil, "updated_at"=>"2007-06-12 14:47:32", "crypt"=>"d4bf5ca873b0f2c0", "id"=>"1", "address"=>"eunji@deeptechinc.com", "created_at"=>"2007-06-12 14:47:32"}>
- >> x == y
- => true
- >> a = [x, y]
- => [#<EmailAddress:0x3721ac0 @attributes={"name"=>nil, "updated_at"=>"2007-06-12 14:47:32", "crypt"=>"d4bf5ca873b0f2c0", "id"=>"1", "address"=>"eunji@deeptechinc.com", "created_at"=>"2007-06-12 14:47:32"}>, #<EmailAddress:0x371e258 @attributes={"name"=>nil, "updated_at"=>"2007-06-12 14:47:32", "crypt"=>"d4bf5ca873b0f2c0", "id"=>"1", "address"=>"eunji@deeptechinc.com", "created_at"=>"2007-06-12 14:47:32"}>]
- >> [x, y] == a
- => true
- >> a.uniq
- => [#<EmailAddress:0x3721ac0 @attributes={"name"=>nil, "updated_at"=>"2007-06-12 14:47:32", "crypt"=>"d4bf5ca873b0f2c0", "id"=>"1", "address"=>"eunji@deeptechinc.com", "created_at"=>"2007-06-12 14:47:32"}>, #<EmailAddress:0x371e258 @attributes={"name"=>nil, "updated_at"=>"2007-06-12 14:47:32", "crypt"=>"d4bf5ca873b0f2c0", "id"=>"1", "address"=>"eunji@deeptechinc.com", "created_at"=>"2007-06-12 14:47:32"}>]
Add Comment
Please, Sign In to add comment