Skip to content

Commit

Permalink
Switching parameter name in Collection#group from key to opts to fix …
Browse files Browse the repository at this point in the history
…YARD doc
  • Loading branch information
eedrummer authored and banker committed Jan 21, 2011
1 parent 153bedf commit 285752a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mongo/collection.rb
Expand Up @@ -598,10 +598,10 @@ def group(opts, condition={}, initial={}, reduce=nil, finalize=nil)
if opts.is_a? Array
key_type = "key"
key_value = {}
key.each { |k| key_value[k] = 1 }
opts.each { |k| key_value[k] = 1 }
else
key_type = "$keyf"
key_value = key.is_a?(BSON::Code) ? key : BSON::Code.new(key)
key_value = opts.is_a?(BSON::Code) ? opts : BSON::Code.new(opts)
end

group_command["group"][key_type] = key_value
Expand Down

0 comments on commit 285752a

Please sign in to comment.