deep-cover-core 0.7.6 → 0.7.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: 1bf24929f7466a5ba34eb280c6ea6b65c12a49a8f17faf72dcc52e4ee2df0b07
4
- data.tar.gz: dee82a216bd81089e76b607d1da044b3adb58ef5f5941c8d74e0fd65b893f6b1
3
+ metadata.gz: 20f623535ee291144feeb29666497801965317be56a583500bbd2c9cd5c8b576
4
+ data.tar.gz: cccf8236fd9e2ac023199cb0f62a1907f0cd847da503ae00d396612751f0209d
5
5
  SHA512:
6
- metadata.gz: f37f3e8c56ce00fdc4e111157f7d0d1bf4ddf7d16c07974e07252d1aea3b46232ffb391a934b68776573a6a96a845324b9e5addb0e8d3cd40c797a961d686d68
7
- data.tar.gz: 555bcbbfa58c144d2033dc684f8ce07a5f963424538cf236f10f1a04f9d6c92b1d146d1ac963e346ec5fe1e9245cd4a6e2a35c46922000b39b032dc996687b27
6
+ metadata.gz: 4285e13e7368c6910d7e9c9b9610423856714fdc457bec0b6cf156b160821a51174c1720d1f4d47f4e601a2901e205d196817985ba2fbae30e3aa0eda5e12e71
7
+ data.tar.gz: 91d4cef0eb7743f8882999a954ce46acb677b11f46b516dc4e98cb553b17078f3ce3f72c983b4843755fe3fb1a469070d5b6c977829fc456476987a3c6b4efcd
@@ -23,7 +23,19 @@ module DeepCover
23
23
  class Optarg < Node
24
24
  has_tracker :default
25
25
  has_child name: Symbol
26
- has_child default: Node, flow_entry_count: :default_tracker_hits, rewrite: '(%{default_tracker};%{node})'
26
+ has_child default: Node, flow_entry_count: :default_tracker_hits
27
+
28
+ # Default child rewriting rule
29
+ def rewrite_default
30
+ if parent.children.size >= 32 && RUBY_VERSION >= '2.3' && RUBY_VERSION < '2.6'
31
+ # Workaround for Ruby bugs when too many default arguments are present
32
+ # This will ignore some cases which would not create issues, but its rare enough to have
33
+ # 32 arguments to a method that I don't care.
34
+ # https://github.com/deep-cover/deep-cover/issues/47#issuecomment-477176061
35
+ return
36
+ end
37
+ '(%{default_tracker};%{node})'
38
+ end
27
39
 
28
40
  def executable?
29
41
  false
@@ -56,16 +56,17 @@ module DeepCover
56
56
  # (Potentially) dynamic
57
57
  module SimpleIfItsChildrenAre
58
58
  def simple_literal?
59
- children.all?(&:simple_literal?)
59
+ children.compact.all?(&:simple_literal?)
60
60
  end
61
61
  end
62
62
 
63
63
  # Di-atomic
64
64
  class Range < Node
65
65
  include SimpleIfItsChildrenAre
66
+ include ExecutedAfterChildren
66
67
 
67
- has_child from: Node
68
- has_child to: Node
68
+ has_child from: [Node, nil]
69
+ has_child to: [Node, nil]
69
70
  end
70
71
  Erange = Irange = Range
71
72
 
@@ -3,5 +3,5 @@
3
3
  top_level_module = Thread.current['_deep_cover_top_level_module'] || Object
4
4
 
5
5
  module top_level_module::DeepCover # rubocop:disable Naming/ClassAndModuleCamelCase
6
- VERSION = '0.7.6'
6
+ VERSION = '0.7.7'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deep-cover-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc-André Lafortune
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-11-15 00:00:00.000000000 Z
12
+ date: 2020-01-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parser
@@ -331,8 +331,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
331
331
  - !ruby/object:Gem::Version
332
332
  version: '0'
333
333
  requirements: []
334
- rubyforge_project:
335
- rubygems_version: 2.7.7
334
+ rubygems_version: 3.0.3
336
335
  signing_key:
337
336
  specification_version: 4
338
337
  summary: In depth coverage of your Ruby code.