syntax_tree_ext 0.6.2 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -3
- data/Gemfile.lock +1 -1
- data/lib/syntax_tree_ext/version.rb +1 -1
- data/lib/syntax_tree_ext.rb +9 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6983ce67c837c77fb232bcb11b8319e1f358126b746fdceb9bb586c01eaad408
|
4
|
+
data.tar.gz: 9cda7bf847292a641816b4ff5d6b2167e3717b9534aa0c1eaa16565ef6022204
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d504bd7d7f7609bd7bd26726bf2e4dfd1035ee9a16462430e32251225a867894a46d6422c0021e469a317fb2dd6b900d700fc43238bb22c6fde456e83e4cad4
|
7
|
+
data.tar.gz: 85c22b4a59294845ff959cc40f0667475405fde09e4a53fcc39331320f557dff2c037dc713b2bd4be8b8601023fc96e8c885a83770f22e008973bbf61f48f68e
|
data/CHANGELOG.md
CHANGED
@@ -1,14 +1,22 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
## 0.6.
|
3
|
+
## 0.6.4 (2023-08-17)
|
4
|
+
|
5
|
+
* `to_value` supports for empty array
|
6
|
+
|
7
|
+
## 0.6.3 (2023-07-01)
|
8
|
+
|
9
|
+
* Support `Hash#except` for ruby 2
|
10
|
+
|
11
|
+
## 0.6.2 (2023-06-26)
|
4
12
|
|
5
13
|
* Do not flatten `deconstruct_keys`.`values`
|
6
14
|
|
7
|
-
## 0.6.1 (
|
15
|
+
## 0.6.1 (2023-06-26)
|
8
16
|
|
9
17
|
* Use `deconstruct_key`.`values` instead of `child_nodes`
|
10
18
|
|
11
|
-
## 0.6.0 (
|
19
|
+
## 0.6.0 (2023-06-12)
|
12
20
|
|
13
21
|
* Add `hash_assoc` and `hash_value` for hash
|
14
22
|
|
data/Gemfile.lock
CHANGED
data/lib/syntax_tree_ext.rb
CHANGED
@@ -4,6 +4,14 @@ 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
|
+
|
7
15
|
module SyntaxTreeExt
|
8
16
|
class Error < StandardError; end
|
9
17
|
# Your code goes here...
|
@@ -102,7 +110,7 @@ module SyntaxTree
|
|
102
110
|
when Const, Label, TStringContent, Ident
|
103
111
|
value
|
104
112
|
when ArrayLiteral
|
105
|
-
contents.parts.map { |part| part.to_value }
|
113
|
+
contents ? contents.parts.map { |part| part.to_value } : []
|
106
114
|
else
|
107
115
|
self
|
108
116
|
end
|
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.6.
|
4
|
+
version: 0.6.4
|
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-
|
11
|
+
date: 2023-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: syntax_tree
|
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
requirements: []
|
64
|
-
rubygems_version: 3.4.
|
64
|
+
rubygems_version: 3.4.18
|
65
65
|
signing_key:
|
66
66
|
specification_version: 4
|
67
67
|
summary: extend syntax_tree
|