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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76f93356ad00c2206f575f6aa8117de178eb2710a6534f8df11c10871f68a9b8
4
- data.tar.gz: a846f03d2f62bf8928764a6423df58ded2b1f524cf677c886f069f9e835cc7e9
3
+ metadata.gz: 0b0bc3412938b71b6b55e193aad641be13db37edbab5677dfe8073477b7204b4
4
+ data.tar.gz: beea90b07e9c1dbe2cc4fb81dd0dff4788debde15556678159a07b80b966e155
5
5
  SHA512:
6
- metadata.gz: 7e677f857fe5e663a92d2e2905535647ce0c4c6927da6a151a1ab88fd7c3265d465efba409cd4147c7c20486e7aedde93cb7bfa715c00f19d499708bfb5ae17e
7
- data.tar.gz: f9b15130df4786bb1b9548ea3d21eb234508270c38599b80cf01600fa7cd8de8c6150283c6e1e13bb69975b5aea6ad0535410fc952d8013963921ec4926efd7b
6
+ metadata.gz: 39587b98d39f57db669bfef81184d825cf5e3f3e71da224bd4133824e0240e3f914c9173daa2dd6c7a30a27afdaf7d34053e2606778164a602f4d98f58a0ed22
7
+ data.tar.gz: 51182e6fa69cd06987e6dcfe6830a3359982eadff419e7192ab4c6160c075599d3382f34f4e9d20256b8f577577539d30ed3338ab6b2c79019031215a4db9421
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.7.2 (2024-02-17)
4
+
5
+ * Use `Hash#filter` instead of `Hash#reject`
6
+
3
7
  ## 0.7.1 (2024-02-11)
4
8
 
5
9
  * Reuse `respond_to_assocs`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- syntax_tree_ext (0.7.1)
4
+ syntax_tree_ext (0.7.2)
5
5
  syntax_tree
6
6
 
7
7
  GEM
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SyntaxTreeExt
4
- VERSION = "0.7.1"
4
+ VERSION = "0.7.2"
5
5
  end
@@ -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([]).except(:location, :comments).values.each do |child_node|
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.1
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 00:00:00.000000000 Z
11
+ date: 2024-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: syntax_tree