| Age | Commit message (Collapse) | Author |
|
Fix test when Ruby is verbose
The test added in 90a80eb0 fails if Ruby is verbose, it outputs the
following line to stderr:
RUBY_GC_HEAP_INIT_SLOTS=100 (default value: 10000)
---
test/ruby/test_gc.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
[ruby/stringio] [Bug #19389] Fix chomping with longer separator
https://github.com/ruby/stringio/commit/eb322a9716
---
ext/stringio/stringio.c | 5 +++--
test/stringio/test_stringio.rb | 2 ++
2 files changed, 5 insertions(+), 2 deletions(-)
|
|
Fix off-by-one error in rb_vm_each_stack_value
Applying the following patch to test/erb/test_erb.rb and running that
file will cause Ruby to crash on my machine (macOS 13.1 on M1 Pro):
```
--- a/test/erb/test_erb.rb
+++ b/test/erb/test_erb.rb
@@ -7,6 +7,12 @@
class TestERB < Test::Unit::TestCase
class MyError < RuntimeError ; end
+ def setup
+ GC.auto_compact = true
+ GC.stress = true
+ GC.verify_compaction_references(expand_heap: true, toward: :empty)
+ end
+
```
It crashes with the following log:
```
/Users/peter/src/ruby/lib/erb/compiler.rb:276: [BUG] Segmentation fault at 0x00000001083a8690
...
-- C level backtrace information -------------------------------------------
...
/Users/peter/src/ruby/build/ruby(rb_vm_each_stack_value+0xa8) [0x104cc3a44] ../vm.c:2737
/Users/peter/src/ruby/build/ruby(rb_vm_each_stack_value+0xa8) [0x104cc3a44] ../vm.c:2737
/Users/peter/src/ruby/build/ruby(check_stack_for_moved+0x2c) [0x104b272a4] ../gc.c:5512
/Users/peter/src/ruby/build/ruby(gc_compact_finish) ../gc.c:5534
/Users/peter/src/ruby/build/ruby(gc_sweep_compact) ../gc.c:8653
/Users/peter/src/ruby/build/ruby(gc_sweep) ../gc.c:6196
/Users/peter/src/ruby/build/ruby(has_sweeping_pages+0x0) [0x104b19c54] ../gc.c:9568
/Users/peter/src/ruby/build/ruby(gc_rest) ../gc.c:9570
```
This crash happens because it's reading the VALUE at sp. But since
sp points to the top of the stack, it's reading the VALUE above the
top of the stack, which is causing this segfault.
Fixes [Bug #19320]
---
vm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Fix integer underflow when using HEAP_INIT_SLOTS
There is an integer underflow when the environment variable
RUBY_GC_HEAP_INIT_SLOTS is less than the number of slots currently
in the Ruby heap.
[Bug #19284]
---
gc.c | 25 +++++++++++++------------
test/ruby/test_gc.rb | 5 +++++
2 files changed, 18 insertions(+), 12 deletions(-)
|
|
YJIT: Save PC and SP before calling leaf builtins (#7090)
Previously, we did not update `cfp->sp` before calling the C function of
ISEQs marked with `Primitive.attr! "inline"` (leaf builtins). This
caused the GC to miss temporary values on the stack in case the function
allocates and triggers a GC run. Right now, there is only a few leaf
builtins in numeric.rb on Integer methods such as `Integer#~`. Since
these methods only allocate when operating on big numbers, we missed
this issue.
Fix by saving PC and SP before calling the functions -- our usual
protocol for calling C functions that may allocate on the GC heap.
[Bug #19316]
---
test/ruby/test_yjit.rb | 16 ++++++++++++++++
yjit/src/codegen.rs | 4 ++++
2 files changed, 20 insertions(+)
|
|
[Bug #19319] Fix crash in rb_str_casemap
The following code crashes on my machine:
```
GC.stress = true
str = "testing testing testing"
puts str.capitalize
```
We need to ensure that the object `buffer_anchor` remains on the stack
so it does not get GC'd.
---
string.c | 2 ++
1 file changed, 2 insertions(+)
|
|
Fix crash in TracePoint c_call for removed method
trace_arg->id is the ID of the original method of an aliased method. If
the original method is removed, then the lookup will fail. We should use
trace_arg->called_id instead, which is the ID of the aliased method.
Fixes [Bug #19305]
---
test/ruby/test_settracefunc.rb | 23 +++++++++++++++++++++++
vm_trace.c | 2 +-
2 files changed, 24 insertions(+), 1 deletion(-)
|
|
[Bug #19292] Re-initialize tm when wday or yday is not set
---
test/ruby/test_time.rb | 3 ++-
time.c | 31 ++++++++++++++++++++++---------
2 files changed, 24 insertions(+), 10 deletions(-)
|
|
[Bug #19189] Fallback to the default "pkg-config"
---
lib/mkmf.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Revert flawed doc for slice_after, slice_when, and chunk_while
(#5952)
Restores doc for the methods that were cited in https://bugs.ruby-lang.org/issues/18765.
---
enum.c | 162 +++++++++++++++++++++++++++++++++++++++++++----------------------
1 file changed, 107 insertions(+), 55 deletions(-)
|
|
Private local variables should shadow outer variables [Bug #18629]
---
parse.y | 3 ++-
test/ruby/test_parse.rb | 4 ++++
2 files changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
|
|
656f25987cf2885104d5b13c8d3f5b7d32f1b333,98074a57ca9f3169fe9da9af6c49b636d37db16f,745dcf5326ea2c8e2047a3bddeb0fbb7e7d07649,b335d899fff3cc22b022c9ee2ceb636d714bf1a7: [Backport #19153]
[ruby/cgi] Fix test_cgi_cookie_new_with_domain to pass on older
rubies
https://github.com/ruby/cgi/commit/05f0c58048
---
test/cgi/test_cgi_cookie.rb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
[ruby/cgi] Prepare to release 0.3.6
https://github.com/ruby/cgi/commit/710a647855
---
lib/cgi.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[ruby/cgi] Loosen the domain regex to accept '.'
(https://github.com/ruby/cgi/pull/29)
* Loosen the domain regex to accept '.'
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
https://github.com/ruby/cgi/commit/5e09d632f3
Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
---
lib/cgi/cookie.rb | 2 +-
test/cgi/test_cgi_cookie.rb | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
[ruby/cgi] Bump up 0.3.6
https://github.com/ruby/cgi/commit/827b7d43cc
---
lib/cgi.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
hoe-4.0.0 causes test failure in minitest.
https://github.com/ruby/actions/actions/runs/3715629538
|
|
[Bug #19187] Fix for tzdata-2022g
---
test/ruby/test_time_tz.rb | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
|
|
|
|
Add a comment about confusing code [ci skip]
---
configure.ac | 1 +
1 file changed, 1 insertion(+)
|
|
|
|
|
|
|
|
|
|
|
|
Use valid tokens as cookie names
---
spec/ruby/library/cgi/cookie/name_spec.rb | 12 ++++++------
spec/ruby/library/cgi/cookie/parse_spec.rb | 10 +++++-----
2 files changed, 11 insertions(+), 11 deletions(-)
|
|
rb_provide_feature: Prevent $LOADED_FEATURES from being copied
[Bug #18599]
`vm->loaded_features` and `vm->loaded_features_snapshot` both share the
same root. When a feature is pushed into `loaded_features`, the sharing
is broken and `loaded_features` is copied.
So an application requiring 1000 files, will allocate 1000 arrays of
increasing size, which is very wasteful.
To avoid this, we first clear the snapshot, so that `loaded_features`
can directly be pushed into.
Co-Authored-By: Peter Zhu <peter.zhu@shopify.com>
---
load.c | 4 ++++
1 file changed, 4 insertions(+)
|
|
[Bug #19081] Show the caller location in warning for Ractor
The internal location in ractor.rb is not usefull at all.
```
$ ruby -e 'Ractor.new {}'
<internal:ractor>:267: warning: Ractor is experimental, ...
```
---
bootstraptest/test_ractor.rb | 6 ++++++
ractor.c | 6 ------
ractor.rb | 4 ++++
3 files changed, 10 insertions(+), 6 deletions(-)
|
|
[Bug #19106] Normalize time at 24:00:00 with a timezone object
---
test/ruby/test_time_tz.rb | 5 +++++
time.c | 24 ++++++++++++++++--------
2 files changed, 21 insertions(+), 8 deletions(-)
|
|
mutex: Raise a ThreadError when detecting a fiber deadlock (#6680)
[Bug #19105]
If no fiber scheduler is registered and the fiber that
owns the lock and the one that try to acquire it
both belong to the same thread, we're in a deadlock case.
Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
---
test/fiber/test_mutex.rb | 22 +++++++++++++++++++++-
thread_sync.c | 4 ++++
2 files changed, 25 insertions(+), 1 deletion(-)
|
|
Fix bug in array pack with shared strings
If string literals are long and they become shared, we need to make them
independent before we can write to them. [Bug #19116]
---
pack.c | 1 +
test/ruby/test_array.rb | 6 ++++++
2 files changed, 7 insertions(+)
|
|
|
|
|
|
Lower priority of `POSIX_MADV_DONTNEED`. (#6671)
---
cont.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
|
|
We don't care about actual hostname resolution. (#6652)
https://bugs.ruby-lang.org/issues/18380
---
test/fiber/test_address_resolve.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
35c794b26d406c39f90e188e3884003fe6aca532,725626d8905fe1ac4a2cf1c3e2db6412bf8f381f,b32a3f1275a8c7748f2134492ce3c532f277d261: [Backport #18964]
Fixed by [Bug #18964]
---
file.c | 3 ---
1 file changed, 3 deletions(-)
[Bug #18964] Update the code range of appended portion
---
ext/-test-/econv/append.c | 15 +++++++++++++++
ext/-test-/econv/extconf.rb | 3 +++
ext/-test-/econv/init.c | 11 +++++++++++
transcode.c | 34 ++++++++++++++++++++++++++++++----
4 files changed, 59 insertions(+), 4 deletions(-)
create mode 100644 ext/-test-/econv/append.c
create mode 100644 ext/-test-/econv/extconf.rb
create mode 100644 ext/-test-/econv/init.c
[Bug #18964] Add test for `rb_econv_append`
---
test/-ext-/econv/test_append.rb | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100644 test/-ext-/econv/test_append.rb
|
|
[Bug #19004] `Complex.polar` handles complex singular `abs` argument
`Complex.polar` accepts Complex values as arguments for the polar form as long
as the value of the complex has no imaginary part (ie it is 'real'). In
`f_complex_polar` this is handled by extracting the real part of the arguments.
However in the case `polar` is called with only a single argument, the absolute
value (abs), then the Complex is created without applying a check on the type
of abs, meaning it is possible to create a Complex where the real part is itself
an instance of a Complex. This change removes the short circuit for the single
argument case meaning the real part extraction is performed correctly
(by f_complex_polar).
Also adds an example to `spec/ruby/core/complex/polar_spec.rb` to check that
the real part of a complex argument is correctly extracted and used in the
resulting Complex real and imaginary parts.
---
complex.c | 13 ++++++-------
spec/ruby/core/complex/polar_spec.rb | 16 ++++++++++++++++
2 files changed, 22 insertions(+), 7 deletions(-)
|
|
|
|
Update bundled gems list at 2022-10-24
---
NEWS.md | 2 +-
gems/bundled_gems | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
Added assert_true and assert_false same as test-unit gem
---
tool/lib/test/unit/assertions.rb | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
|
|
[Bug #19042] Fix Dir.glob brace with '/'
Dir.glob brace pattern with '/' after '**' does not match
paths in recursive expansion process.
We expand braces with '/' before expanding a recursive.
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
---
dir.c | 2 +-
test/ruby/test_dir.rb | 14 ++++++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
|
|
rb_int_range_last: properly handle non-exclusive range
[Bug #18994]
---
range.c | 8 ++++----
spec/ruby/core/range/last_spec.rb | 6 ++++++
2 files changed, 10 insertions(+), 4 deletions(-)
|
|
[DOC] Fix documentation for ARGF#readlines
[Bug #18909]
---
io.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
[ruby/net-http] Revert "Replace Timeout.timeout in Net:HTTP#connect"
This reverts commit https://github.com/ruby/net-http/commit/753cae3bbccc.
https://github.com/ruby/net-http/commit/98caa38204
---
lib/net/http.rb | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
|
|
[ruby/net-http] Rename `D` to `debug` in `Net::HTTP`
Renames `D` to `debug` in `Net::HTTP` and introduces an alias for
backwards compatibility. This was done for readability reasons, in that
`D` did not clearly reflect what the method was doing and can cause some
confusion.
https://github.com/ruby/net-http/commit/582d6e87d6
---
lib/net/http.rb | 33 ++++++++++++++++++---------------
1 file changed, 18 insertions(+), 15 deletions(-)
|
|
This reverts commit 97e50a056e795f6551cae2f07a9996f4adf73a1f.
|
|
Disable msystem: MINGW64 job on GitHub Actions (#6545)
---
.github/workflows/mingw.yml | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
|
|
Skip running a DRb test on MinGW
It hangs even after a retry
https://github.com/ruby/ruby/runs/7966439530?check_suite_focus=true
We contacted GitHub Suppport about this before, and we concluded that
the problem is on our end. Unfortunately we don't have a bandwidth to
fix this MinGW problem, so until we get to work on it, this should be
just skipped to avoid a sporadic CI timeout.
---
test/drb/drbtest.rb | 1 +
test/drb/test_drbssl.rb | 4 ++++
test/rinda/test_rinda.rb | 2 +-
3 files changed, 6 insertions(+), 1 deletion(-)
|
|
Skip TupleSpaceProxyTest on MINGW64 too
It wasn't specific to UCRT64
https://github.com/ruby/ruby/runs/7062992464
---
test/rinda/test_rinda.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Fix Rinda test teardown for omitted tests
New test failures on MINGW appeared after
c2e37c8ff7da395f33fae546d9ae9e2408fc9236.
1) Error:
Rinda::TupleSpaceProxyTest#test_00_template:
NoMethodError: undefined method `stop_service' for nil:NilClass
D:/a/ruby/ruby/src/test/rinda/test_rinda.rb:516:in `teardown'
2) Error:
Rinda::TupleSpaceProxyTest#test_ruby_talk_264062:
NoMethodError: undefined method `stop_service' for nil:NilClass
D:/a/ruby/ruby/src/test/rinda/test_rinda.rb:516:in `teardown'
Teardown happens even when the test is omitted.
See: https://github.com/ruby/ruby/runs/7058984522
---
test/rinda/test_rinda.rb | 4 ++++
1 file changed, 4 insertions(+)
|
|
Try skipping TupleSpaceProxyTest on MinGW UCRT64
As you all know, MinGW UCRT64 CI has randomly got stuck despite its
"Finished tests" output.
Looking at the logs closely, it seems like all of the recent such
reproductions end with the following output:
```
Retrying hung up testcases...
[ 1/14] Rinda::TupleSpaceProxyTest#test_ruby_talk_264062 = 0.21 s
[ 2/14] Rinda::TupleSpaceProxyTest#test_00_template = 0.01 s
[ 3/14] Rinda::TupleSpaceProxyTest#test_inp_rdp = 0.00 s
[ 4/14] Rinda::TupleSpaceProxyTest#test_core_03_notify = 0.01 s
[ 5/14] Rinda::TupleSpaceProxyTest#test_00_renewer = 0.01 s
[ 6/14] Rinda::TupleSpaceProxyTest#test_cancel_02 = 0.11 s
[ 7/14] Rinda::TupleSpaceProxyTest#test_00_DRbObject = 0.00 s
[ 8/14] Rinda::TupleSpaceProxyTest#test_core_02 = 0.11 s
[ 9/14] Rinda::TupleSpaceProxyTest#test_core_01 = 0.11 s
[10/14] Rinda::TupleSpaceProxyTest#test_remote_array_and_hash = 0.01 s
[11/14] Rinda::TupleSpaceProxyTest#test_00_tuple = 0.00 s
[12/14] Rinda::TupleSpaceProxyTest#test_take_bug_8215 = 0.41 s
[13/14] Rinda::TupleSpaceProxyTest#test_cancel_01 = 0.11 s
[14/14] Rinda::TupleSpaceProxyTest#test_symbol_tuple = 0.01 s
Finished tests in 719.252845s, 29.4292 tests/s, 3838.7154 assertions/s.
21167 tests, 2761007 assertions, 0 failures, 0 errors, 708 skips
```
https://github.com/ruby/ruby/runs/7057789554
While it seems to be retried successfully, given that it hungs up once
and this appears all the time, this test class seems a bit suspicious.
To check if it's related, let me try disabling this for now.
---
test/rinda/test_rinda.rb | 3 +++
1 file changed, 3 insertions(+)
|
|
Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
---
.github/workflows/baseruby.yml | 2 +-
.github/workflows/bundled_gems.yml | 2 +-
.github/workflows/check_dependencies.yml | 2 +-
.github/workflows/check_misc.yml | 2 +-
.github/workflows/codeql-analysis.yml | 2 +-
.github/workflows/compilers.yml | 2 +-
.github/workflows/mingw.yml | 2 +-
.github/workflows/mjit.yml | 2 +-
.github/workflows/spec_guards.yml | 2 +-
.github/workflows/ubuntu.yml | 2 +-
.github/workflows/wasm.yml | 2 +-
.github/workflows/windows.yml | 2 +-
.github/workflows/yjit-ubuntu.yml | 2 +-
.github/workflows/yjit_asm_tests.yml | 2 +-
14 files changed, 14 insertions(+), 14 deletions(-)
|