parser 3.3.4.0 → 3.3.4.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: b6e944ba7153f8ec59a831766eff62bf876f62f96301bb5d628f888df56e2cf3
4
- data.tar.gz: d3d88bc7e672f55b25a3d4d2835bbb8eef3ea28d49b7d214ede58ccad9c70b57
3
+ metadata.gz: 930b06a369a403803ac418b1a98aefc2ff86be0c2034596bae5abab2344ae406
4
+ data.tar.gz: ec389f48c3ba6e11099642ef13f175b09499ddc99e4788ed960b29c0af3ba845
5
5
  SHA512:
6
- metadata.gz: 6cc83db06edef03d632973fafe916b286b30ef414bc001f66a2be94e714c19b0330ba731d76c13c79c3e8a8a2f5c31eff3e6a5ab73a07c444bcfa6363a13415c
7
- data.tar.gz: f3320f9f90238841b0e41685200069959f8e19a5ff4f0cd9b95e8932c27a365f458772d17ec44bf20a8cd5de724bdc90ea349bfd0d4f032a0e1f7366ab831213
6
+ metadata.gz: 316d1af152d062f7b40575da9094c425b9dba3b5a1fa77be2aaad61c947e86174fb7c84ba55bfe4755e9ed501d7ae98161c5593c016601acc55a4dcbc805e966
7
+ data.tar.gz: dc925ec0ce088ccc1e0be970bfb90c75c11170bfcff4063aef033e54ae4cb0afd5eb3b3612d62efebbea5439328f138bd3386809b6c3c43849c2d0c374ce0878
@@ -426,7 +426,7 @@ module Parser
426
426
  def regexp_compose(begin_t, parts, end_t, options)
427
427
  begin
428
428
  static_regexp(parts, options)
429
- rescue RegexpError => e
429
+ rescue RegexpError, Encoding::UndefinedConversionError => e
430
430
  diagnostic :error, :invalid_regexp, { :message => e.message },
431
431
  loc(begin_t).join(loc(end_t))
432
432
  end
@@ -102,7 +102,7 @@ module Parser
102
102
  CurrentRuby = Ruby31
103
103
 
104
104
  when /^3\.2\./
105
- current_version = '3.2.4'
105
+ current_version = '3.2.5'
106
106
  if RUBY_VERSION != current_version
107
107
  warn_syntax_deviation 'parser/ruby32', current_version
108
108
  end
@@ -94,16 +94,15 @@ module Parser
94
94
  #
95
95
  def self.reencode_string(input)
96
96
  original_encoding = input.encoding
97
- detected_encoding = recognize_encoding(input.force_encoding(Encoding::BINARY))
97
+ dup_input = input.dup
98
+ detected_encoding = recognize_encoding(dup_input.force_encoding(Encoding::BINARY))
98
99
 
99
100
  if detected_encoding.nil?
100
- input.force_encoding(original_encoding)
101
+ dup_input.force_encoding(original_encoding)
101
102
  elsif detected_encoding == Encoding::BINARY
102
103
  input
103
104
  else
104
- input.
105
- force_encoding(detected_encoding).
106
- encode(Encoding::UTF_8)
105
+ dup_input.force_encoding(detected_encoding).encode(Encoding::UTF_8)
107
106
  end
108
107
  end
109
108
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Parser
4
- VERSION = '3.3.4.0'
4
+ VERSION = '3.3.4.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.4.0
4
+ version: 3.3.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - whitequark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-10 00:00:00.000000000 Z
11
+ date: 2024-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ast
@@ -251,9 +251,9 @@ licenses:
251
251
  - MIT
252
252
  metadata:
253
253
  bug_tracker_uri: https://github.com/whitequark/parser/issues
254
- changelog_uri: https://github.com/whitequark/parser/blob/v3.3.4.0/CHANGELOG.md
255
- documentation_uri: https://www.rubydoc.info/gems/parser/3.3.4.0
256
- source_code_uri: https://github.com/whitequark/parser/tree/v3.3.4.0
254
+ changelog_uri: https://github.com/whitequark/parser/blob/v3.3.4.1/CHANGELOG.md
255
+ documentation_uri: https://www.rubydoc.info/gems/parser/3.3.4.1
256
+ source_code_uri: https://github.com/whitequark/parser/tree/v3.3.4.1
257
257
  post_install_message:
258
258
  rdoc_options: []
259
259
  require_paths: