Created
October 11, 2008 01:39
-
-
Save djwonk/16199 to your computer and use it in GitHub Desktop.
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
Perhaps model.rb line 195 has a bug. | |
The addition operator is probably intended to remove duplicates | |
(set like behavior) but does not appear to actually do so. |
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
merb -i | |
repos = User.repositories | |
rarr = [] | |
repos.each { |r| rarr << r } | |
rarr[0].inspect | |
=> "#<DataMapper::Repository:0x1a95f8c @identity_maps={}, @name=:default>" | |
rarr[1].inspect | |
=> "#<DataMapper::Repository:0x1a960a4 @identity_maps={}, @name=:default>" | |
rarr[0] == rarr[1] | |
=> true | |
rarr[0].eql? rarr[1] | |
=> true | |
rarr[0].equal? rarr[1] | |
=> false | |
rarr[0].hash | |
=> 13938630 | |
rarr[1].hash | |
=> 13938770 | |
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
def repositories | |
[ repository ].to_set + @properties.keys.collect { |repository_name| DataMapper.repository(repository_name) } | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment