{"id":13879222,"url":"https://github.com/ruby-next/ruby-next","last_synced_at":"2025-09-12T09:05:17.114Z","repository":{"id":36134671,"uuid":"217547293","full_name":"ruby-next/ruby-next","owner":"ruby-next","description":"Ruby Next makes modern Ruby code run in older versions and alternative implementations","archived":false,"fork":false,"pushed_at":"2025-06-24T22:37:16.000Z","size":947,"stargazers_count":769,"open_issues_count":5,"forks_count":43,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-09-09T03:23:19.169Z","etag":null,"topics":["hacktoberfest","ruby","transpiler"],"latest_commit_sha":null,"homepage":"https://ruby-next.github.io","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruby-next.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"SUPPORTED_FEATURES.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"palkan"}},"created_at":"2019-10-25T14:05:53.000Z","updated_at":"2025-08-27T20:45:14.000Z","dependencies_parsed_at":"2023-12-04T17:30:41.627Z","dependency_job_id":"6ac2e2ce-02b1-4b17-8c68-61749e0e902d","html_url":"https://github.com/ruby-next/ruby-next","commit_stats":{"total_commits":442,"total_committers":10,"mean_commits":44.2,"dds":0.06561085972850678,"last_synced_commit":"e45293438e67345317d7d8f50179b4b6ba47fdef"},"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"purl":"pkg:github/ruby-next/ruby-next","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby-next%2Fruby-next","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby-next%2Fruby-next/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby-next%2Fruby-next/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby-next%2Fruby-next/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby-next","download_url":"https://codeload.github.com/ruby-next/ruby-next/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby-next%2Fruby-next/sbom","scorecard":{"id":788879,"data":{"date":"2025-08-11","repo":{"name":"github.com/ruby-next/ruby-next","commit":"fe2ab30f30e99217eb2d07af63c301d373b2069d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Maintained","score":3,"reason":"4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/release.yml:12","Warn: no topLevel permission defined: .github/workflows/docs-lint.yml:1","Warn: no topLevel permission defined: .github/workflows/jruby-test.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/rubocop.yml:1","Warn: no topLevel permission defined: .github/workflows/ruby-edge-test.yml:1","Warn: no topLevel permission defined: .github/workflows/ruby-eol-test.yml:1","Warn: no topLevel permission defined: .github/workflows/ruby-prism-test.yml:1","Warn: no topLevel permission defined: .github/workflows/ruby-test.yml:1","Warn: no topLevel permission defined: .github/workflows/truffle-test.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs-lint.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/docs-lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/jruby-test.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/jruby-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/jruby-test.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/jruby-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/jruby-test.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/jruby-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/jruby-test.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/jruby-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/jruby-test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/jruby-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/jruby-test.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/jruby-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rubocop.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/rubocop.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rubocop.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/rubocop.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ruby-edge-test.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/ruby-edge-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ruby-edge-test.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/ruby-edge-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ruby-eol-test.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/ruby-eol-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ruby-eol-test.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/ruby-eol-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ruby-eol-test.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/ruby-eol-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ruby-eol-test.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/ruby-eol-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ruby-eol-test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/ruby-eol-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ruby-eol-test.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/ruby-eol-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ruby-prism-test.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/ruby-prism-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ruby-prism-test.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/ruby-prism-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ruby-test.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/ruby-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ruby-test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/ruby-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ruby-test.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/ruby-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ruby-test.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/ruby-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ruby-test.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/ruby-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ruby-test.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/ruby-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/truffle-test.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/truffle-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/truffle-test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/truffle-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/truffle-test.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/truffle-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/truffle-test.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/truffle-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/truffle-test.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/truffle-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/truffle-test.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/truffle-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/truffle-test.yml:81: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/truffle-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/truffle-test.yml:82: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/truffle-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/truffle-test.yml:87: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/truffle-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/truffle-test.yml:109: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/truffle-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/truffle-test.yml:110: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/truffle-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/truffle-test.yml:115: update your workflow using https://app.stepsecurity.io/secureworkflow/ruby-next/ruby-next/truffle-test.yml/master?enable=pin","Info:   0 out of  24 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  16 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T06:53:22.180Z","repository_id":36134671,"created_at":"2025-08-23T06:53:22.180Z","updated_at":"2025-08-23T06:53:22.180Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274530783,"owners_count":25302950,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","ruby","transpiler"],"created_at":"2024-08-06T08:02:14.045Z","updated_at":"2025-09-12T09:05:17.023Z","avatar_url":"https://github.com/ruby-next.png","language":"Ruby","funding_links":["https://github.com/sponsors/palkan"],"categories":["Ruby","Ruby-to-Ruby"],"sub_categories":[],"readme":"[![Cult Of Martians](http://cultofmartians.com/assets/badges/badge.svg)](https://cultofmartians.com/tasks/ruby-next-cli-rewriters.html#task)\n[![Gem Version](https://badge.fury.io/rb/ruby-next.svg)](https://rubygems.org/gems/ruby-next) [![Build](https://github.com/ruby-next/ruby-next/workflows/Build/badge.svg)](https://github.com/ruby-next/ruby-next/actions)\n[![JRuby Build](https://github.com/ruby-next/ruby-next/workflows/JRuby%20Build/badge.svg)](https://github.com/ruby-next/ruby-next/actions?query=workflow%3A%22TruffleRuby+Build%22)\n[![TruffleRuby Build](https://github.com/ruby-next/ruby-next/workflows/TruffleRuby%20Build/badge.svg)](https://github.com/ruby-next/ruby-next/actions?query=workflow%3A%22TruffleRuby+Build%22)\n\n# Ruby Next\n\n\u003cimg align=\"right\" height=\"184\"\n     title=\"Ruby Next logo\" src=\"./assets/images/logo.svg\"\u003e\n\nRuby Next is a **transpiler** and a collection of **polyfills** for supporting the latest and upcoming Ruby features (APIs and syntax) in older versions and alternative implementations. For example, you can use pattern matching and `Kernel#then` in Ruby 2.5 or [mruby][].\n\nWho might be interested in Ruby Next?\n\n- **Ruby gems maintainers** who want to write code using the latest Ruby version but still support older ones.\n- **Application developers** who want to give new features a try without waiting for the final release (or, more often, for the first patch).\n- **Users of non-MRI implementations** such as [mruby][], [JRuby][], [TruffleRuby][], [Natalie][], [Opal][], [RubyMotion][], [Artichoke][], [Prism][].\n- **Ruby syntax enthusiasts** who want to experiment with [custom syntax extensions](#custom-syntax-rewriters) 👩‍🔬👨‍🔬.\n\nRuby Next also aims to help the community to assess new, _experimental_, MRI features by making it easier to play with them.\nThat's why Ruby Next implements the `master` features as fast as possible.\n\nSee also a companion library (extracted from Ruby Next) that provides **code loading hooks** for your needs—[require-hooks][require-hooks].\n\nRead more about the motivation behind the Ruby Next in this post: [Ruby Next: Make all Rubies quack alike](https://evilmartians.com/chronicles/ruby-next-make-all-rubies-quack-alike).\n\n\u003ctable style=\"border:none;\"\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n     \u003ca href=\"https://evilmartians.com/?utm_source=ruby-next\"\u003e\n          \u003cimg src=\"https://evilmartians.com/badges/sponsored-by-evil-martians.svg\" alt=\"Sponsored by Evil Martians\" width=\"236\" height=\"54\"\u003e\n     \u003c/a\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n     \u003ca href=\"http://www.digitalfukuoka.jp/topics/169\"\u003e\n          \u003cimg src=\"http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/excellence.jpg\" width=\"200\"\u003e\n     \u003c/a\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Posts\n\n- [Ruby Next: Make all Rubies quack alike](https://evilmartians.com/chronicles/ruby-next-make-all-rubies-quack-alike)\n\n## Talks\n\n- [Ruby Next: Make old Rubies quack like a new one](https://noti.st/palkan/j3i2Dr/ruby-next-make-old-rubies-quack-like-a-new-one) (RubyConf 2019)\n\n## Examples\n\n- Ruby gems\n  - [action_policy](https://github.com/palkan/action_policy)\n  - [anyway_config](https://github.com/palkan/anyway_config)\n  - [graphql-fragment_cache](https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache)\n- Rails applications\n  - [anycable_rails_demo](https://github.com/anycable/anycable_rails_demo)\n- mruby\n  - [ACLI](https://github.com/palkan/acli)\n\n_Please, submit a PR to add your project to the list!_\n\n## Table of contents\n\n- [Overview](#overview)\n- [Quick start](#quick-start)\n- [Polyfills](#using-only-polyfills)\n- [Transpiling](#transpiling)\n  - [Modes](#transpiler-modes)\n  - [CLI](#cli)\n  - [Using in gems](#integrating-into-a-gem-development)\n  - [Runtime usage](#runtime-usage)\n  - [`ruby -ruby-next`](#uby-next)\n  - [Logging \u0026 Debugging](#logging-and-debugging)\n- [RuboCop](#rubocop)\n- [Using with IRB](#irb)\n- [Using with Pry](#pry)\n- [Using with EOL Rubies](#using-with-eol-rubies)\n- [Proposed \u0026 edge features](#proposed-and-edge-features)\n- [Custom syntax rewriters](#custom-syntax-rewriters)\n- [Known limitations](#known-limitations)\n\n## Overview\n\nRuby Next consists of two parts: **core** and **language**.\n\nCore provides **polyfills** for Ruby core classes APIs via Refinements (default strategy) or core extensions (optionally or for refinement-less environments).\n\nLanguage is responsible for **transpiling** edge Ruby syntax into older versions. It could be done\nprogrammatically or via CLI. It also could be done in runtime.\n\nCurrently, Ruby Next supports Ruby versions 2.3+, including JRuby 9.2.8+ and TruffleRuby 20.1+ (with some limitations). Support for older versions (\u003c2.5) slightly differs though ([see below](#using-with-eol-rubies)). Versions between 2.0 and 2.3 may work but we no longer test against them.\n\nPlease [open an issue](https://github.com/ruby-next/ruby-next/issues/new/choose) or join the discussion in the existing issues if you would like us to support older Ruby versions.\n\n## Quick start\n\nThe quickest way to start experimenting with Ruby Next is to install the gem and run a sample script. For example:\n\n```sh\n# Install Ruby Next globally\n$ gem install ruby-next\n\n# Call ruby with -ruby-next flag\n$ ruby -ruby-next -e \"\ngreet = proc do\n  case it\n    in hello: hello if hello =~ /human/i\n      '🙂'\n    in hello: 'martian'\n      '👽'\n    end\nend\n\nputs greet.call(hello: 'martian')\n\"\n\n=\u003e 👽\n```\n\n## Using only polyfills\n\nFirst, install a gem:\n\n```ruby\n# Gemfile\ngem \"ruby-next-core\"\n\n# gemspec\nspec.add_dependency \"ruby-next-core\", \"~\u003e 1.0\"\n```\n\n**NOTE:** we use a different gem for _distribution_, `ruby-next-core`, to provide a zero-dependency, polyfills-only version.\n\nThen, all you need is to load Ruby Next:\n\n```ruby\nrequire \"ruby-next\"\n```\n\nAnd activate the refinement in every file where you want to use it\\*:\n\n```ruby\nusing RubyNext\n```\n\nRuby Next only refines core classes if necessary; thus, this line wouldn't have any effect in edge Ruby.\n\n**NOTE:** Even if the runtime already contains a monkey-patch with the backported functionality, we consider the method as _dirty_ and activate the refinement for it. Thus, you always have predictable behaviour. That's why we recommend using refinements for gem development.\n\nAlternatively, you can go with monkey-patches. Just add this line:\n\n```ruby\nrequire \"ruby-next/core_ext\"\n```\n\nThe following _rule of thumb_ is recommended when choosing between refinements and monkey-patches:\n\n- Use refinements for library development (to avoid conflicts with others' code)\n- 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 🙂)\n- Use core extensions if refinements are not supported by your platform\n\n**NOTE:** _Edge_ APIs (i.e., from the Ruby's master branch) are included by default.\n\n[**The list of supported APIs.**][features_core]\n\n### Data backport\n\nRuby 3.2 has introduced a new core class—[Data](https://bugs.ruby-lang.org/issues/16122). Ruby Next provides a backport functionality which is automatically activated when you `require \"ruby-next\"` **if and only if the constant is undefined**. If you want to use a custom backport, make sure you loaded it first.\n\nIf you want to opt-out from loading Data backport, you must set the `RUBY_NEXT_DISABLE_DATA` env variable to `true`.\n\n#### Known limitations when using Data\n\nCurrently, passing Hash as a last positional argument to `Data.new` is not supported in Ruby \u003c3.0 (due to the difference in keyword arguments handling). We recommend always using keyword arguments when initializing Data objects.\n\n## Transpiling\n\nRuby Next allows you to transpile\\* edge Ruby syntax to older versions.\n\nTranspiler relies on two libraries: [parser][] and [unparser][].\n\n**NOTE:** The \"official\" parser gem only supports the latest stable Ruby version, while Ruby Next aims to support edge and experimental Ruby features. To enable them, you should use our version of Parser (see [instructions](#using-ruby-next-parser) below).\n\nInstallation:\n\n```ruby\n# Gemfile\ngem \"ruby-next\", \"~\u003e 1.0\"\n\n# gemspec\nspec.add_dependency \"ruby-next\", \"~\u003e 1.0\"\n```\n\n```sh\n# or install globally\ngem install ruby-next\n```\n\n[**The list of supported syntax features.**][features_syntax]\n\n### Transpiler modes\n\nSince v1.0, Ruby Next only support the _rewrite_ mode, i.e., the code transformations are applied directly to the original source code. This allows us to keep formatting as close as possible to the original code.\n\nThe main benefit of the rewrite mode is that it preserves the original code line numbers and layout, which is especially useful in debugging.\n\nThe legacy AST mode (regenerating source code from the modified abstract syntax tree) is deprecated (though still supported).\n\n## CLI\n\nRuby Next ships with the command-line interface (`ruby-next`) which provides the following functionality:\n\n### `ruby-next nextify`\n\nThis command allows you to transpile a file or directory into older Rubies (see, for example, the \"Integrating into a gem development\" section above).\n\nIt has the following interface:\n\n```sh\n$ ruby-next nextify\nUsage: ruby-next nextify DIRECTORY_OR_FILE [options]\n    -o, --output=OUTPUT              Specify output directory or file or stdout\n        --min-version=VERSION        Specify the minimum Ruby version to support\n        --single-version             Only create one version of a file (for the earliest Ruby version)\n        --overwrite                  Overwrites the original file with one version of --single-version (works only with --single-version or --rewrite)\n        --edge                       Enable edge (master) Ruby features\n        --proposed                   Enable proposed/experimental Ruby features\n        --[no-]refine                Do not inject `using RubyNext`\n        --list-rewriters             List available rewriters\n        --rewrite=REWRITERS...       Specify particular Ruby features to rewrite\n        --import-rewriter=PATHS...   Specify the paths to custom rewriters to load\n    -h, --help                       Print help\n    -V                               Turn on verbose mode\n        --dry-run                    Print verbose output without generating files\n```\n\nThe behaviour depends on whether you transpile a single file or a directory:\n\n- When transpiling a directory, the `.rbnext` subfolder is created within the target folder with subfolders for each supported Ruby versions (e.g., `.rbnext/2.7`, `.rbnext/3.1`, `.rbnext/3.4`, 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`).\n\n- When transpiling a file and providing the output path as a _file_ path, only a single version is created. For example:\n\n```sh\n$ ruby-next nextify my_ruby.rb -o my_ruby_next.rb -V\nRuby Next core strategy: refine\nGenerated: my_ruby_next.rb\n```\n\n### `ruby-next core_ext`\n\nThis command could be used to generate a Ruby file with a configurable set of core extensions.\n\nUse this command if you want to backport new Ruby features to Ruby implementations not compatible with RubyGems.\n\nIt has the following interface:\n\n```sh\n$ ruby-next core_ext\nUsage: ruby-next core_ext [options]\n    -o, --output=OUTPUT              Specify output file or stdout (default: ./core_ext.rb)\n    -l, --list                       List all available extensions\n        --min-version=VERSION        Specify the minimum Ruby version to support\n    -n, --name=NAME                  Filter extensions by name\n    -h, --help                       Print help\n    -V                               Turn on verbose mode\n        --dry-run                    Print verbose output without generating files\n```\n\nThe most common use-case is to backport the APIs required by pattern matching. You can do this, for example,\nby including only monkey-patches containing the `\"deconstruct\"` in their names:\n\n```sh\nruby-next core_ext -n deconstruct -o pattern_matching_core_ext.rb\n```\n\nTo list all available (are matching if `--min-version` or `--name` specified) monkey-patches, use the `-l` switch:\n\n```sh\n$ ruby-next core_ext -l --name=filter --name=deconstruct\n2.6 extensions:\n  - ArrayFilter\n  - EnumerableFilter\n  - HashFilter\n\n2.7 extensions:\n  - ArrayDeconstruct\n  - EnumerableFilterMap\n  - EnumeratorLazyFilterMap\n  - HashDeconstructKeys\n  - StructDeconstruct\n\n...\n```\n\n### CLI configuration file\n\nYou can define CLI options in the `.rbnextrc` file located in the root of your project to avoid adding them every time you run `ruby-next`.\n\nConfiguration file is a YAML with commands as keys and options as multiline strings:\n\n```yml\n# ./.rbnextrc\n\nnextify: |\n  --min-version=2.7\n  --edge\n```\n\n**NOTE:** The `nextify` section is also used by auto-transpiling when installing the gem from source and by runtime transpiling.\n\n## Integrating into a gem development\n\nWe recommend _pre-transpiling_ source code to work with older versions before releasing it.\n\nThis is how you can do that with Ruby Next:\n\n- Write source code using the modern/edge Ruby syntax.\n\n- Generate transpiled code by calling `ruby-next nextify ./lib` (e.g., before releasing or pushing to VCS).\n\nThis will produce `lib/.rbnext` folder containing the transpiled files, `lib/.rbnext/2.6`, `lib/.rbnext/2.7`. The version in the path indicates which Ruby version is required for the original functionality. Only the source files containing new syntax are added to this folder.\n\n**NOTE:** Do not edit these files manually, either run linters/type checkers/whatever against these files.\n\n- Add the following code to your gem's _entrypoint_ (the file that is required first and contains other `require`-s):\n\n```ruby\nrequire \"ruby-next/language/setup\"\n\nRubyNext::Language.setup_gem_load_path\n```\n\nThe `setup_gem_load_path` does the following:\n\n- Resolves the current ruby version.\n- Checks whether there are directories corresponding to the current and earlier\\* Ruby versions within the `.rbnext` folder.\n- Add the path to this directory to the `$LOAD_PATH` before the path to the gem's directory.\n\nThat's why need an _entrypoint_: all the subsequent `require` calls will load the transpiled files instead of the original ones\ndue to the way feature resolving works in Ruby (scanning the `$LOAD_PATH` and halting as soon as the matching file is found).\n\n**NOTE:** `require_relative` should be avoided due to the way we _hijack_ the features loading mechanism.\n\nIf you're using [runtime mode](#runtime-usage) a long with `setup_gem_load_path` (e.g., in tests), the transpiled files are ignored (i.e., we do not modify `$LOAD_PATH`).\n\n\\* Ruby Next avoids storing duplicates; instead, only the code for the earlier version is created and is assumed to be used with other versions. For example, if the transpiled code is the same for Ruby 2.5 and Ruby 2.6, only the `.rbnext/2.7/path/to/file.rb` is kept. That's why multiple entries are added to the `$LOAD_PATH` (`.rbnext/2.6`, `.rbnext/2.7`, and `.rbnext/3.0` in the specified order for Ruby 2.5, and `.rbnext/2.7` and `.rbnext/3.0` for Ruby 2.6).\n\n### Transpiled files vs. VCS vs. installing from source\n\nIt's a best practice to not keep generated files in repositories. In case of Ruby Next, it's a `lib/.rbnext` folder.\n\nWe recommend adding this folder only to the gem package (i.e., it should be added to your `spec.files`) and ignore it in your VCS (e.g., `echo \".rbnext/\" \u003e\u003e .gitignore`). That would make transpiled files available in releases without polluting your repository.\n\nWhat if someone decides to install your gem from the VCS source? They would likely face some syntax errors due to the missing transpiled files.\n\nTo solve this problem, Ruby Next _tries_ to transpile the source code when you call `#setup_gem_load_path`. It does this by calling `bundle exec ruby-next nextify \u003clib_dir\u003e -o \u003cnext_dir\u003e`. We make the following assumptions:\n\n- We are in the Bundler context (since that's the most common way of installing gems from source).\n- Our Gemfile contains `ruby-next` gem.\n- We use [`.rbnextrc`](#CLI-configuration-file) for transpiling options.\n\nIf the command fails we warn the end user.\n\nThis feature, _auto-transpiling_, is **disabled** by default (will likely be enabled in future versions). You can enable it by calling `RubyNext::Language.setup_gem_load_path(transpile: true)`.\n\n### Dependency-less setup\n\nIf you want to avoid adding `ruby-next-core` to your gem's dependencies, you can tweak the `$LOAD_PATH` yourself. It's much easier to do if you go with a single transpiled version per source file (i.e., use `--single-version` or specify particular rewriters using the `--rewrite` option of the `ruby-next nextify` command). If so, you can drop the following snippet to your gem's entrypoint:\n\n```ruby\n# lib/my_gem.rb\n$LOAD_PATH.unshift \"#{__dir__}/.rbnext\"\n\n# Then go `require` statements\n# ...\n```\n\nThat's it! Keep in mind that in this cases there is no auto-transpiling support (so, you may want to keep the transpiled files in the repository to allow installing the gem from source).\n\n## Runtime usage\n\nIt is also possible to transpile Ruby source code in run-time via Ruby Next.\n\nAll you need is to `require \"ruby-next/language/runtime\"` to hijack `Kernel#require` and friends before loading the files you want to transpile. You can also automatically inject `using RubyNext` to every\\* loaded file by also adding `require \"ruby-next/core/runtime\"`.\n\nRuntime mode is backed by [require-hooks][require-hooks]—a standalone gem which has been extracted from Ruby Next. Depending on the current runtime, it picks an optimal strategy for hijacking the loading mechanism. Please, refer to its documentation for more details.\n\n\\* Ruby Next doesn't hijack every required file but only the configured directories: `./app/`, `./lib/`, `./spec/`, `./test/` (relative to the `pwd`). It also excludes the `./vendor/bundle` directory by default.\n\nYou can customize target files via the `include_patterns` and `exclude_patterns` configuration options:\n\n```ruby\nRubyNext::Language.include_patterns \u003c\u003c \"path/to/other/dir/*.rb\"\nRubyNext::Language.exclude_patterns \u003c\u003c \"path/to/other/dir/subdir/*\"\n```\n\n**NOTE:** Directories MUST be configured before requiring `ruby-next/language/runtime`.\n\n### Eval \u0026 similar\n\nBy default, we do not hijack `Kernel.eval` and similar methods due to some limitations (e.g., there is no easy and efficient way to access the caller's scope, or _binding_, and some evaluations relies on local variables).\n\nIf you want to support transpiling in `eval`-like methods, opt-in explicitly by activating the refinement:\n\n```ruby\nusing RubyNext::Language::Eval\n```\n\n## `uby-next`\n\n_This is [not a typo](https://github.com/ruby-next/ruby-next/pull/8), that’s the way `ruby -ruby-next` works: it’s equal to `ruby -r uby-next`, and [`uby-next.rb`](https://github.com/ruby-next/ruby-next/blob/master/lib/uby-next.rb) is a special file that activates the runtime mode._\n\nYou can also enable runtime mode by requiring `uby-next` while running a Ruby executable:\n\n```sh\nruby -ruby-next my_ruby_script.rb\n\n# or\nRUBYOPT=\"-ruby-next\" ruby my_ruby_script.rb\n\n# or\nruby -ruby-next -e \"puts [2, 4, 5].tally\"\n```\n\n**NOTE:** running Ruby scripts directly or executing code via `-e` option is not supported in TruffleRuby. You can still use `-ruby-next` to transpile required files, e.g.:\n\n```sh\nruby -ruby-next -r my_ruby_script.rb -e \"puts my_method\"\n```\n\n## Logging and debugging\n\nRuby Next prints some debugging information when fails to load a file in the runtime mode (and fallbacks to the built-in loading mechanism).\n\nYou can disable these warnings either by providing the `RUBY_NEXT_WARN=false` env variable or by setting `RubyNext.silence_warnings = true` in your code.\n\nYou can also enable transpiled source code debugging by setting the `RUBY_NEXT_DEBUG=true` env variable. When it's set, Ruby Next prints the transpiled code before loading it.\n\nYou can use a file pattern as the value for the env var to limit the output: for example, `RUBY_NEXT_DEBUG=my_script.rb`.\n\n## RuboCop\n\nSince Ruby Next provides support for features not available in RuboCop yet, you need to add a patch for compatibility.\nIn you `.rubocop.yml` add the following:\n\n```yml\nrequire:\n  - ruby-next/rubocop\n```\n\nYou must set `TargetRubyVersion: next` to make RuboCop use a Ruby Next parser.\n\nAlternatively, you can load the patch from the command line by running: `rubocop -r ruby-next/rubocop ...`.\n\nWe recommend using the latest RuboCop version, 'cause it has support for new nodes built-in.\n\nAlso, when pre-transpiling source code with `ruby-next nextify`, we suggest ignoring the transpiled files:\n\n```yml\nAllCops:\n  Exclude:\n    - 'lib/.rbnext/**/*'\n```\n\n**NOTE:** you need `ruby-next` gem available in the environment where you run RuboCop (having `ruby-next-core` is not enough).\n\n## IRB\n\nRuby Next supports IRB. In order to enable edge Ruby features for your REPL, add the following line to your `.irbrc`:\n\n```ruby\nrequire \"ruby-next/irb\"\n```\n\nAlternatively, you can require it at startup:\n\n```sh\nirb -r ruby-next/irb\n# or\nirb -ruby-next/irb\n```\n\n## Pry\n\nRuby Next supports Pry. In order to enable edge Ruby features for your REPL, add the following line to your `.pryrc`:\n\n```ruby\nrequire \"ruby-next/pry\"\n```\n\nAlternatively, you can require it at startup:\n\n```sh\npry -r ruby-next/pry\n# or\npry -ruby-next/pry\n```\n\n## Using with EOL Rubies\n\nWe currently provide support for Ruby 2.3+.\n\n**NOTE:** By \"support\" here we mean using `ruby-next` CLI and runtime transpiling. Transpiled code may run on Ruby 2.0+.\n\nRuby Next itself relies on 2.5 features and contains polyfills only for version 2.5+ (and that won't change).\nThus, to make it work with \u003c2.5 we need to backport some APIs ourselves.\n\nThe recommended way of doing this is to use [backports][] gem. You need to load backports **before Ruby Next**.\n\nWhen using runtime features, you should do the following:\n\n```ruby\n# first, require backports upto 2.5\nrequire \"backports/2.5\"\n# then, load Ruby Next\nrequire \"ruby-next\"\n# if you need 2.6+ APIs, add Ruby Next core_ext\nrequire \"ruby-next/core_ext\"\n# then, load runtime transpiling\nrequire \"ruby-next/language/runtime\"\n# or\nrequire \"ruby-next/language/bootsnap\"\n```\n\nTo load backports while using `ruby-next nextify` command, you must configure the environment variable:\n\n```sh\nRUBY_NEXT_CORE_STRATEGY=backports ruby-next nextify lib/\n```\n\n**NOTE:** Make sure you have `backports` gem installed globally or added to your bundle (if you're using `bundle exec ruby-next ...`).\n\n**NOTE:** For Ruby 2.2, safe navigation operator (`\u0026.`) and squiggly heredocs (`\u003c\u003c~TXT`) support is provided.\n\n**IMPORTANT:** Unparser `~\u003e 0.4.8` is required to run the transpiler on Ruby \u003c2.4.\n\n## Proposed and edge features\n\nRuby Next aims to bring edge and proposed features to Ruby community before they (hopefully) reach an official Ruby release.\nThis includes:\n\n- Features already merged to [master](https://github.com/ruby/ruby) (_edge_)\n- Features proposed in [Ruby bug tracker](https://bugs.ruby-lang.org/) (_proposed_)\n- Features once merged to master but got reverted.\n\nThese features are disabled by default, you must opt-in in one of the following ways:\n\n- Add `--edge` or `--proposed` option to `nextify` command when using CLI.\n- Enable programmatically when using a runtime mode:\n\n```ruby\n# It's important to load language module first\nrequire \"ruby-next/language\"\n\nrequire \"ruby-next/language/rewriters/edge\"\n# or\nrequire \"ruby-next/language/rewriters/proposed\"\n\n# and then activate the runtime mode\nrequire \"ruby-next/language/runtime\"\n# or require \"ruby-next/language/bootsnap\"\n```\n\n- Set `RUBY_NEXT_EDGE=1` or `RUBY_NEXT_PROPOSED=1` environment variable.\n\n### Supported edge features\n\nNone yet.\n\n### Supported proposed features\n\n- _Method reference_ operator (`.:`) ([#13581](https://bugs.ruby-lang.org/issues/13581)).\n- Binding non-local variables in pattern matching (`42 =\u003e @v`) ([#18408](https://bugs.ruby-lang.org/issues/18408)).\n\n## Custom syntax rewriters\n\nWonder what would happen if Ruby get a null coalescing operator (`??=`) or some other syntactic feature you want to try out? Ruby Next is here to help you!\n\nRuby Next allows you to write your own syntax rewriters. Full-featured rewriters (used by Ruby Next itself) operate on AST and usually require parser modifications. However, we also support text-based rewriters which can be used to experiment with new syntax much quicker without dealing with grammars, parsers and syntax trees.\n\n\u003e [!TIP]\n\u003e You can experiment with Ruby Next rewriters at our [online playground][playground]!\n\nTo implement a text-based rewriter, you need to create a new class inherited from `RubyNext::Language::Rewriters::Text` and implementing either `#rewrite` or `#safe_rewrite` method. For example, the method reference operator (`.:`) could be implemented as follows:\n\n```ruby\nclass MethodReferenceRewriter \u003c RubyNext::Language::Rewriters::Text\n  # Rewriter configuration includes its name, a syntax probe and a minimum supported Ruby version.\n  # The latter two are used to determine whether the rewriter should be activated for the current file in runtime or when running `ruby-next nextify`.\n  NAME = \"method-reference\"\n  SYNTAX_PROBE = \"Language.:transform\"\n  MIN_SUPPORTED_VERSION = Gem::Version.new(RubyNext::NEXT_VERSION)\n\n  def safe_rewrite(source)\n    source.gsub(/\\.:([\\w_]+)/, '.method(:\\1)')\n  end\nend\n\n# Add the rewriter to the list of rewriters\nRubyNext::Language.rewriters \u003c\u003c MethodReferenceRewriter\n```\n\nThe `#safe_rewrite` method operates on the normalized source code (i.e., without comments and string literals). It's useful when you want to avoid transpiling inside strings or comments. If you want to transpile the original contents, you can use the `#rewrite` method instead. For example, if you want to rewrite comments:\n\n```ruby\n\nclass NoteDateRewriter \u003c RubyNext::Language::Rewriters::Text\n  NAME = \"note-comment-date\"\n  MIN_SUPPORTED_VERSION = Gem::Version.new(RubyNext::NEXT_VERSION)\n\n  def rewrite(source)\n    source.gsub(\"# NOTE:\") do |_match|\n      context.track!(self)\n      \"# NOTE (#{Date.today}):\"\n    end\n  end\nend\n\nRubyNext::Language.rewriters \u003c\u003c NoteDateRewriter\n```\n\nNote that we use the `context` object in the example above. It is responsible for tracking if the rewriter was used for the current file. You must call the `context.track!` method to mark the file as _dirty_ (i.e., it should be transpiled). The input parameter (`source`) is the Ruby source code of the file being transpiled and the output must be the transpiled source code. When using `#safe_rewrite`, marking content as dirty explicitly is not necessary.\n\n### Using parser combinators (Paco)\n\nUnder the hood, `#safe_rewrite` uses [Paco][] to parse the source and separate string literals from the rest of the code. You can also leverage [Paco][] in your text rewriters, if you want more control on the parsing process. For better experience, we provide a DSL to define a custom parser and the `#parse` method to use it. Here is an example of implementing the `.:` operator using a Paco parser:\n\n```ruby\nclass MethodReferenceRewriter \u003c RubyNext::Language::Rewriters::Text\n  NAME = \"method-reference\"\n  SYNTAX_PROBE = \"Language.:transform\"\n\n  parser do\n    def default\n      many(\n        alt(\n          method_ref,\n          any_char\n        )\n      )\n    end\n\n    def method_ref\n      seq(\n        string(\".:\").result(\"\"),\n        method_name\n      # IMPORTANT: Use `#track!` method to mark the file as dirty\n      ).fmap { track! }.fmap { \".method(:#{_1})\" }\n    end\n\n    def method_name = regexp(/[\\w_]+/)\n  end\n\n  def safe_rewrite(source)\n    parse(source).join\n  end\nend\n\n# Add the rewriter to the list of rewriters\nRubyNext::Language.rewriters \u003c\u003c MethodReferenceRewriter\n```\n\nWhen using the `ruby-next nextify` command, you can load custom rewriters via the `--import-rewriter` option.\n\n## Known limitations\n\nRuby Next aims to be _reasonably compatible_ with MRI. That means, some edge cases could be uncovered. Below is the list of known limitations.\n\nFor gem authors, we recommend testing against all supported versions on CI to make sure you're not hit by edge cases.\n\n### Enumerable methods\n\nUsing refinements (`using RubyNext`) for modules could lead to unexpected behaviour in case there is also a `prepend` for the same module in Ruby \u003c2.7.\nTo eliminate this, we also refine Array (when appropriate), but other enumerables could be affected.\n\nSee [this issue](https://bugs.ruby-lang.org/issues/13446) for details.\n\n### `Refinement#import_methods`\n\n- Doesn't support importing methods generated with `eval`.\n- Doesn't support aliases (both `alias` and `alias_method`).\n- In JRuby, importing attribute accessors/readers/writers is not supported.\n- When using AST transpiling in runtime, likely fails to import methods from a transpiled files (due to the updated source location).\n\nSee the [original PR](https://github.com/ruby-next/ruby-next/pull/85) for more details.\n\n### Other\n\nSee [Parser's known issues](https://github.com/whitequark/parser#known-issues).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at [https://github.com/ruby-next/ruby-next](ttps://github.com/ruby-next/ruby-next).\n\nSee also the [development guide](./DEVELOPMENT.md).\n\n## Acknowledgments\n\n- Thanks to [Jim Gay](https://github.com/saturnflyer) for the original Data polyfill implementation ([polyfill-data](https://github.com/saturnflyer/polyfill-data))\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n[features]: ./SUPPORTED_FEATURES.md\n[features_core]: ./SUPPORTED_FEATURES.md#Core\n[features_syntax]: ./SUPPORTED_FEATURES.md#Syntax\n[mruby]: https://mruby.org\n[JRuby]: https://www.jruby.org\n[TruffleRuby]: https://github.com/oracle/truffleruby\n[Opal]: https://opalrb.com\n[RubyMotion]: http://www.rubymotion.com\n[Artichoke]: https://github.com/artichoke/artichoke\n[Prism]: https://github.com/prism-rb/prism\n[parser]: https://github.com/whitequark/parser\n[unparser]: https://github.com/mbj/unparser\n[next_parser]: https://github.com/ruby-next/parser\n[rubocop]: https://github.com/rubocop-hq/rubocop\n[backports]: https://github.com/marcandre/backports\n[require-hooks]: https://github.com/ruby-next/require-hooks\n[Natalie]: https://natalie-lang.org\n[Paco]: https://github.com/ruby-next/paco\n[playground]: https://ruby-next.github.io\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby-next%2Fruby-next","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby-next%2Fruby-next","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby-next%2Fruby-next/lists"}