README.md in ruby-next-0.5.1 vs README.md in ruby-next-0.5.2
- old
+ new
@@ -33,10 +33,11 @@
- [CLI](#cli)
- [Using in gems](#integrating-into-a-gem-development)
- [Runtime usage](#runtime-usage)
- [Bootsnap integration](#using-with-bootsnap)
- [`ruby -ruby-next`](#uby-next)
+ - [Logging & Debugging](#logging-and-debugging)
- [RuboCop](#rubocop)
- [Proposed & edge features](#proposed-and-edge-features)
## Overview
@@ -304,9 +305,19 @@
RUBYOPT="-ruby-next" ruby my_ruby_script.rb
# or
ruby -ruby-next -e "puts [2, 4, 5].tally"
```
+
+## Logging and debugging
+
+Ruby Next prints some debugging information when fails to load a file in the runtime mode (and fallbacks to the built-in loading mechanism).
+
+You can disable these warnings either by providing the `RUBY_NEXT_WARN=false` env variable or by setting `RubyNext.silence_warnings = true` in your code.
+
+You 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.
+
+You can use a file pattern as the value for the env var to limit the output: for example, `RUBY_NEXT_DEBUG=my_script.rb`.
## RuboCop
Since Ruby Next provides support for features not available in RuboCop yet, you need to add a patch for compatibility.
In you `.rubocop.yml` add the following: