ruby-next-core 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/ruby-next/config.rb +6 -1
- data/lib/ruby-next/language/parser.rb +0 -3
- data/lib/ruby-next/language/rewriters/method_reference.rb +1 -1
- data/lib/ruby-next/language/rewriters/shorthand_hash.rb +1 -1
- data/lib/ruby-next/language/unparser.rb +0 -10
- data/lib/ruby-next/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5408955fbe7d23afdc9d534e433c4c094b0a3ea46a47606a6caab7b6a4c446eb
|
4
|
+
data.tar.gz: 8b1edd6c3dbdc0322a4f3efa3eff5b4f278b2fd78bf8c9e995f1587b62278b0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f3483fb111153c9d9d14e4169302f4613a3428655b71ca83e77a5f7a6d906fc151712facec5f1c95742d77920db16bfa533fb5c34e01b8f3451f720a6fa442b
|
7
|
+
data.tar.gz: '09febbb7523724d5b23ba11814387dffe043d7574496923ed1731ba6664d2c9af2a02cba6568846ce6be96bdcb8e4a4eb341029c7d3099d0e02b64e9056d4744'
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## 0.11.1 (2020-12-28)
|
6
|
+
|
7
|
+
- Use separate _namespace_ for proposed features to avoid conflicts with new Ruby version. ([@palkan][])
|
8
|
+
|
9
|
+
Previously, we used the upcoming Ruby version number for proposed features (e.g., `3.0.0`), which broke
|
10
|
+
the load path setup, since transpiled files were not loaded anymore.
|
11
|
+
Now that's fixed by using a _virtual_ version number for proposals (`1995.next.0`).
|
12
|
+
|
5
13
|
## 0.11.0 (2020-12-24) 🎄
|
6
14
|
|
7
15
|
- Extended proposed shorthand Hash syntax to support kwargs as well. ([@palkan][])
|
data/lib/ruby-next/config.rb
CHANGED
@@ -15,6 +15,9 @@ module RubyNext
|
|
15
15
|
|
16
16
|
LATEST_VERSION = [3, 0].freeze
|
17
17
|
|
18
|
+
# A virtual version number used for proposed features
|
19
|
+
NEXT_VERSION = "1995.next.0"
|
20
|
+
|
18
21
|
class << self
|
19
22
|
# TruffleRuby claims it's 2.7.2 compatible but...
|
20
23
|
if defined?(TruffleRuby) && ::RUBY_VERSION =~ /^2\.7/
|
@@ -28,9 +31,11 @@ module RubyNext
|
|
28
31
|
end
|
29
32
|
|
30
33
|
def next_ruby_version(version = current_ruby_version)
|
34
|
+
return if version == Gem::Version.new(NEXT_VERSION)
|
35
|
+
|
31
36
|
major, minor = Gem::Version.new(version).segments.map(&:to_i)
|
32
37
|
|
33
|
-
return if major >= LATEST_VERSION.first && minor >= LATEST_VERSION.last
|
38
|
+
return Gem::Version.new(NEXT_VERSION) if major >= LATEST_VERSION.first && minor >= LATEST_VERSION.last
|
34
39
|
|
35
40
|
nxt =
|
36
41
|
if LAST_MINOR_VERSIONS[major] == minor
|
@@ -19,9 +19,6 @@ module RubyNext
|
|
19
19
|
class Builder < ::Parser::Builders::Default
|
20
20
|
modernize
|
21
21
|
|
22
|
-
# Unparser doesn't support kwargs node yet
|
23
|
-
self.emit_kwargs = false if respond_to?(:emit_kwargs=)
|
24
|
-
|
25
22
|
unless method_defined?(:match_pattern_p)
|
26
23
|
include BuilderExt
|
27
24
|
end
|
@@ -6,7 +6,7 @@ module RubyNext
|
|
6
6
|
class MethodReference < Base
|
7
7
|
NAME = "method-reference"
|
8
8
|
SYNTAX_PROBE = "Language.:transform"
|
9
|
-
MIN_SUPPORTED_VERSION = Gem::Version.new(
|
9
|
+
MIN_SUPPORTED_VERSION = Gem::Version.new(RubyNext::NEXT_VERSION)
|
10
10
|
|
11
11
|
def on_meth_ref(node)
|
12
12
|
context.track! self
|
@@ -6,7 +6,7 @@ module RubyNext
|
|
6
6
|
class ShorthandHash < Base
|
7
7
|
NAME = "shorthand-hash"
|
8
8
|
SYNTAX_PROBE = "data = {x}"
|
9
|
-
MIN_SUPPORTED_VERSION = Gem::Version.new(
|
9
|
+
MIN_SUPPORTED_VERSION = Gem::Version.new(RubyNext::NEXT_VERSION)
|
10
10
|
|
11
11
|
def on_ipair(node)
|
12
12
|
context.track! self
|
@@ -6,13 +6,3 @@ require "parser/current"
|
|
6
6
|
$VERBOSE = save_verbose
|
7
7
|
|
8
8
|
require "unparser"
|
9
|
-
|
10
|
-
# PR: https://github.com/mbj/unparser/pull/230
|
11
|
-
if defined? Unparser::Emitter::InPattern
|
12
|
-
Unparser::Emitter::InPattern.prepend(Module.new do
|
13
|
-
def dispatch
|
14
|
-
super
|
15
|
-
nl unless branch
|
16
|
-
end
|
17
|
-
end)
|
18
|
-
end
|
data/lib/ruby-next/version.rb
CHANGED
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.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Dementyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-next-parser
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.5.6
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: 0.6.0
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 0.
|
43
|
+
version: 0.5.6
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 0.6.0
|