Backticks method invokes `/bin/sh` when the command contains
quotes, and `sh` clears some environment variables set in
runruby.rb to search the built shared library.
The code attempts to read `C_ARG_REGS[leaf_builtin->argc + 1]`, and the
size of `C_ARG_REGS` is `NUM_C_ARG_REGS`. So, the guard condition must
be `leaf_builtin->argc + 1 + 1 <= NUM_C_ARG_REGS`.
This change fixes the off-by-one error. This issue was found by Coverity
Scan.
Using a fake (malloc) RArray is not friendly for the garbage
collector. Fake RArray does not have a heap page, so it causes Variable
Width Allocation to crash when we try to implement it on Arrays.
This commit changes feature_index from a RArray to a darray.
On the parallel test, workers can be killed because of timeout
and the information for the retrying can be inconsistent.
This patch will skip if the inconsistency is found and report
as an error.
http://ci.rvm.jp/results/trunk-asserts@phosphorus-docker/3834082
(1) gc_verify_internal_consistency() use barrier locking
for consistency while `during_gc == true` at the end
of the sweep on `RGENGC_CHECK_MODE >= 2`.
(2) `rb_objspace_reachable_objects_from()` is called without
VM synchronization and it checks `during_gc != true`.
So (1) and (2) causes BUG because of `during_gc == true`.
To prevent this error, wait for VM barrier on `during_gc == false`
and introduce VM locking on `rb_objspace_reachable_objects_from()`.
http://ci.rvm.jp/results/trunk-asserts@phosphorus-docker/3830088
The current example raises the following error.
```ruby
0..chr # => undefined local variable or method `chr' for main:Object (NameError)
```
This PR updates the example to produce the expected behavior.
```ruby
0.chr # => "\x00"
```
This patch makes sure we only load relative code. Hence when coding or
testing rdoc, we'll be sure to always be using the correct code.
Discussion started at https://github.com/ruby/rdoc/pull/817.
Signed-off-by: Ulysse Buonomo <buonomo.ulysse@gmail.com>
https://github.com/ruby/rdoc/commit/aa41bd48eb
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
This improves the performance in some cases.
`rdoc .../gems/sinatra-2.1.0/README.md` takes 10.5 sec. before this
change, and 7.1 sec. after this change.
`make rdoc` of ruby/ruby takes 19.3 sec. before this change, 18.1 sec.
after this change.
https://github.com/ruby/rdoc/commit/7cf8281e3e
Before it would be left as an IPv6 mask causing `to_range` to fail.
```
>> IPAddr.new("::2").native.to_range
/opt/rubies/3.0.3/lib/ruby/3.0.0/ipaddr.rb:479:in `set': invalid address (IPAddr::InvalidAddressError)
```
https://github.com/ruby/ipaddr/commit/af485192f3
Previously, include? would return true for the end of the range,
when it should return false because the range is exclusive.
Research and Analysis by Victor Shepelev.
Fixes [Bug #18577]