ruby-next-core 0.13.1 → 0.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 671c0ebc75d7ba834da83c55556fc9ed752fbbd6869788fc02435aef89f087b8
4
- data.tar.gz: cb17c7ca0aafa112b50431f97170cdc16caba65fdbbb2bff6ebed039f1e2e489
3
+ metadata.gz: f8f96706a5e89d202c08d55a2a500975f08e80a2fcb07f2615982d07473f8bb1
4
+ data.tar.gz: 91327d7797411dd0658646389d66eb6d9519f2a54c9c86a55d46a6a0e105b4e6
5
5
  SHA512:
6
- metadata.gz: 0642f3a3353f99d8ed5e76c4b530c748b7fc712c2ed04ba8e840a853087b3d94299ade88b83fd0ea472223bd5ee61f8c80618f818987ae541d4dc291eff8f0c2
7
- data.tar.gz: 326aaccb2ec27ca7a28a802f755fcfc44748a825283d82d19055afe3a84d1b42eb9a48d41d5025b9b5be33230f6f88681e16b88537770270245b0435f457d49e
6
+ metadata.gz: b14d836602c69fe59d2432170a08632b288aa2589516dc0892a47bcf86fcddde7cb8c1f03d874c760567d71441adfe7fc1b94e100db6d92f67a3bc1e2d35c305
7
+ data.tar.gz: b8b61a1bccc6e4959598d3fe73e9c44c9c9a1265ae0ddaa228e79d43ceabd57e0e61800f9f3aba86e5ed7235ba65623c5d9a0df83f013647220537bf0c2d9cff
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 0.13.2 (2021-11-28)
6
+
7
+ - Parser upgrade.
8
+
5
9
  ## 0.13.1 (2021-09-27)
6
10
 
7
11
  - Fix checking for realpath during $LOAD_PATH setup. ([@palkan][])
data/README.md CHANGED
@@ -522,14 +522,14 @@ require "ruby-next/language/runtime"
522
522
 
523
523
  ### Supported edge features
524
524
 
525
- `Array#intersect?` ([#15198](https://bugs.ruby-lang.org/issues/15198))
525
+ - `Array#intersect?` ([#15198](https://bugs.ruby-lang.org/issues/15198))
526
+
527
+ - Shorthand Hash/kwarg notation (`data = {x:, y:}` or `foo(x:, y:)`) ([#15236](https://bugs.ruby-lang.org/issues/15236)).
526
528
 
527
529
  ### Supported proposed features
528
530
 
529
531
  - _Method reference_ operator (`.:`) ([#13581](https://bugs.ruby-lang.org/issues/13581)).
530
532
 
531
- - Shorthand Hash/kwarg notation (`data = {x, y}` or `foo(x:, y:)`) ([#15236](https://bugs.ruby-lang.org/issues/15236)).
532
-
533
533
  ## Contributing
534
534
 
535
535
  Bug reports and pull requests are welcome on GitHub at [https://github.com/ruby-next/ruby-next](ttps://github.com/ruby-next/ruby-next).
@@ -62,7 +62,7 @@ module RubyNext
62
62
  mod_name = singleton? ? singleton.name : mod.name
63
63
  camelized_method_name = method_name.to_s.split("_").map(&:capitalize).join
64
64
 
65
- "#{mod_name}#{camelized_method_name}".gsub(/\W/, "")
65
+ "#{mod_name}#{camelized_method_name}".gsub(/\W/, "") # rubocop:disable Performance/StringReplacement
66
66
  end
67
67
 
68
68
  def build_location(trace_locations)
@@ -62,7 +62,7 @@ module RubyNext
62
62
  mod_name = singleton? ? singleton.name : mod.name
63
63
  camelized_method_name = method_name.to_s.split("_").map(&:capitalize).join
64
64
 
65
- "#{mod_name}#{camelized_method_name}".gsub(/\W/, "")
65
+ "#{mod_name}#{camelized_method_name}".gsub(/\W/, "") # rubocop:disable Performance/StringReplacement
66
66
  end
67
67
 
68
68
  def build_location(trace_locations)
@@ -62,7 +62,7 @@ module RubyNext
62
62
  mod_name = singleton? ? singleton.name : mod.name
63
63
  camelized_method_name = method_name.to_s.split("_").map(&:capitalize).join
64
64
 
65
- "#{mod_name}#{camelized_method_name}".gsub(/\W/, "")
65
+ "#{mod_name}#{camelized_method_name}".gsub(/\W/, "") # rubocop:disable Performance/StringReplacement
66
66
  end
67
67
 
68
68
  def build_location(trace_locations)
@@ -5,13 +5,15 @@ module RubyNext
5
5
  module Rewriters
6
6
  class ShorthandHash < Base
7
7
  NAME = "shorthand-hash"
8
- SYNTAX_PROBE = "data = {x}"
9
- MIN_SUPPORTED_VERSION = Gem::Version.new(RubyNext::NEXT_VERSION)
8
+ SYNTAX_PROBE = "data = {x:}"
9
+ MIN_SUPPORTED_VERSION = Gem::Version.new("3.1.0")
10
+
11
+ def on_pair(node)
12
+ return super(node) unless node.children[0].loc.last_column == node.children[1].loc.last_column
10
13
 
11
- def on_ipair(node)
12
14
  context.track! self
13
15
 
14
- ident, = *node.children
16
+ _, ident, = *node.children
15
17
 
16
18
  key = key_from_ident(ident)
17
19
 
@@ -79,10 +79,6 @@ module RuboCop
79
79
  trigger_responding_cops(:on_meth_ref, node)
80
80
  end
81
81
 
82
- def on_ipair(node)
83
- trigger_responding_cops(:on_ipair, node)
84
- end
85
-
86
82
  unless method_defined?(:on_numblock)
87
83
  def on_numblock(node)
88
84
  children = node.children
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyNext
4
- VERSION = "0.13.1"
4
+ VERSION = "0.13.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-next-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.1
4
+ version: 0.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Dementyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-27 00:00:00.000000000 Z
11
+ date: 2021-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-next-parser
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.0.3
19
+ version: 3.1.0.0
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 3.0.0.3
26
+ version: 3.1.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: unparser
29
29
  requirement: !ruby/object:Gem::Requirement