short_circu_it 0.25.6 → 0.25.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf4d62436b951d3ef6f3b8e69524743fca52627191d553fc8bcb5933aee61d8c
4
- data.tar.gz: 0f235f5b1323f82407315a39eda823b44338e1eccf52703e267282fe5c3a580f
3
+ metadata.gz: 91e522f9a3f392910689672c9c8983e9d75326b1d45fef23216b54ae15ba34c0
4
+ data.tar.gz: b416a2d5f46fb1a63f59136118ae3b1f16c2235cd647cada683f14f5635e5071
5
5
  SHA512:
6
- metadata.gz: 5387858ae9665ab2a5bc9a359981cc6ce60de1be82f9d937ea50c2aa7d29abb858e2b1db62018fc284b1885e47b9568a0583e1a86b7f42d30cac4bab7f588018
7
- data.tar.gz: 3b3130908c231702a5df26d2e3caffdb787697cfac90db0f566941ffc00e77c296d7ed916712ca77ef61babe64dab7acb229e9a1a459fb5157c3491e2b384224
6
+ metadata.gz: e2c57b6c7fd6089b04f922dadc4a72c5cdd18614d5bb9c56dac17fb38d418422c2356b5b19980a9ba280956450e4993571016f3bbba8e77c6910315227ea6b06
7
+ data.tar.gz: 0f8a54f23d75cda9796964bcdd40b9e3b1223a422e92523ddc595e7d91387746d05ed06ff5520764020a0da61c6927a4aa243765cfc8b7f8a2c499a0f325bfd8
@@ -79,9 +79,14 @@ module ShortCircuIt
79
79
  around_method(
80
80
  method_name,
81
81
  prevent_double_wrapping_for: ShortCircuIt,
82
- ) do |*args|
83
- memoization_store.memoize(method_name, args.hash) do
84
- super(*args)
82
+ ) do |*args, **opts|
83
+ memoization_store.memoize(method_name, (args + [ opts ]).hash) do
84
+ # TODO: replace with `super(*args, **opts)` when <= 2.6 support is dropped
85
+ if RUBY_VERSION < "2.7" && opts.blank?
86
+ super(*args)
87
+ else
88
+ super(*args, **opts)
89
+ end
85
90
  end
86
91
  end
87
92
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module ShortCircuIt
4
4
  # This constant is managed by spicerack
5
- VERSION = "0.25.6"
5
+ VERSION = "0.25.7"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: short_circu_it
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.6
4
+ version: 0.25.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Allen Rettberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-24 00:00:00.000000000 Z
11
+ date: 2021-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.25.6
33
+ version: 0.25.7
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.25.6
40
+ version: 0.25.7
41
41
  description: Memoize methods safely with parameter and dependency observation
42
42
  email:
43
43
  - allen.rettberg@freshly.com
@@ -59,7 +59,7 @@ metadata:
59
59
  homepage_uri: https://github.com/Freshly/spicerack/tree/master/short_circu_it
60
60
  source_code_uri: https://github.com/Freshly/spicerack/tree/master/short_circu_it
61
61
  changelog_uri: https://github.com/Freshly/spicerack/blob/master/short_circu_it/CHANGELOG.md
62
- documentation_uri: https://www.rubydoc.info/gems/short_circu_it/0.25.6
62
+ documentation_uri: https://www.rubydoc.info/gems/short_circu_it/0.25.7
63
63
  post_install_message:
64
64
  rdoc_options: []
65
65
  require_paths: