parser_node_ext 1.2.1 → 1.2.2

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: 90dfc73d7d6113dbf3e6c7f61de5435d537604f6dcb3c6158a59ceb87e766c50
4
- data.tar.gz: 7f7f1376041a28248fec6b81f5d9e95d64cf408d3be8aaf4556e235dc9e2bf23
3
+ metadata.gz: f6c6c18cd96c8260a6318584861952e15597a1e89e3ad765459cbcd7ee09811e
4
+ data.tar.gz: 9b60771fe8b4428ef615e0bc7064d275027f3a292c13b2936266b1e19c0c2178
5
5
  SHA512:
6
- metadata.gz: 731d405cc89bb44efe36d6035e8fb0008a23e9043b83d950fe51010032a129d00850b6bcbc22c01f6d02df8fab9c95d8fa88db7cc13dee45f2dc817d49f277bc
7
- data.tar.gz: 59d138be84e10ceca0dc7cb6047cfa56e0df7dbe717889536a18473a61309b554cddff8e8607ef2b188e9f4276e864c6a0ae7892bf960cc0c5ac53560ccc3bd0
6
+ metadata.gz: cd2ebf1060bca500fb0ea333ddd8819040095566ccf385eafed3bfe0da15f9d5659147e83547d2a714a7393debc934c3c791404d0595d7ca3fbaa29d0434b3f4
7
+ data.tar.gz: 9238796ab318e28ec2a1df877142985d4461e39d74923ff5055ab3fcc4267ca234c1ce89110ef3e947b1f1bfc136c168486962db36ec952342b1617123423cb0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.2.2 (2024-02-10)
4
+
5
+ * Remove `to_hash` extend
6
+
3
7
  ## 1.2.1 (2023-10-01)
4
8
 
5
9
  * Do not handle `irange` and `erange` in `to_value`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- parser_node_ext (1.2.1)
4
+ parser_node_ext (1.2.2)
5
5
  parser
6
6
 
7
7
  GEM
@@ -9,10 +9,10 @@ GEM
9
9
  specs:
10
10
  ast (2.4.2)
11
11
  diff-lcs (1.5.0)
12
- parser (3.2.2.3)
12
+ parser (3.3.0.5)
13
13
  ast (~> 2.4.1)
14
14
  racc
15
- racc (1.7.1)
15
+ racc (1.7.3)
16
16
  rake (13.0.6)
17
17
  rspec (3.11.0)
18
18
  rspec-core (~> 3.11.0)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ParserNodeExt
4
- VERSION = "1.2.1"
4
+ VERSION = "1.2.2"
5
5
  end
@@ -445,28 +445,6 @@ module ParserNodeExt
445
445
  loc.expression&.source
446
446
  end
447
447
 
448
- # Convert node to a hash, so that it can be converted to a json.
449
- def to_hash
450
- result = { node_type: type }
451
- if TYPE_CHILDREN[type]
452
- TYPE_CHILDREN[type].each do |key|
453
- value = send(key)
454
- result[key] =
455
- case value
456
- when Array
457
- value.map { |v| v.respond_to?(:to_hash) ? v.to_hash : v }
458
- when Parser::AST::Node
459
- value.to_hash
460
- else
461
- value
462
- end
463
- end
464
- else
465
- result[:children] = children.map { |c| c.respond_to?(:to_hash) ? c.to_hash : c }
466
- end
467
- result
468
- end
469
-
470
448
  # Respond key value and source for hash node, e.g.
471
449
  # @example
472
450
  # node # s(:hash, s(:pair, s(:sym, :foo), s(:sym, :bar)))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parser_node_ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-30 00:00:00.000000000 Z
11
+ date: 2024-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  - !ruby/object:Gem::Version
63
63
  version: '0'
64
64
  requirements: []
65
- rubygems_version: 3.4.18
65
+ rubygems_version: 3.5.3
66
66
  signing_key:
67
67
  specification_version: 4
68
68
  summary: extend parser node