Граф коммитов

71204 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 992bdfea2d
Refine the load error message
Show the linked ruby library name when failed to load extension
built against different ruby library.
2022-02-17 20:29:50 +09:00
Nobuyoshi Nakada 5952a1f201
Check running macOS version at runtime 2022-02-17 20:29:50 +09:00
Nobuyoshi Nakada c8b414b334
Reuse `-v` option result as `target_platform`
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.
2022-02-17 20:12:38 +09:00
Kazuhiro NISHIYAMA dfe7faa6b6
exclude name must be Regexp or Symbol
fdf0f8d814/tool/lib/test/unit.rb (L1273-L1290)
2022-02-17 19:04:16 +09:00
Koichi Sasada fdf0f8d814 btest-ruby OPTS=-v should disable quiet
`make btest-ruby` is run with -q (quiet) option and -v should
remove -q option.
2022-02-17 18:58:37 +09:00
Hiroshi SHIBATA 9f81d9f92d Hide patchlevel from release build 2022-02-17 14:36:30 +09:00
Yusuke Endoh 5f01fba001 yjit_codegen.c: Prevent a possible out-of-bound access
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.
2022-02-17 01:43:59 +09:00
git fabf60c93b * 2022-02-17 [ci skip] 2022-02-17 00:34:19 +09:00
Alan Wu 797e8f542e
Fix -Wsign-compare when -DRUBY_DEBUG=1
Sizes for darray are size_t now. CC @peterzhu2118
2022-02-16 10:34:06 -05:00
Peter Zhu 969ad5802d Change feature_index from fake Array to darray
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.
2022-02-16 09:50:29 -05:00
Peter Zhu 71afa8164d Change darray size to size_t and add functions that use GC malloc
Changes size and capacity of darray to size_t to support more
elements.

