tapenade 0.3.0 → 0.4.0

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: dc7843737d6d443a6276b7013ebb24eded11117b65de32f17e44f1e7690d6d2a
4
- data.tar.gz: 78fead655d7f22f6c80c958c9677a1445285e41e71d8315d0d97057faa5dcd3b
3
+ metadata.gz: 41f5c37f195e39b0421b5c7c454c7b58d8b11f26906109ce6dfdc26f67acabf4
4
+ data.tar.gz: 0b6ded076408ab0f4cc1ebd40c0e50d5f04610905fbd28de3fc2b1337a6b2adb
5
5
  SHA512:
6
- metadata.gz: 0d610830cf9daa8fca5fa22bdf6c6a71b982664d99642e67cc8332c912d39f813becb874e958d596d8f00a6622d7934aa10363c5e560a4cb187d6261815636aa
7
- data.tar.gz: 22d739b5e59e9f6f0991f34dae36c88f3a214975c72ea5a6380b25b98b746cc5006c77053b950a5d3ac4a2c69a8a54cd8ea96e9b595e1f2cdeb2c545b7dfeb67
6
+ metadata.gz: e461aca12b3d477ebd413b0e336a3ab1eb1f3e668756639053cd7ab6bc469712fb3c9ea19b3387e9bd624b31e047a0897ba8f330a037bcb15ca5710a56e3e693
7
+ data.tar.gz: 32b8fb3ea8483dc439c1db1e3540d9766f5ed0c629ed4e7e0379ab4499b9709096d6ee67cf7ce8831678894ecea9ddff53bf24c674abfaacc2876a81f0a79b18
@@ -9,11 +9,18 @@ module Tapenade
9
9
  respond_to_tapenade?(method) || super
10
10
  end
11
11
 
12
- def method_missing(method, *args, **kwargs, &block)
13
- return super unless respond_to_tapenade?(method)
14
- # Ruby 2.6 + 2.7 friendly
15
- eval "#{method.to_s[Tapenade.prefix.length..-1]}(*args, **kwargs, &block)"
16
- self
12
+ if RUBY_VERSION >= "2.7.0"
13
+ def method_missing(method, *args, **kwargs, &block)
14
+ return super unless respond_to_tapenade?(method)
15
+ public_send(method.to_s[Tapenade.prefix.length..-1], *args, **kwargs, &block)
16
+ self
17
+ end
18
+ else
19
+ def method_missing(method, *args, &block)
20
+ return super unless respond_to_tapenade?(method)
21
+ public_send(method.to_s[Tapenade.prefix.length..-1], *args, &block)
22
+ self
23
+ end
17
24
  end
18
25
 
19
26
  def respond_to_tapenade?(method)
@@ -1,3 +1,3 @@
1
1
  module Tapenade
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tapenade
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benoit MARTIN-CHAVE
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-26 00:00:00.000000000 Z
11
+ date: 2019-12-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Want to call a method and return self instead of normal return ? Just
14
14
  prefix it with tap_ !