syntax_tree_ext 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/syntax_tree_ext/version.rb +1 -1
- data/lib/syntax_tree_ext.rb +1 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b0bc3412938b71b6b55e193aad641be13db37edbab5677dfe8073477b7204b4
|
4
|
+
data.tar.gz: beea90b07e9c1dbe2cc4fb81dd0dff4788debde15556678159a07b80b966e155
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39587b98d39f57db669bfef81184d825cf5e3f3e71da224bd4133824e0240e3f914c9173daa2dd6c7a30a27afdaf7d34053e2606778164a602f4d98f58a0ed22
|
7
|
+
data.tar.gz: 51182e6fa69cd06987e6dcfe6830a3359982eadff419e7192ab4c6160c075599d3382f34f4e9d20256b8f577577539d30ed3338ab6b2c79019031215a4db9421
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/syntax_tree_ext.rb
CHANGED
@@ -4,14 +4,6 @@ require_relative "syntax_tree_ext/version"
|
|
4
4
|
|
5
5
|
require 'syntax_tree'
|
6
6
|
|
7
|
-
if RUBY_VERSION.to_i < 3
|
8
|
-
class Hash
|
9
|
-
def except(*keys)
|
10
|
-
self.reject { |k, _| keys.include?(k) }
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
7
|
module SyntaxTreeExt
|
16
8
|
class Error < StandardError; end
|
17
9
|
# Your code goes here...
|
@@ -33,7 +25,7 @@ module SyntaxTree
|
|
33
25
|
|
34
26
|
def set_parent_node_and_source(source)
|
35
27
|
self.source = source
|
36
|
-
self.deconstruct_keys([]).
|
28
|
+
self.deconstruct_keys([]).filter { |key, _value| ![:location, :comments].include?(key) }.values.each do |child_node|
|
37
29
|
if child_node.is_a?(Array)
|
38
30
|
child_node.each do |child_child_node|
|
39
31
|
next unless child_child_node.is_a?(Node)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: syntax_tree_ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.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: 2024-02-
|
11
|
+
date: 2024-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: syntax_tree
|