warning 1.2.0 → 1.2.1

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: c2628e7956e2f0c2a7f55ef1d4397a1f1ff8339d48904b49fc16692934930464
4
- data.tar.gz: 72b7fa93465fe52a2907ef2172d3c90694308af52bb2cd5b9117c6e7084419d1
3
+ metadata.gz: aed045b84ec748f7558ea24268aef892d0efcd7d0f0f51cca7b5cf5f95d1aae7
4
+ data.tar.gz: ad651f6e4f47d4b6064f7863d145d2747fab8477a27a5234e2e3336d85d1ae17
5
5
  SHA512:
6
- metadata.gz: e8f95072982d387477121b90c13790876743d9a40a0a32c06a1ea72720b85c6d831c4dceff28445dd8be2a3ba6e915670b874a908e6b438cce40c83229f95a15
7
- data.tar.gz: 3cf24b069bc071cdf425aad86fae1c0b37b3cf723ee8c365a09a183da7e3f737f7eb454f8b1fbc29be1a9651d01fd286e13562ea442c1ae57ca5fc2c045a7570
6
+ metadata.gz: ead742a4b97033e1d1b6ec6460039d7f2138ba8586709a2819303ad0d6791daa26821ee7fd35a9701b2bf7d4ae01f47ef485781331ca77f116ef92d1ec06dada
7
+ data.tar.gz: 935a429f2a967a57e67bf44739e0583abf186fe3baeaee0ce61532e9083844971ba956ca55831f18092d80652f7090d30f0d1da06758186fccebb98b0f78b18a
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ === 1.2.1 (2021-10-04)
2
+
3
+ * Recognize additional void context warnings (kachick) (#13)
4
+
1
5
  === 1.2.0 (2021-02-16)
2
6
 
3
7
  * Add support for :void_context as regexp argument to Warning.ignore (jeremyevans)
data/lib/warning.rb CHANGED
@@ -19,7 +19,7 @@ module Warning
19
19
  safe: /: warning: (?:rb_safe_level_2_warning|rb_safe_level|rb_set_safe_level_force|rb_set_safe_level|rb_secure|rb_insecure_operation|rb_check_safe_obj|\$SAFE) will (?:be removed|become a normal global variable) in Ruby 3\.0\n\z/,
20
20
  taint: /: warning: (?:rb_error_untrusted|rb_check_trusted|Pathname#taint|Pathname#untaint|rb_env_path_tainted|Object#tainted\?|Object#taint|Object#untaint|Object#untrusted\?|Object#untrust|Object#trust|rb_obj_infect|rb_tainted_str_new|rb_tainted_str_new_cstr) is deprecated and will be removed in Ruby 3\.2\.?\n\z/,
21
21
  mismatched_indentations: /: warning: mismatched indentations at '.+' with '.+' at \d+\n\z/,
22
- void_context: /possibly useless use of :: in void context/,
22
+ void_context: /possibly useless use of (?:a )?\S+ in void context/,
23
23
  }
24
24
 
25
25
  # Map of action symbols to procs that return the symbol
@@ -40,7 +40,7 @@ module Warning
40
40
  end
41
41
  end
42
42
 
43
- # Deduplicate warnings, supress warning messages if the same warning message
43
+ # Deduplicate warnings, suppress warning messages if the same warning message
44
44
  # has already occurred. Note that this can lead to unbounded memory use
45
45
  # if unique warnings are generated.
46
46
  def dedup
data/test/test_warning.rb CHANGED
@@ -188,6 +188,28 @@ class WarningTest < Minitest::Test
188
188
  assert_warning '' do
189
189
  instance_eval('::Object; nil', __FILE__, __LINE__)
190
190
  end
191
+
192
+ assert_warning '' do
193
+ instance_eval('Object; nil', __FILE__, __LINE__)
194
+ end
195
+
196
+ assert_warning '' do
197
+ instance_eval('v = 0; v; nil', __FILE__, __LINE__)
198
+ end
199
+
200
+ assert_warning '' do
201
+ instance_eval('1 > 1; nil', __FILE__, __LINE__)
202
+ end
203
+
204
+ assert_warning '' do
205
+ instance_eval('defined? C; nil', __FILE__, __LINE__)
206
+ end
207
+
208
+ if RUBY_VERSION >= '2.6'
209
+ assert_warning '' do
210
+ instance_eval('1..; nil', __FILE__, __LINE__)
211
+ end
212
+ end
191
213
  end
192
214
 
193
215
  def test_warning_ignore_ambiguous_slash
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warning
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-16 00:00:00.000000000 Z
11
+ date: 2021-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest-global_expectations
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  requirements: []
79
- rubygems_version: 3.2.3
79
+ rubygems_version: 3.2.22
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: Add custom processing for warnings