README.md in ruby-next-1.0.3 vs README.md in ruby-next-1.1.0

- old
+ new

@@ -362,10 +362,24 @@ If the command fails we warn the end user. This 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)`. +### Dependency-less setup + +If 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: + +```ruby +# lib/my_gem.rb +$LOAD_PATH.unshift "#{__dir__}/.rbnext" + +# Then go `require` statements +# ... +``` + +That'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). + ## Runtime usage It is also possible to transpile Ruby source code in run-time via Ruby Next. All 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"`. @@ -550,10 +564,10 @@ - Set `RUBY_NEXT_EDGE=1` or `RUBY_NEXT_PROPOSED=1` environment variable. ### Supported edge features -- Implicit `it` block parameter ([#19890](https://bugs.ruby-lang.org/issues/18980)). +None yet. ### Supported proposed features - _Method reference_ operator (`.:`) ([#13581](https://bugs.ruby-lang.org/issues/13581)). - Binding non-local variables in pattern matching (`42 => @v`) ([#18408](https://bugs.ruby-lang.org/issues/18408)).