dead_end 3.0.2 → 3.0.3

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: 802262fe82f2dcb82c0ca5d908852141a6fb7fe533b597f80c4d65b2e7f8b7e6
4
- data.tar.gz: 2087ff7725c10acc2eac1278dfe6d64c1e2161ee9d4fe97bb87b33aecc73d468
3
+ metadata.gz: 88cc140d421e1df16009993e7d7438054dad7a6b6fec740496e92c06c0bc2f6d
4
+ data.tar.gz: ba736b1459f6c18aed62b566fa8e48ca6a4dd8379bc2dc2d99594c0daf136fb6
5
5
  SHA512:
6
- metadata.gz: 25b2a17f9901cbdf5d8a7c3085a931b95f70eda6a51661664c5b859a3f06b21e9fe4aa926e1d93e54f04b05bd4b27e67bfaa6ef84d61fcd0eacbf9929882bc43
7
- data.tar.gz: f9aeb83c9d39c05d03be3f0e84c4c2fc86246a61f6b77b6185f2f0a25ec91885ed3d727e7ecf41948a11b5efd3d0b51aef3824103f83800e23734675a33bbed2
6
+ metadata.gz: 3cf585c9f073344d6259478c239fd45b77a5fb7fd1c37c18d3d2a7cf91323b00750cccb18d666935ea20ce2c209137216304429a26aac0bf26fec7aa5440ff14
7
+ data.tar.gz: 8a818ac4001ce7ec01ae36c4c223f47c7686e111226718cf22e8e2ca9f00a0bb3f3ef6409ad703cb698a67dc62035225973f37ea5f527207c26e705acd4c8f33
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## HEAD (unreleased)
2
2
 
3
+ ## 3.0.3
4
+
5
+ - Expand explanations coming from additional Ripper errors (https://github.com/zombocom/dead_end/pull/117)
6
+ - Fix explanation involving shorthand syntax for literals like `%w[]` and `%Q{}` (https://github.com/zombocom/dead_end/pull/116)
7
+
3
8
  ## 3.0.2
4
9
 
5
10
  - Fix windows filename detection (https://github.com/zombocom/dead_end/pull/114)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dead_end (3.0.2)
4
+ dead_end (3.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -61,6 +61,17 @@ module DeadEnd
61
61
  # ^^^
62
62
  # Means it's a string or a symbol `"{"` rather than being
63
63
  # part of a data structure (like a hash) `{ a: b }`
64
+ # ignore it.
65
+ when :on_words_beg, :on_symbos_beg, :on_qwords_beg,
66
+ :on_qsymbols_beg, :on_regexp_beg, :on_tstring_beg
67
+ # ^^^
68
+ # Handle shorthand syntaxes like `%Q{ i am a string }`
69
+ #
70
+ # The start token will be the full thing `%Q{` but we
71
+ # need to count it as if it's a `{`. Any token
72
+ # can be used
73
+ char = lex.token[-1]
74
+ @count_for_char[char] += 1 if @count_for_char.key?(char)
64
75
  when :on_embexpr_beg
65
76
  # ^^^
66
77
  # Embedded string expressions like `"#{foo} <-embed"`
@@ -18,6 +18,12 @@ module DeadEnd
18
18
  @errors << msg
19
19
  end
20
20
 
21
+ alias_method :on_alias_error, :on_parse_error
22
+ alias_method :on_assign_error, :on_parse_error
23
+ alias_method :on_class_name_error, :on_parse_error
24
+ alias_method :on_param_error, :on_parse_error
25
+ alias_method :compile_error, :on_parse_error
26
+
21
27
  def call
22
28
  @run_once ||= begin
23
29
  @errors = []
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeadEnd
4
- VERSION = "3.0.2"
4
+ VERSION = "3.0.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dead_end
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - schneems
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-12 00:00:00.000000000 Z
11
+ date: 2021-11-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: When you get an "unexpected end" in your syntax this gem helps you find
14
14
  it