Adds functions to darray that use GC allocation functions.
2022-02-16 09:50:29 -05:00
Nobuyoshi Nakada f9abb286fb Parenthesize a macro expression
The modulo in `rb_yjit_code_page_alloc` seems interpreted wrongly.
2022-02-16 09:43:54 -05:00
Koichi Sasada 00c7a0d491 fix parallel test timeout retrying
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
2022-02-16 17:57:04 +09:00
Yusuke Endoh b9851c7e1b lib/securerandom.rb: Fix the check of availability of Random.urandom
Random.urandom raises a RuntimeError if it is unavailable.
[Bug #13885]
2022-02-16 16:32:28 +09:00
git e7d76fe2b0 * 2022-02-16 [ci skip] 2022-02-16 13:32:13 +09:00
Koichi Sasada 1ae630db26 `wmap#each` should check liveness of keys
`ObjectSpace::WeakMap#each*` should check key's liveness.
fix [Bug #18586]
2022-02-16 13:31:46 +09:00
Peter Zhu 26187a8520 Use RARRAY_SHARED_ROOT_FLAG for checking re-enter
RARRAY_SHARED_ROOT_FLAG is defined as FL_USER5, but we should use
RARRAY_SHARED_ROOT_FLAG instead of depending on that they're equal.
2022-02-14 09:35:54 -05:00
Koichi Sasada 76e594d515 fix GC event synchronization
(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
2022-02-14 17:17:55 +09:00
git 838031170c * 2022-02-14 [ci skip] 2022-02-14 14:52:39 +09:00
Koichi Sasada 8e0899919b extend timeout for mjit
1 seconeds is not enough on an specific (busy) machine w/ mjit.
http://ci.rvm.jp/results/trunk-mjit@phosphorus-docker/3830178
2022-02-14 14:52:12 +09:00
Nobuyoshi Nakada 7a8ea2e497
[MSWin] Install OpenSSL with vcpkg 2022-02-13 18:25:59 +09:00
Nobuyoshi Nakada b4fd0e0c73
Exclude TestThread#test_signal_at_join on FreeBSD 13 for now [ci skip] 2022-02-13 17:39:57 +09:00
git a9aa42ac64 * 2022-02-13 [ci skip] 2022-02-13 15:48:18 +09:00
Koichi ITO 045ab1d056 [DOC] Fix a typo in `Integer#chr` example
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"
```
2022-02-13 15:48:01 +09:00
Nobuyoshi Nakada 11862c1a7c
[MSWin] Remove stale configuration check [ci skip]
PSAPI library has not been used since d66c5768ca.
2022-02-12 23:17:23 +09:00
Nobuyoshi Nakada 844a8355a1 [ruby/rdoc] Load YAML library for each test
https://github.com/ruby/rdoc/commit/a93e1bcd68
2022-02-12 17:13:06 +09:00
Nobuyoshi Nakada 3b3fb73d61 [ruby/rdoc] Dump plain objects as `RDoc::Options`
So that the generated `.rdoc_options` file is loadable.

https://github.com/ruby/rdoc/commit/6cf6e1647b
2022-02-12 16:15:08 +09:00
Nobuyoshi Nakada 11f3882173 [ruby/rdoc] Fix a test method name
https://github.com/ruby/rdoc/commit/8166b84cf3
2022-02-12 16:02:17 +09:00
Nobuyoshi Nakada e95ad70079
[ruby/rdoc] Update generated files 2022-02-12 15:22:47 +09:00
Ulysse Buonomo 5348a34504 [ruby/rdoc] Relative loading for easier development (https://github.com/ruby/rdoc/pull/821)
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>
2022-02-12 15:06:06 +09:00
Yusuke Endoh 08137c5dd9 [ruby/rdoc] Optimize RawLine by using a regexp instead of negative look-ahead rule
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
2022-02-12 14:59:26 +09:00
Nobuyoshi Nakada 6e65e04186
[DOC] Remove unnecessary `rdoc-ref:` schemes 2022-02-12 12:38:37 +09:00
Nobuyoshi Nakada 50c972a1ae
[DOC] Simplify operator method references 2022-02-12 12:38:36 +09:00
S-H-GAMELINKS e6b537e605 Reuse operation rule for operation2 2022-02-12 12:28:07 +09:00
S-H-GAMELINKS c0651b4ae1 Reuse p_kwnorest rule for f_no_kwarg 2022-02-12 12:27:49 +09:00
Steven Nunez 68be9a9ae8 Fix Typo 2022-02-12 10:43:27 +09:00
git ee3b7a1a8c * 2022-02-12 [ci skip] 2022-02-12 00:36:39 +09:00
Yusuke Endoh 118769d028 test/ruby/test_exception.rb: prevent "assigned but unused variable" 2022-02-12 00:36:01 +09:00
Ilia Zenkevich e92e87bf90 [rubygems/rubygems] Add clarification for bundle-config "with" option
https://github.com/rubygems/rubygems/commit/666f3cc724
2022-02-11 18:49:57 +09:00
David Rodríguez 7b676b3ce3 [rubygems/rubygems] Fix corrupted lockfile when using `gemspec` and multiple sources
https://github.com/rubygems/rubygems/commit/9712262d90
2022-02-11 18:20:20 +09:00
git 22bf6e4393 * 2022-02-11 [ci skip] 2022-02-11 11:28:25 +09:00
Nobuyoshi Nakada 36df0c72dc
[DOC] Add `.rdoc_options` file
Set `--page-dir` option so that direct rdoc call is consistent
with `make html`.
2022-02-11 11:25:05 +09:00
Peter Zhu 2617532499 Free cached mark stack chunks when freeing objspace
Cached mark stack chunks should also be freed when freeing objspace.
2022-02-10 09:33:42 -05:00
git 66b9ca8426 Update default gems list at f07a2613e3 [ci skip] 2022-02-10 08:19:42 +00:00
Hiroshi SHIBATA f07a2613e3
Support directory layout of ruby/ruby repository 2022-02-10 17:18:05 +09:00
Hiroshi SHIBATA 52d3e31d27
[ruby/ipaddr] Bump version to 1.2.4
https://github.com/ruby/ipaddr/commit/6edf6ee6c3
2022-02-10 17:18:05 +09:00
Espartaco Palma 9b768012f6
[ruby/ipaddr] Fix exception calling `to_range' after `freeze'
https://github.com/ruby/ipaddr/commit/77fe1fca0a
2022-02-10 17:18:05 +09:00
Jean Boussier 100253c7f0
[ruby/ipaddr] Ipaddr#native must also coerce `@mask_addr`
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
2022-02-10 17:18:05 +09:00
Jean Boussier 5221cb4468
[ruby/ipaddr] Expose IPAddr::VERSION
An almost universal convention for gems is to expose Namespace::VERSION
which makes it much easier when debugging etc.

https://github.com/ruby/ipaddr/commit/587ae6996e
2022-02-10 17:18:03 +09:00
Jeremy Evans fd710d7e99 Fix Range#include? for beginless exclusive string ranges
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]
2022-02-09 19:47:28 -08:00