README.md in ruby-next-0.9.2 vs README.md in ruby-next-0.10.0
- old
+ new
@@ -35,10 +35,12 @@
## Examples
- Ruby gems
- [anyway_config](https://github.com/palkan/anyway_config)
- [graphql-fragment_cache](https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache)
+- Rails applications
+ - [anycable_rails_demo](https://github.com/anycable/anycable_rails_demo)
- mruby
- [ACLI](https://github.com/palkan/acli)
_Please, submit a PR to add your project to the list!_
@@ -66,11 +68,11 @@
Core provides **polyfills** for Ruby core classes APIs via Refinements (default strategy) or core extensions (optionally or for refinement-less environments).
Language is responsible for **transpiling** edge Ruby syntax into older versions. It could be done
programmatically or via CLI. It also could be done in runtime.
-Currently, Ruby Next supports Ruby versions 2.3+, including JRuby 9.2.8+ and TruffleRuby 20.1+ (with some limitations). Support for EOL versions (<2.5) slightly differs though ([see below](#using-with-eol-rubies)).
+Currently, Ruby Next supports Ruby versions 2.2+, including JRuby 9.2.8+ and TruffleRuby 20.1+ (with some limitations). Support for EOL versions (<2.5) slightly differs though ([see below](#using-with-eol-rubies)).
Please, [open an issue](https://github.com/ruby-next/ruby-next/issues/new/choose) or join the discussion in the existing ones if you would like us to support older Ruby versions.
## Quick start
@@ -137,11 +139,11 @@
- Use refinements for libraries development (to avoid conflicts with others code)
- Using core extensions could be considered for application development (no need to think about `using RubyNext`); this approach could potentially lead to conflicts with dependencies (if these dependencies are not using refinements 🙂)
- Use core extensions if refinements are not supported by your platform
-**NOTE:** TruffleRuby doesn't fully support refinements (refining modules is not supported as of v20.1.0).
+**NOTE:** _Edge_ APIs (i.e., from the Ruby's master branch) are included by default.
[**The list of supported APIs.**][features_core]
## Transpiling
@@ -425,10 +427,12 @@
You must set `TargetRubyVersion: next` to make RuboCop use a Ruby Next parser.
Alternatively, you can load the patch from the command line by running: `rubocop -r ruby-next/rubocop ...`.
+We recommend using the latest RuboCop version, 'cause it has support for new nodes built-in.
+
Also, when pre-transpiling source code with `ruby-next nextify`, we suggest ignoring the transpiled files:
```yml
AllCops:
Exclude:
@@ -437,11 +441,11 @@
**NOTE:** you need `ruby-next` gem available in the environment where you run RuboCop (having `ruby-next-core` is not enough).
## Using with EOL Rubies
-We currently provide support for Ruby 2.3 and 2.4. Work on 2.2 is in progress.
+We currently provide support for Ruby 2.2, 2.3 and 2.4.
Ruby Next itself relies on 2.5 features and contains polyfills only for version 2.5+ (and that won't change).
Thus, to make it work with <2.5 we need to backport some APIs ourselves.
The recommended way of doing this is to use [backports][] gem. You need to load backports **before Ruby Next**.
@@ -467,10 +471,12 @@
RUBY_NEXT_CORE_STRATEGY=backports ruby-next nextify lib/
```
**NOTE:** Make sure you have `backports` gem installed globally or added to your bundle (if you're using `bundle exec ruby-next ...`).
+**NOTE:** For Ruby 2.2, safe navigation operator (`&.`) and squiggly heredocs (`<<~TXT`) support is provided.
+
## Proposed and edge features
Ruby Next aims to bring edge and proposed features to Ruby community before they (hopefully) reach an official Ruby release.
This includes:
@@ -500,14 +506,18 @@
### Supported edge features
- "Endless" method definition (`def foo() = 42`) ([#16746](https://bugs.ruby-lang.org/issues/16746)).
-- Right-hand assignment (`13.divmod(5) => a,b`) ([#15921](https://bugs.ruby-lang.org/issues/15921))
+- Right-hand assignment (`13.divmod(5) => a,b`) ([#15921](https://bugs.ruby-lang.org/issues/15921)).
+- Find pattern (`[0, 1, 2] in [*, 1 => a, *c]`) ([#16828](https://bugs.ruby-lang.org/issues/16828)).
+
### Supported proposed features
- _Method reference_ operator (`.:`) ([#13581](https://bugs.ruby-lang.org/issues/13581)).
+
+- Shorthand Hash notation (`data = {x, y}`) ([#15236](https://bugs.ruby-lang.org/issues/15236)).
## Contributing
Bug reports and pull requests are welcome on GitHub at [https://github.com/ruby-next/ruby-next](ttps://github.com/ruby-next/ruby-next).