rudash 2.11.0 → 2.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rudash/group_by.rb +2 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d280372231ea9f4063e975606d64e77bdaa28634fa4fcc27d12c8ea089b09a6
4
- data.tar.gz: 916fcebb70f983689f53965a77ce312b8542b4754a5ecdf145b74d93989f9f03
3
+ metadata.gz: e03793015e21b55c2270f9a8dc164f2fda34cd245ed6321f7eee371d9999c0be
4
+ data.tar.gz: 6de12ecd7cbe84c7a21be38b795ad4bac59cf2f3c54a3c820bba0bee7bb2053e
5
5
  SHA512:
6
- metadata.gz: a9c3b7a12af7f445da8ada67271dcc637e8620a84352e5d0b7331f22bb26c39ba1c2375d97a339595d850f8c7566a1c11faf083a6ce6e84304025fdcdaa886b8
7
- data.tar.gz: 4b7df53d6e1cff7365f358b11223e1ca746ce6f2c8dfab236ed3236b5a9d673f2571d46b70c66bbf046e1f15626d088e75e7068e2794b86b50641c51a38e5382
6
+ metadata.gz: d5cdec12078e9ba71a407ffc0ddaca44fe887966cf54b23b6574ec46e28afe2a0120d73b5ca4dfbf0aef9b2a666e5a5b363711a21fc963a38f9bce9a4b2de61d
7
+ data.tar.gz: c3116e82e35c91691b61bfde79c3611c398f996fde5ad6ef0fc0c33be1012d26f00c6d784a7ab6187b17f119f5fe5ff24f5c07af06c8465c60673e73a3fab3ed
@@ -1,6 +1,7 @@
1
1
  module Rudash
2
2
  module GroupBy
3
- def group_by(collection, iteratee = self.method(:identity))
3
+ def group_by(collection, *rest_args)
4
+ iteratee = self.head(rest_args) || self.method(:identity)
4
5
 
5
6
  reducer = -> (acc, current) {
6
7
  key = Rudash::DynamicArgsCount.call(iteratee, current)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rudash
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.0
4
+ version: 2.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Islam Attrash