Skip to content

Commit

Permalink
UUID bugfix - difference in API between versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
mloughran committed Oct 17, 2008
1 parent 45e2047 commit 12e629f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/simple_db.rb
Expand Up @@ -29,7 +29,7 @@ def self.properties(*props)
end

def initialize(key=nil, multimap_or_hash=nil, new_record=true)
self.key = (key || UUID.new)
self.key = (key || UUID.respond_to?(:generate) ? UUID.generate : UUID.new)
self.attributes = multimap_or_hash.nil? ? Amazon::SDB::Multimap.new : (multimap_or_hash.kind_of?(Hash) ? Amazon::SDB::Multimap.new(multimap_or_hash) : multimap_or_hash)
@new_record = new_record
end
Expand Down

0 comments on commit 12e629f

Please sign in to comment.