rr 3.0.2 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +11 -0
- data/lib/rr/double_definitions/strategies/strategy.rb +2 -0
- data/lib/rr/injections/double_injection.rb +2 -2
- data/lib/rr/keyword_arguments.rb +6 -0
- data/lib/rr/method_dispatches/method_dispatch.rb +2 -2
- data/lib/rr/method_dispatches/method_missing_dispatch.rb +1 -1
- data/lib/rr/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ae999de4b35d2e97dd9805d858a1b573cf8201e8bc4a72c57ab2277ba30400e
|
4
|
+
data.tar.gz: 807039ad92e52e43aaad160042ef82e4513ef79d4eb6724c0c4a6c29ffc22b93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20c952e868437e27e4904e8e1297844e7f6c301f30ae5b8e8ed22915c5eca4817dec14dd2a8185ed3e154a83b89f3f0789baba6edd38d42a3889bfb2f45bd46c
|
7
|
+
data.tar.gz: f8750bae03dd96e49c7b0d129685ea9c2be4a35d4dee7cdebf6054c6ba99917eed9ba93fe504c2c0241d37c4b8eb2fd37d91afe76d2b3cd9290868f8ee58b9db
|
data/CHANGES.md
CHANGED
@@ -137,7 +137,7 @@ module RR
|
|
137
137
|
id = BoundObjects.size
|
138
138
|
BoundObjects[id] = subject_class
|
139
139
|
|
140
|
-
if KeywordArguments.fully_supported?
|
140
|
+
if KeywordArguments.fully_supported? && KeywordArguments.accept_kwargs?(subject_class, method_name)
|
141
141
|
subject_class.class_eval(<<-RUBY, __FILE__, __LINE__ + 1)
|
142
142
|
def #{method_name}(*args, **kwargs, &block)
|
143
143
|
::RR::Injections::DoubleInjection::BoundObjects[#{id}].class_eval do
|
@@ -163,7 +163,7 @@ module RR
|
|
163
163
|
id = BoundObjects.size
|
164
164
|
BoundObjects[id] = subject_class
|
165
165
|
|
166
|
-
if KeywordArguments.fully_supported?
|
166
|
+
if KeywordArguments.fully_supported? && KeywordArguments.accept_kwargs?(subject_class, method_name)
|
167
167
|
subject_class.class_eval(<<-RUBY, __FILE__, __LINE__ + 1)
|
168
168
|
def #{method_name}(*args, **kwargs, &block)
|
169
169
|
arguments = MethodArguments.new(args, kwargs, block)
|
data/lib/rr/keyword_arguments.rb
CHANGED
@@ -31,7 +31,7 @@ module RR
|
|
31
31
|
|
32
32
|
def call_original_method
|
33
33
|
if subject_has_original_method?
|
34
|
-
if KeywordArguments.fully_supported?
|
34
|
+
if KeywordArguments.fully_supported? && !kwargs.empty?
|
35
35
|
subject.__send__(original_method_alias_name, *args, **kwargs, &block)
|
36
36
|
else
|
37
37
|
subject.__send__(original_method_alias_name, *args, &block)
|
@@ -53,7 +53,7 @@ module RR
|
|
53
53
|
call_original_method
|
54
54
|
else
|
55
55
|
if implementation
|
56
|
-
if KeywordArguments.fully_supported?
|
56
|
+
if KeywordArguments.fully_supported? && kwargs.empty?
|
57
57
|
implementation.call(*args, **kwargs, &block)
|
58
58
|
else
|
59
59
|
implementation.call(*args, &block)
|
@@ -52,7 +52,7 @@ module RR
|
|
52
52
|
if double_injection = Injections::DoubleInjection.find(subject_class, method_name)
|
53
53
|
double_injection.bind_method
|
54
54
|
# The DoubleInjection takes care of calling double.method_call
|
55
|
-
if KeywordArguments.fully_supported?
|
55
|
+
if KeywordArguments.fully_supported? && !kwargs.empty?
|
56
56
|
subject.__send__(method_name, *args, **kwargs, &block)
|
57
57
|
else
|
58
58
|
subject.__send__(method_name, *args, &block)
|
data/lib/rr/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-06-
|
13
|
+
date: 2021-06-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|