ruby-next 0.13.0 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +40 -0
  3. data/README.md +31 -5
  4. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a269607775cfa686e8faf830d34ecd219d16886fe01579dfbf580fe082050cc5
4
- data.tar.gz: bc2bbe33cc4e177744d06c5987c069b3f540fabdc3b27170f956f50f7be899f3
3
+ metadata.gz: 83cba15364cdf7a70449a2516549ba4d824fb06cdfdb6a49add645ab5ce6cc7a
4
+ data.tar.gz: fc131a17d022a4fd367ad58eda5e8a4c0eaf49cbd122a1151cd4bb72a3462406
5
5
  SHA512:
6
- metadata.gz: 7b757f7d4828249e8d51736dd79a3dc856ecda5424dd2a13c2065011ca832726a4914be1eb5c6b428472da5737215eaf7c7022b8d57dc010c6eb814b68d1547b
7
- data.tar.gz: 725f0487c42403889dd824f9b341c854e0faf3164c8723ef0588f1a1bec0344b335f0a66d4471d6ee25b23b76e7025dd723b118830c3c44b33913566e511f7f7
6
+ metadata.gz: 8cebc2b5299b23a16ba5f303219b32ce5d90d9636778220ef6254a1743122b433ce57da1f887daaa1b90f78184c59df8c8684ef1656d26031057e6b492071c03
7
+ data.tar.gz: 5e98223fa663a2bca82819e6cb9275ead0c7ff2709fb2c49c050203b8441226d03acba611ef5c530f2aae44d996338f311db987b9ab31ea50b7843434e535361
data/CHANGELOG.md CHANGED
@@ -2,6 +2,46 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 0.14.0 🎄
6
+
7
+ - Add `Integer.try_convert`. ([@palkan][])
8
+
9
+ - Add `Enumerable#compact`, `Enumerator::Lazy#compact`. ([@palkan][])
10
+
11
+ - [Proposed] Add support for binding instance, class, global variables in pattern matching. ([@palkan][])
12
+
13
+ This brings back rightward assignment: `42 => @v`.
14
+
15
+ - Add `MatchData#match`. ([@palkan][])
16
+
17
+ - Add support for command syntax in endless methods (`def foo() = puts "bar"`)
18
+
19
+ - Add `Refinement#import_methods` support. ([@palkan][])
20
+
21
+ This API only works in conjunction with transpiling, since it couldn't be backported purely as a method and requires passing an additional argument (Binding).
22
+
23
+ You can find the details in [the PR](https://github.com/ruby-next/ruby-next/pull/85).
24
+
25
+ - Added support for instance, class and global variables and expressions for pin operator. ([@palkan][])
26
+
27
+ - Support omitting parentheses in one-line pattern matching. ([@palkan][])
28
+
29
+ - Anonymous blocks `def b(&); c(&); end` ([@palkan][]).
30
+
31
+ ## 0.13.3 (2021-12-08)
32
+
33
+ - Revert 0.13.2 and freeze Parser version. ([@skryukov][])
34
+
35
+ Postpone upgrade 'till v0.14 due to breaking shorthand hash changes.
36
+
37
+ ## 0.13.2 (2021-11-28)
38
+
39
+ - Parser upgrade.
40
+
41
+ ## 0.13.1 (2021-09-27)
42
+
43
+ - Fix checking for realpath during $LOAD_PATH setup. ([@palkan][])
44
+
5
45
  ## 0.13.0 (2021-09-27)
6
46
 
7
47
  - Added `Enumerable#tally` with the resulting hash. ([@skryukov][])
data/README.md CHANGED
@@ -73,6 +73,7 @@ _Please, submit a PR to add your project to the list!_
73
73
  - [RuboCop](#rubocop)
74
74
  - [Using with EOL Rubies](#using-with-eol-rubies)
75
75
  - [Proposed & edge features](#proposed-and-edge-features)
76
+ - [Known limitations](#known-limitations)
76
77
 
77
78
  ## Overview
78
79
 
@@ -200,8 +201,6 @@ You can change the transpiler mode:
200
201
  - Via environmental variable `RUBY_NEXT_TRANSPILE_MODE=ast`.
201
202
  - Via CLI option ([see below](#cli)).
202
203
 
203
- **NOTE:** For the time being, Unparser doesn't support Ruby 3.0 AST nodes, so we always use rewrite mode in Ruby 3.0+.
204
-
205
204
  ## CLI
206
205
 
207
206
  Ruby Next ships with the command-line interface (`ruby-next`) which provides the following functionality:
@@ -231,7 +230,7 @@ Usage: ruby-next nextify DIRECTORY_OR_FILE [options]
231
230
 
232
231
  The behaviour depends on whether you transpile a single file or a directory:
233
232
 
234
- - When transpiling a directory, the `.rbnext` subfolder is created within the target folder with subfolders for each supported Ruby versions (e.g., `.rbnext/2.6`, `.rbnext/2.7`, `.rbnext/3.0`). If you want to create only a single version (the smallest), you can also pass `--single-version` flag. In that case, no version directory is created (i.e., transpiled files go into `.rbnext`).
233
+ - When transpiling a directory, the `.rbnext` subfolder is created within the target folder with subfolders for each supported Ruby versions (e.g., `.rbnext/2.6`, `.rbnext/2.7`, `.rbnext/3.0`, etc.). If you want to create only a single version (the smallest), you can also pass `--single-version` flag. In that case, no version directory is created (i.e., transpiled files go into `.rbnext`).
235
234
 
236
235
  - When transpiling a file and providing the output path as a _file_ path, only a single version is created. For example:
237
236
 
@@ -283,6 +282,8 @@ $ ruby-next core_ext -l --name=filter --name=deconstruct
283
282
  - EnumeratorLazyFilterMap
284
283
  - HashDeconstructKeys
285
284
  - StructDeconstruct
285
+
286
+ ...
286
287
  ```
287
288
 
288
289
  ### CLI configuration file
@@ -522,13 +523,38 @@ require "ruby-next/language/runtime"
522
523
 
523
524
  ### Supported edge features
524
525
 
525
- `Array#intersect?` ([#15198](https://bugs.ruby-lang.org/issues/15198))
526
+ It's too early, Ruby 3.1 has just been released. See its features in the [supported features list](./SUPPORTED_FEATURES.md).
526
527
 
527
528
  ### Supported proposed features
528
529
 
529
530
  - _Method reference_ operator (`.:`) ([#13581](https://bugs.ruby-lang.org/issues/13581)).
531
+ - Binding non-local variables in pattern matching (`42 => @v`) ([#18408](https://bugs.ruby-lang.org/issues/18408)).
532
+
533
+ ## Known limitations
534
+
535
+ Ruby Next aims to be _reasonably compatible_ with MRI. That means, some edge cases could be uncovered. Below is the list of known limitations.
536
+
537
+ For gem authors, we recommend testing against all supported versions on CI to make sure you're not hit by edge cases.
538
+
539
+ ### Enumerable methods
540
+
541
+ Using refinements (`using RubyNext`) for modules could lead to unexpected behaviour in case there is also a `prepend` for the same module in Ruby <2.7.
542
+ To eliminate this, we also refine Array (when appropriate), but other enumerables could be affected.
543
+
544
+ See [this issue](https://bugs.ruby-lang.org/issues/13446) for details.
545
+
546
+ ### `Refinement#import_methods`
547
+
548
+ - Doesn't support importing methods generated with `eval`.
549
+ - Doesn't support aliases (both `alias` and `alias_method`).
550
+ - In JRuby, importing attribute accessors/readers/writers is not supported.
551
+ - When using AST transpiling in runtime, likely fails to import methods from a transpiled files (due to the updated source location).
552
+
553
+ See the [original PR](https://github.com/ruby-next/ruby-next/pull/85) for more details.
554
+
555
+ ### Other
530
556
 
531
- - Shorthand Hash/kwarg notation (`data = {x, y}` or `foo(x:, y:)`) ([#15236](https://bugs.ruby-lang.org/issues/15236)).
557
+ See [Parser's known issues](https://github.com/whitequark/parser#known-issues).
532
558
 
533
559
  ## Contributing
534
560
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-next
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.0
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-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-next-core
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.13.0
19
+ version: 0.14.0
20
20
  type: :runtime
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: 0.13.0
26
+ version: 0.14.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ruby-next-parser
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 3.0.0.3
33
+ version: 3.1.1.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 3.0.0.3
40
+ version: 3.1.1.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: unparser
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  requirements: []
91
- rubygems_version: 3.2.15
91
+ rubygems_version: 3.2.22
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: Make older Rubies quack like edge Ruby