Age | Commit message (Collapse) | Author |
|
|
|
Before this commit no methods defined in Ruby were being loaded. For
example `class` or `tap` methods would not exist.
[ruby-core:115793] [Bug #20073]
|
|
[Bug #20071]
Currently Ruby crashes when the --parser=prism flag is used either with
no input, or with input that is being redirected from stdin. So all of
the following will crash
ruby --parser=prism
ruby --parser=prism < test_code.rb
cat test_code.rb | ruby --parser=prism
This commit checks whether the input is assumed to be from stdin, and
then processes that as a file.
This will fix the second and third case above, but will cause a slight
behavioural changes for the first case - Ruby will treat stdin as an
empty file in this case and exit, rather than waiting for data to be
piped into stdin.
|
|
|
|
Co-authored-by: Ufuk Kayserilioglu <[email protected]>
|
|
Introduce runtime flag for specifying the parser,
```
ruby --parser=prism
```
also update the description:
```
$ ruby --parser=prism --version
ruby 3.3.0dev (2023-12-08T04:47:14Z add-parser-runtime.. 0616384c9f) +PRISM [x86_64-darwin23]
```
[Bug #20044]
|
|
|
|
when the RUBY_FREE_ON_SHUTDOWN environment variable is set, manually free memory at shutdown.
Co-authored-by: Nobuyoshi Nakada <[email protected]>
Co-authored-by: Peter Zhu <[email protected]>
|
|
This reverts commit 9b76c7fc89460ed8e9be40e4037c1d68395c0f6d.
|
|
|
|
Enable Prism using either --prism
ruby --prism test.rb
or via env var
RUBY_PRISM=1 ruby test.rb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If `RUBY_MN_THREADS=1` is given, this patch shows `+MN` in
`RUBY_DESCRIPTION` like:
```
$ RUBY_MN_THREADS=1 ./miniruby --yjit -v
ruby 3.3.0dev (2023-10-17T04:10:14Z master 908f8fffa2) +YJIT +MN [x86_64-linux]
```
Before this patch, a warning is displayed if `$VERBOSE` is given.
However it can make troubles with tests (with `$VERBOSE`), do not
show any warning with a MN threads configuration.
|
|
|
|
This patch introduce M:N thread scheduler for Ractor system.
In general, M:N thread scheduler employs N native threads (OS threads)
to manage M user-level threads (Ruby threads in this case).
On the Ruby interpreter, 1 native thread is provided for 1 Ractor
and all Ruby threads are managed by the native thread.
From Ruby 1.9, the interpreter uses 1:1 thread scheduler which means
1 Ruby thread has 1 native thread. M:N scheduler change this strategy.
Because of compatibility issue (and stableness issue of the implementation)
main Ractor doesn't use M:N scheduler on default. On the other words,
threads on the main Ractor will be managed with 1:1 thread scheduler.
There are additional settings by environment variables:
`RUBY_MN_THREADS=1` enables M:N thread scheduler on the main ractor.
Note that non-main ractors use the M:N scheduler without this
configuration. With this configuration, single ractor applications
run threads on M:1 thread scheduler (green threads, user-level threads).
`RUBY_MAX_CPU=n` specifies maximum number of native threads for
M:N scheduler (default: 8).
This patch will be reverted soon if non-easy issues are found.
[Bug #19842]
|
|
|
|
|
|
|
|
|
|
|
|
* YJIT: Add counter to measure how often we compile "cold" ISEQs (#535)
Fix counter name in DEFAULT_COUNTERS
YJIT: add --yjit-cold-threshold, don't compile cold ISEQs
YJIT: increase default cold threshold to 200_000
Remove rb_yjit_call_threshold()
Remove conflict markers
Fix compilation errors
Threshold 1 should compile immediately
Debug deadlock issue with test_ractor
Fix call threshold issue with tests
* Revert exception threshold logic. Document option in yjid.md
* (void) for 0 parameter functions in C99
* Rename iseq_entry_cold => cold_iseq_entry
* Document --yjit-cold-threshold in ruby.c
* Update doc/yjit/yjit.md
Co-authored-by: Jean byroot Boussier <[email protected]>
* Shorten help string to appease test
* Address bug found by Kokubun. Reorder logic.
---------
Co-authored-by: Alan Wu <[email protected]>
Co-authored-by: Jean byroot Boussier <[email protected]>
|
|
|
|
|
|
It has precedence over the environment variable `RUBY_BUGREPORT_PATH`.
|
|
|
|
|
|
This commit changes RUBY_GC_HEAP_INIT_SIZE_{40,80,160,320,640}_SLOTS to
RUBY_GC_HEAP_{0,1,2,3,4}_INIT_SLOTS. This is easier to use because the
user does not need to determine the slot sizes (which can vary between
32 and 64 bit systems). They now just use the heap names
(`GC.stat_heap.keys`).
Notes:
Merged: https://github.com/ruby/ruby/pull/8335
|
|
This environment variable is replaced by
`RUBY_GC_HEAP_INIT_SIZE_%d_SLOTS`, so it doesn't make sense to keep it.
Notes:
Merged: https://github.com/ruby/ruby/pull/8147
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/8289
|
|
Fixes [Bug #11269]
Notes:
Merged: https://github.com/ruby/ruby/pull/8265
|
|
In general, if the same option specifying a single value is given
multiple times at the same level, the last one overrides the earlier
ones, unless prohibited.
Notes:
Merged: https://github.com/ruby/ruby/pull/8212
|
|
Also an option command line should have precedence over `RUBYOPT`.
Notes:
Merged: https://github.com/ruby/ruby/pull/8200
|
|
* Follow-up of dbbc3583ba432c279f07b1fa0afb0a8a9ba50c91 which broke this.
|
|
-1 is a legitimate backtrace limit — in fact, it’s the default — so it
should be possible to provide it with the `--backtrace-limit` option.
|
|
There’s no reason to prevent RUBYOPT from controlling the backtrace
limit. In fact, Matz said [0] he was expecting this to be possible.
[0] https://bugs.ruby-lang.org/issues/8661#note-27
|
|
Command line options should have higher precedence than the same
options in shebang and `RUBYOPT`.
Notes:
Merged: https://github.com/ruby/ruby/pull/8068
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/8068
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/8068
|
|
Notes:
Merged-By: k0kubun <[email protected]>
|
|
Introduce Universal Parser mode for the parser.
This commit includes these changes:
* Introduce `UNIVERSAL_PARSER` macro. All of CRuby related functions
are passed via `struct rb_parser_config_struct` when this macro is enabled.
* Add CI task with 'cppflags=-DUNIVERSAL_PARSER' for ubuntu.
Notes:
Merged: https://github.com/ruby/ruby/pull/7927
|
|
|
|
`-W`, `-e`, `-K`, `-0`, `-E` and `--encoding` options.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7906
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7906
|