Activity
From 08/17/2024 to 08/23/2024
08/23/2024
-
11:45 PM Bug #20693: Dir.tmpdir should perform a real access check before warning about writability
- I did think about this, but the way the stat methods work is that the `stat(2)` syscall once on the path and returns a `Stat` struct. Then all the predicate methods operate on that structure in Ruby without more syscalls.
There just i... -
05:59 PM Bug #20693: Dir.tmpdir should perform a real access check before warning about writability
- What about changing/fixing `stat.writable?` to behave like `File.writable?`
It seems to me a source of confusion and subtle bugs that these two methods can return different values in edge cases.
It's not just the code in `Dir.tmpdir` tha... -
06:26 AM Bug #20693: Dir.tmpdir should perform a real access check before warning about writability
- I have a PR for doing this: https://github.com/ruby/ruby/pull/11403
But actually it breaks Bundler's tests, because they stub `File.writable?` in a test. I opened a fix for Bundler which needs to land first: https://github.com/rubygem... -
11:42 PM Bug #20697 (Open): `Rational("1r")` fails while `Complex("1i")` succeeds
- @mame reported:
```ruby
Rational("1r") #=> invalid value for convert(): "1r" (ArgumentError)
```
https://github.com/ruby/ruby/pull/11447 -
11:35 PM Bug #20696 (Open): `IO.read` ignores `err:` option
- I expected the following code captures the error message, but `err:` option is ignored.
```shell-session
$ ruby -e 'p IO.read("|ruby -e raise", err: %i[child out])'
-e:1:in '<main>': unhandled exception
""
```
https://github.co... -
10:48 PM Bug #20691 (Closed): Use-after-free in WeakKeyMap#clear
- Applied in changeset commit:git|552f5cd50c8b622294e2dc87a73eb9e1102d78a0.
----------
Fix use-after-free in WeakKeyMap#clear
[Bug #20691]
If the WeakKeyMap has been marked but sweeping hasn't started yet and we
cann WeakKeyMap#clear, t... -
05:43 PM Bug #20691: Use-after-free in WeakKeyMap#clear
- I opened a backport PR to 3.3: https://github.com/ruby/ruby/pull/11443
-
10:48 PM Revision ac8d50e5 (git): [Backport 3.3] [Bug #20691] Fix use-after-free in WeakKeyMap#clear (#11443)
- Fix use-after-free in WeakKeyMap#clear
[Bug #20691]
If the WeakKeyMap has been marked but sweeping hasn't started yet and we
cann WeakKeyMap#clear, then there could be a use-after-free because we do
not call rb_gc_remove_weak to remove... -
10:03 PM Bug #20695 (Closed): Elevated GC allocations in parse.y parser
- Testing on the `lobsters` benchmark from [`yjit-bench`](https://github.com/shopify/yjit-bench), the latest `master` parser is allocating more objects compared to commit:98eeadc932 ("Development of 3.4.0 started."). The following patch sh...
-
08:37 PM Revision 552f5cd5 (git): Fix use-after-free in WeakKeyMap#clear
- [Bug #20691]
If the WeakKeyMap has been marked but sweeping hasn't started yet and we
cann WeakKeyMap#clear, then there could be a use-after-free because we do
not call rb_gc_remove_weak to remove the key from the GC.
For example, the ... -
08:21 PM Revision b9902c94 (git): Adds remarks about returned Enumerator
-
07:18 PM Revision 3eb42054 (git): [ruby/prism] Pass Unicode escapes on to onigmo
- When we encounter an invalid unicode escape within a regular
expression, we now pass that error on to Onigmo as if it didn't
exist in the parser (which matches the upstream parser's behavior).
We do this because there are tests that spe... -
02:49 PM Revision 3f6be01b (git): Make object ID faster by checking flags
- We can improve object ID performance by checking the FL_SEEN_OBJ_ID flag
instead of looking up in the table. - 11:44 AM Revision b51e1c07 (git): [DOC] Fix typos in ObjectSpace::WeakMap docs
- The value of variable key2 should be "bar". This way, when nil is assigned to val1 and garbage collection occurs, the output of m.keys will then be ["bar"].
-
08:08 AM Revision 4dae4c68 (git): [rubygems/rubygems] Don't break if extra calls to File.writable? happen
- In https://bugs.ruby-lang.org/issues/20693, I'd like to have Dir.tmpdir
call `File.writable?` instead of `Stat#writable?`. However, that causes
this test to break in bundler because it's using RSpec to stub
`File.writable?`.
We can fix ... - 07:00 AM Revision 73a946c6 (git): Update bundled gems list as of 2024-08-23
-
07:00 AM Revision 9f586040 (git): [rubygems/rubygems] Fix error message when Bundler refuses to install due to frozen being set without a lockfile
- https://github.com/rubygems/rubygems/commit/0857d62ca6
-
06:07 AM Revision 7812732e (git): [ruby/tempfile] File.new(fileno, mode: mode, path: path) is provided from Ruby 3.2
- https://github.com/ruby/tempfile/commit/67ce897727
-
03:17 AM Revision 52082d19 (git): `load_relative` is always falsy here
-
03:17 AM Revision fbadcd27 (git): Reuse `load_relative` local
-
02:44 AM Revision c48e5959 (git): [ruby/fiddle] Removed libffi patchs for old Ruby
- (https://github.com/ruby/fiddle/pull/143)
Pick
https://github.com/ruby/ruby/commit/92865d8760e22dc5035a67e636fab3fbd7a77a26
from `ruby/ruby` repo.
---------
https://github.com/ruby/fiddle/commit/aad5a3bc79
Co-authored-by: Nobuyoshi N... -
02:19 AM Feature #20673: Enable native SOCKS support by default
- Enabling SOCKS support depends `SOCKS_SERVER` too now, I think it is unusual.
So I agree to enable by default.
I created [a pull request](https://github.com/ruby/ruby/pull/11441).
But it cannot enable as before if building environ... -
12:59 AM Revision 784ccd01 (git): [DOC] Tweaks for Array#collect! (#11434)
-
12:50 AM Bug #20694: "try to mark T_NONE object" error for very large hash
- Can you share the full backtrace, not only "Control frame information" section but also "C level backtrace information" section?
-
12:22 AM Bug #20694 (Third Party's Issue): "try to mark T_NONE object" error for very large hash
- In CI, we've been occasionally seeing `[BUG] try to mark T_NONE object`. I don't have any way to reproduce it but I'm going to put some information here in case anyone has any ideas.
One thing I've noticed is that it happens for very ...
08/22/2024
-
11:47 PM Revision fdba458e (git): Uncomment test accidentally commented in 1656350
- 11:34 PM Revision 8800127d (git): Skip some tests which don't work under permissionless containers
- When running as UID 0 but without CAP_DAC_OVERRIDE (for example, in a
docker container running with --uid 0 but --cap-drop=all), these tests
won't work because of hard-coded assumptions about what uid 0 can and
can't do. -
11:32 PM Bug #20693 (Closed): Dir.tmpdir should perform a real access check before warning about writability
- The code in `Dir.tmpdir` attempts to warn the user if their temp directory is deficient for some reason:
```ruby
case
when !stat.directory?
warn "#{name} is not a directory: #{dir}"
when !stat.writable?
warn "#{name} is not w... -
10:54 PM Revision 8657de70 (git): [Backport 3.3] [Bug #20688] Fix use-after-free for WeakMap and WeakKeyMap (#11439)
- * Add struct weakmap_entry for WeakMap entries
* Refactor wmap_foreach to pass weakmap_entry
* Use wmap_foreach for wmap_mark
* Refactor wmap_compact to use wmap_foreach
* Remove wmap_free_entry
* Fix WeakMap use-after-free
[Bug #2... -
09:04 PM Feature #20692 (Open): Rewrite Array#bsearch in Ruby
- inspired by https://bugs.ruby-lang.org/issues/20182
# Proporsal
Rewrite Array#bsearch
```ruby
class Array
def bsearch
return to_enum(:bsearch) { size } unless block_given?
return nil if empty?
low = 0
... -
08:43 PM Feature #18368: Range#step semantics for non-Numeric ranges
- matz (Yukihiro Matsumoto) wrote in #note-31:
> It seems this change breaks step over string ranges (e.g. `"a".."z").step(3)`). We need to handle string ranges specifically.
Thank you Matz, I am truly overjoyed the one in charge still... -
01:04 PM Feature #18368: Range#step semantics for non-Numeric ranges
- @mame It doesn’t take long, but I’ll have time for that on the weekend (most probably Sunday).
I hope that some clarifications might happen in a few days before that. -
01:02 PM Feature #18368: Range#step semantics for non-Numeric ranges
- @zverok Please fix the incompatibility first before having such a discussion. If it takes long, I will have to revert the change.
-
06:44 AM Feature #18368: Range#step semantics for non-Numeric ranges
- @matz I can certainly implement the specialization, but just to clarify: are there any evidence that people use `("a".."z").step(3)` in any meaningful way? (Unfortunately, I have no way of doing the investigation myself, but probably tho...
-
03:11 AM Feature #18368: Range#step semantics for non-Numeric ranges
- If we take this compatibility as important and go with it, should we give up `("a".."aaaa").step("a")` or support it?
-
02:44 AM Feature #18368: Range#step semantics for non-Numeric ranges
- We have little choice but to specialize it for strings as we don't want to add support for `"a" + 3` that will most certainly bring disaster. 🫠
-
01:29 AM Feature #18368 (Open): Range#step semantics for non-Numeric ranges
- It seems this change breaks step over string ranges (e.g. `"a".."z").step(3)`). We need to handle string ranges specifically.
Matz.
-
07:26 PM Bug #20688: Use-after-free in WeakMap and WeakKeyMap
- I opened a PR to backport to Ruby 3.3: https://github.com/ruby/ruby/pull/11439
-
02:02 PM Bug #20688 (Closed): Use-after-free in WeakMap and WeakKeyMap
- Applied in changeset commit:git|df9a6aa94330cbf414afcd957d1b87defc67e1c5.
----------
Fix WeakMap use-after-free
[Bug #20688]
We cannot free the weakmap_entry before the ST_DELETE because it could
hash the key which would read the weak... -
05:50 PM Revision 16563504 (git): Don't use gc_impl.h inside of gc/gc.h
- Using gc_impl.h inside of gc/gc.h will cause gc/gc.h to use the functions
in gc/default.c when builing with shared GC support because gc/gc.h is
included into gc.c before the rb_gc_impl functions are overridden by the
preprocessor. -
05:50 PM Revision b0c92d6c (git): Change hash_replace_ref_value to assume value moved
- When hash_foreach_replace_value returns ST_REPLACE, it's guaranteed that
the value has moved in hash_replace_ref_value. -
04:05 PM Bug #20691 (Closed): Use-after-free in WeakKeyMap#clear
- GitHub PR: https://github.com/ruby/ruby/pull/11437
If the WeakKeyMap has been marked but sweeping hasn't started yet and we cann WeakKeyMap#clear, then there could be a use-after-free because we do not call rb_gc_remove_weak to remove... -
03:23 PM Revision 3f30c4df (git): [ruby/prism] Update templates/include/prism/ast.h.erb
- https://github.com/ruby/prism/commit/7f7620b6d5
- 03:23 PM Revision 0ef703b9 (git): [ruby/prism] Render node comments into their `ast.h`
- https://github.com/ruby/prism/commit/b17c3241d3
-
02:43 PM Revision d57486cb (git): [ruby/prism] Turn off extended mode when parsing extended group
- https://github.com/ruby/prism/commit/098b3f08bc
-
02:01 PM Revision 56a34b5a (git): Fix use-after-free for WeakKeyMap
- [Bug #20688]
We cannot free the key before the ST_DELETE because it could hash the
key which would read the key and would cause a use-after-free. Instead,
we store the key and free it on the next iteration. -
02:01 PM Revision df9a6aa9 (git): Fix WeakMap use-after-free
- [Bug #20688]
We cannot free the weakmap_entry before the ST_DELETE because it could
hash the key which would read the weakmap_entry and would cause a
use-after-free. Instead, we store the entry and free it on the next
iteration.
For ex... -
02:01 PM Revision 34bf724a (git): Remove wmap_free_entry
-
02:01 PM Revision 3dd46797 (git): Refactor wmap_compact to use wmap_foreach
-
02:01 PM Revision 9c372f87 (git): Use wmap_foreach for wmap_mark
-
02:01 PM Revision e375fa07 (git): Refactor wmap_foreach to pass weakmap_entry
-
02:01 PM Revision 9a9e7438 (git): Add struct weakmap_entry for WeakMap entries
-
11:48 AM Revision 2569413b (git): [rubygems/rubygems] Fix `--prefer-local` flag
- The original implementation of this flag was too naive and all it did
was restricting gems to locally installed versions if there are any
local versions installed.
However, it should be much smarter. For example:
* It should fallback t... -
11:48 AM Revision 203051d8 (git): [rubygems/rubygems] Fix bad grammar in log message
- https://github.com/rubygems/rubygems/commit/bea4c1ad79
-
10:24 AM Misc #20013: Travis CI status
- jaruga (Jun Aruga) wrote in #note-37:
> I am seeing Travis infra errors. It started at least since 13th August 2024 until now. Now the errors only happen on ppc64le/s390x cases. I will contact Travis support.
> ...
I emailed Travis sup... -
09:11 AM Misc #20013: Travis CI status
- Sent a PR to allow failures for ppc64le/s390x on ruby/prism.
https://github.com/ruby/prism/pull/3005
-
09:10 AM Misc #20013: Travis CI status
- I am seeing Travis infra errors. It started at least since 13th August 2024 until now. Now the errors only happen on ppc64le/s390x cases. I will contact Travis support.
13th August 2024
https://app.travis-ci.com/github/ruby/prism/bui... -
09:33 AM Bug #20690 (Rejected): URI.encode_www_form_component method escapes tilde when it's not supposed to
- ## Problem
As the title says, `Uri.encode_www_form_component` is escaping tilde (`~`) where it should not according to the RFC3986.
Ref: https://datatracker.ietf.org/doc/html/rfc3986#section-2.3
There was a previous issue with the ... -
08:03 AM Bug #20682: Slave PTY output is lost after a child process exits in macOS
- @akr
I'd appreciate any ideas you may have. -
08:00 AM Bug #20682: Slave PTY output is lost after a child process exits in macOS
- Here is the summary that we know so far.
## Current PTY's behavior
The slave PTY output is lost after a child process exits in macOS
## Workaround's behavior
The program hangs if a user writes a code which does not read the o... -
07:54 AM Bug #20682: Slave PTY output is lost after a child process exits in macOS
- @mame and I have noticed that there is a problem in the workaround solution: https://github.com/ruby/ruby/pull/11404
This program hangs in `Process.wait(pid)`.
```ruby
require 'pty'
_, _, pid = PTY.spawn('ruby', '-e', 'puts "a"; puts "... -
08:03 AM Bug #20586: Some filesystem calls in dir.c are missing error handling and can return incorrect results if interrupted
- jeremyevans0 (Jeremy Evans) wrote in #note-11:
>
> ...
👍👍👍
The "what's the worst thing that can happen" spidy sense makes me think that automatically falling back on errors that could be transient could mean that such calls have th... -
07:38 AM Revision d731adb7 (git): Strictly checking pull-request author
-
07:35 AM Bug #20677 (Closed): error: mach-o section specifier requires a segment whose length is between 1 and 16 characters
- Applied in changeset commit:git|86c2724e75375ceb165c378ed4261c551136e593.
----------
Don't emit ELF notes on non-ELF platforms
These apparently break compilation on old MacOS toolchains, because the
MachO section name is capped to 16 c... -
07:35 AM Revision 86c2724e (git): Don't emit ELF notes on non-ELF platforms
- These apparently break compilation on old MacOS toolchains, because the
MachO section name is capped to 16 chars (although, on my MacOS, at
least, the section name just gets truncated). Nevertheless, these serve
no purpose on non-ELF pla... -
07:35 AM Revision 6a746e1b (git): Check for both aarch64 and arm64 arch's for pac-ret
- Linux calls it aarch64, but MacOS calls it arm64; pac-ret works on both.
-
07:35 AM Revision ff0a1818 (git): Fix typo in ELF note generation
- This wasn't looking at the right macro name for pac-ret support, so if
Ruby was compiled with pac-ret but NOT BTI, then the ELF note would not
be emitted. -
07:32 AM Revision 004c6a6e (git): Use ruby to suppress a warning message by cmd.exe
- It is expected that reading from command with offset fails by ESPIPE
and the pipe will be closed immediately. While this causes the child
process to terminate by SIGPIPE usually, cmd.exe yields the message
bellow.
```
The process tried... - 07:01 AM Revision 29500e30 (git): Update bundled gems list as of 2024-08-22
-
05:27 AM Bug #20689 (Open): TestInvokeVerb#test_invokeverb has warnings on Windows
- `make test-all TESTS="test/win32ole/test_folderitem2_invokeverb.rb"` shows the following warnings.
```
2024-08-22T01:32:17.681ZE [24144:NonCelloThread] thumbnail_util_win.cc:115:LoadBitmapFromPngResource Can't find PNG resource 0.
2... -
03:35 AM Revision e7ce8ca1 (git): Fix commented version of codeql-action/upload-sarif [ci skip]
- Dependabot will update matching version comments.
- 03:25 AM Revision 0846bcbd (git): Bump github/codeql-action from 3.26.3 to 3.26.4
- Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.3 to 3.26.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md... -
02:29 AM Revision 64a005df (git): `make test-tool` with Windows is broken. We should use :KILL with that platform.
- ```
[ 14/191] TestParallel::TestParallel#test_hungup = 11.02 s
1) Failure:
TestParallel::TestParallel#test_hungup [C:/Users/hsbt/DevDrive/github.com/ruby/ruby/tool/test/testunit/test_parallel.rb:211]:
Expected /^Retrying hung up testca... -
02:20 AM Revision a3f5a043 (git): Handle getlogin failure in PTY.spawn
- getlogin is only called if USER environment variable is not set,
but if getlogin returns NULL in that case, then do not call
getpwnam, and assume /bin/sh as shell.
Mentioned in comment to bug 20586. -
02:20 AM Revision ae886e0c (git): Check getlogin return value before passing to strcasecmp
- getlogin can return NULL, and this can avoid a segfault
in that case.
Mentioned as an issue in comment to bug 20586. -
02:06 AM Revision 8999fd1a (git): automerge needs windows results
-
01:38 AM Revision 8558bea2 (git): Suppress warning for fd leak
- ```
Leaked file descriptor: TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback: 15 : #<TCPSocket:fd 15, AF_INET, 127.0.0.1, 61633>
```
08/21/2024
-
10:52 PM Bug #20586: Some filesystem calls in dir.c are missing error handling and can return incorrect results if interrupted
- jeremyevans0 (Jeremy Evans) wrote in #note-10:
> ivoanjo (Ivo Anjo) wrote in #note-9:
> ...
I've submitted a pull request to add error checking to `getlogin` to `rb_home_dir_of` and `PTY.spawn`: https://github.com/ruby/ruby/pull/11427
... -
09:46 PM Bug #20687 (Open): Does tarball require baseruby?
-
10:14 AM Bug #20687: Does tarball require baseruby?
- nobu (Nobuyoshi Nakada) wrote in #note-1:
> In that case, the system ruby is used to re-check encoding sources and update encdb.h if needed.
Why miniruby is not used for that purpose?
-
09:12 AM Bug #20687 (Closed): Does tarball require baseruby?
- Applied in changeset commit:git|6ab591f80aa19d63ecd1e1df3c09c391efb318a6.
----------
[Bug #20687] Check if base ruby provides necessary libraries -
03:14 AM Bug #20687: Does tarball require baseruby?
- Thanks for looking into this, @hsbt and @nobu! ❤️
-
03:06 AM Bug #20687: Does tarball require baseruby?
- In that case, the system ruby is used to re-check encoding sources and update encdb.h if needed.
Encodings under enc directory will be added to encdb.h automatically by template/encdb.h.tmpl file.
We assume that the cost to re-check us... -
02:09 AM Bug #20687 (Closed): Does tarball require baseruby?
- From https://github.com/rbenv/ruby-build/issues/2435
I'm wondering why tarball use system ruby with above environment. In my understanding, tarball don't need baseruby.
Is it intentional? -
08:59 PM Revision 773cf883 (git): [PRISM] Reset $. when done reading STDIN
-
08:32 PM Revision f6049982 (git): [PRISM] Fix TestTRICK#test_ksk_1
- If an array element is a static literal that does not result in a
intermediate array, it still needs to be compiled normally. -
08:32 PM Revision 465cf8d8 (git): [PRISM] Potentially enable coverage on the main script
-
07:56 PM Revision 76ccd1df (git): [DOC] Tweaks for Enum#tally
-
04:40 PM Revision 9ae91eb2 (git): Backport warning feature for bundled gems from master (#11420)
- * Make sure to always use the right `warn`
* lib/bundled_gems.rb: more reliable caller detection
The `2` skipped frames went out of sync and now it should be `3`.
Rather than just update the offset, we can implement a way that
is adap... -
04:07 PM Revision 53e37953 (git): [DOC] Tweaks to Array#bsearch_index
-
04:06 PM Revision f5579c92 (git): [DOC] Include keywords.rdoc in doc/syntax/ (#11414)
-
03:59 PM Revision 65b3bced (git): [DOC] Tweaks for Array#collect
-
03:56 PM Revision ee6c7ab0 (git): [DOC] Tweaks for Array#clear
-
03:42 PM Revision 124f1754 (git): [DOC] Tweaks for Array#bsearch
-
03:37 PM Revision 7ad74d16 (git): [PRISM] Implement unused block warning
- Related: ruby/prism#2935
-
03:12 PM Revision e15b454b (git): Simplify how finalizers are ran at shutdown
- We don't need to build a linked list from the finalizer table and
instead we can just run the finalizers by iterating the ST table.
This also improves the performance at shutdown, for example:
1_000_000.times.map do
o = Objec... -
02:47 PM Revision 669d1f79 (git): [rubygems/rubygems] Restore support for passing relative paths to `:git`
- The `file://` protocol does not really work with relative paths and it's
not necessary anyways. So restore support for that by not using
`file://`.
https://github.com/rubygems/rubygems/commit/16a68998ce -
02:47 PM Revision 52c02794 (git): [rubygems/rubygems] Add missing flag passed to `git fetch`
- Doesn't really change the test outcome, but I noticed it was missing.
https://github.com/rubygems/rubygems/commit/ea4f9d5209 -
02:34 PM Revision 2bc141f2 (git): [PRISM] Fix up test exception assertion for Prism
-
02:05 PM Bug #20688 (Closed): Use-after-free in WeakMap and WeakKeyMap
- GitHub PR: https://github.com/ruby/ruby/pull/11421
We cannot free the weakmap_entry before the ST_DELETE because it could hash the key which would read the weakmap_entry and would cause a use-after-free. Instead, we store the entry an... -
12:43 PM Revision d5dbaa5d (git): Remove unused weakmap field in wmap_foreach
-
12:07 PM Revision 419d3221 (git): [rubygems/rubygems] Fix `gem uninstall <name>:<version>` failing on shadowed default gems
- https://github.com/rubygems/rubygems/commit/29357a5dd6
-
12:06 PM Revision 3ebe249c (git): [rubygems/rubygems] Add better error when trying to develop RubyGems with an unsupported Ruby version
- https://github.com/rubygems/rubygems/commit/9d41c4088a
-
12:06 PM Revision 54b60258 (git): [rubygems/rubygems] Regeneration previous git application caches that didn't include bare repos
- https://github.com/rubygems/rubygems/commit/417319ecb1
-
11:43 AM Revision 7845ab1b (git): [Bug #20687] Exclude just built ruby as baseruby
- On Windows, an executable file in the current directory has the
priority to the PATH environment variable always. -
07:56 AM Revision 6ab591f8 (git): [Bug #20687] Check if base ruby provides necessary libraries
-
07:48 AM Revision 71c14c88 (git): Don't show script name when bundle exec and call ruby script directly.
-
07:48 AM Revision c97dc773 (git): Skip to show script name with using ruby -r option
-
07:48 AM Revision 5fedf1c3 (git): Show correct script name with sub-feature case
-
05:52 AM Revision b41d7996 (git): Reapply "[ruby/uri] Warn compatibility methods in RFC3986_PARSER"
- This reverts commit 3da7e440e9fca835f5475a98f1c0afb4d2ac71db.
-
04:55 AM Revision ea828c0b (git): Skip failing tempfile library tests
-
04:30 AM Revision 592b9032 (git): Generate parsers of RDoc with Racc 1.8.1
- 01:10 AM Revision 014708ad (git): [ruby/logger] Guarantee level_override exists
- Some Ruby apps subclass Logger without running the superclass
constructor, which means that `@level_override` isn't initialized
properly. This can be fixed in some cases, but the gem should maintain
backwards compatibility.
https://gith...
08/20/2024
-
06:37 PM Revision 1d68a735 (git): [ruby/tempfile] Don't unlink in finalizer when already unlinked
- https://github.com/ruby/tempfile/commit/f677941ea2
-
06:37 PM Revision bd7eda60 (git): [ruby/tempfile] Fix subprocess tests requires
- Using `-rtempfile` requires the tempfile built into Ruby, not the
currently developed one, so the tests aren't testing this tempfile.
https://github.com/ruby/tempfile/commit/ea2dec6f46 -
06:29 PM Revision 2f67610f (git): Remove dependency on Tempfile::Remover in leakchecker.rb
-
06:07 PM Revision a68331e7 (git): [ruby/tempfile] Add FinalizerManager to manage finalizers
- As @jeremyevans pointed out for commit eb2d8b1:
> Each Tempfile instance has a separate File instance and file descriptor:
> ...
FinalizerManager will keep track of the open File objects for the
particular file and will only unlink the ... -
01:28 PM Revision 41b427a2 (git): [ruby/tempfile] Ensure finalizer order in Tempfile
- The Closer and Remover finalizers are defined on different objects in
Tempfile. The Closer is defined on the Tempfile object while the Remover
is defined on the finalizer_obj. This means that there is no guarantee
of the finalizer order.... -
11:16 AM Revision d6f18b22 (git): Remove extraneous lock files
- See https://github.com/rubygems/rubygems/pull/7939
-
11:03 AM Revision 72d016e9 (git): [ruby/reline] typofix
- https://github.com/ruby/reline/commit/d44fbf9f7b
- 09:36 AM Revision 927a44b4 (git): Rewrite #test_redefinition_mismatch to use a dedicated test class
- This test is checking what happens if you try and define a class in a C
extension where that constant is already not a class. It was doing this
by overriding ::Date and then trying to require 'date. The issue with
this is that if we ever... -
09:00 AM Revision 5e3dd6d3 (git): Decrease the timeout in assert_darwin_vm_dump_works (#11412)
-
06:17 AM Misc #20683 (Closed): Propose @ono-max as a committer
- I've finished account setup for ono-san.
-
04:29 AM Misc #20683: Propose @ono-max as a committer
- @hsbt
Yes. I sent the email to the address. -
03:23 AM Misc #20683: Propose @ono-max as a committer
- @ono-max Can you give Required and Optional information of https://github.com/ruby/ruby/wiki/Committer-How-To#how-to-register-you-as-a-committer to `cvs-admin@ruby-lang.org`?
-
03:26 AM Revision f73d4352 (git): Check compile_branch_condition results
-
03:26 AM Revision 995b4c32 (git): Make same structures same
- 02:48 AM Revision edd3fc62 (git): Bump github/codeql-action from 3.26.2 to 3.26.3
- Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.2 to 3.26.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md... -
02:00 AM Bug #20679 (Closed): Rails CI errors since abc04e898b627ab37fa9dd5e330f239768778d8b
- Applied in changeset commit:git|ea7ceff82cec98d0c419e9807dcb33dcc08b56fa.
----------
Avoid hash allocation for certain proc calls
Previously, proc calls such as:
```ruby
proc{|| }.(**empty_hash)
proc{|b: 1| }.(**r2k_array_with_empty_h... -
02:00 AM Revision ea7ceff8 (git): Avoid hash allocation for certain proc calls
- Previously, proc calls such as:
```ruby
proc{|| }.(**empty_hash)
proc{|b: 1| }.(**r2k_array_with_empty_hash)
```
both allocated hashes unnecessarily, due to two separate code paths.
The first call goes through CALLER_SETUP_ARG/vm_call... -
01:27 AM Revision 6dccb013 (git): Sort links [ci skip]
08/19/2024
-
11:51 PM Feature #20664: Add `before` and `until` options to Enumerator.produce
- @matheusrich In my opinion `take_until` might be an interesting method to add, but I think we are unnecessarily complicating the example with `it` and `nil?`.
The expression is simply:
```ruby
Enumerator.produce(File, &:superclass).take... -
09:05 PM Feature #20664: Add `before` and `until` options to Enumerator.produce
- > The one problem we don’t currently have neither Enumerable#take_until, nor Object#not_nil?, to write something like
After [proposing `Object#chain_of`](https://bugs.ruby-lang.org/issues/20625), I realized how missing one of these re... -
11:46 PM Bug #20686: URI::HTTPS can build URI with blank, invalid host
- jhawthorn (John Hawthorn) wrote in #note-2:
> jeremyevans0 (Jeremy Evans) wrote in #note-1:
> ...
Thank you for pointing that out. I obviously should have read a little further. I submitted a pull request to reject empty host for `URI... -
10:59 PM Bug #20686: URI::HTTPS can build URI with blank, invalid host
- Interestingly RFC2396_PARSER seems to allow nil for a host but not empty string, so the newer behaviour is at least more consistent. It does seem like we are missing some expected validation here though.
```
> URI::HTTPS.new(nil, nil... -
10:45 PM Bug #20686: URI::HTTPS can build URI with blank, invalid host
- jeremyevans0 (Jeremy Evans) wrote in #note-1:
> It appears RFC 3986 allows empty hosts (https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2: `reg-name = *( unreserved / pct-encoded / sub-delims )`), so I think this is not a b... -
08:04 PM Bug #20686: URI::HTTPS can build URI with blank, invalid host
- ronricardo (Roniece Ricardo) wrote:
> In Ruby 3.4.0+, calling `URI::HTTPS.build(host: "")` does not raise `URI::InvalidComponentError` as expected. Instead, it returns `#<URI::HTTPS https://>`
> ...
That PR only affects `#to_s`, not `... -
07:40 PM Bug #20686 (Closed): URI::HTTPS can build URI with blank, invalid host
- In Ruby 3.4.0+, calling `URI::HTTPS.build(host: "")` does not raise `URI::InvalidComponentError` as expected. Instead, it returns `#<URI::HTTPS https://>`
I think this was introduced in [this PR](https://github.com/ruby/uri/pull/90).... -
10:32 PM Bug #20586: Some filesystem calls in dir.c are missing error handling and can return incorrect results if interrupted
- Anonymous wrote in #note-8:
> `rb_getpwdirnam_for_login` currently does not have any explicit
> ...
I think this is expected. The consensus seems to be that we should raise an error. Maybe we could change the handling to retry certa... -
09:19 AM Bug #20586: Some filesystem calls in dir.c are missing error handling and can return incorrect results if interrupted
- Hey! As usual thanks for picking up these thorny bugs :)
The fix looks good! In particular I've re-tested it with a modified version of the Datadog profiler where I force it to interrupt threads without GVL (the bug is very hard to t... -
10:09 PM Bug #20679: Rails CI errors since abc04e898b627ab37fa9dd5e330f239768778d8b
- jeremyevans0 (Jeremy Evans) wrote in #note-3:
> Definitely related to the `ruby2_keywords` optimization. I'll keep digging to find the root cause. I'll leave this open until I have a working fix.
I submitted a pull request for the fi... - 07:21 PM Revision e398e84c (git): [rubygems/rubygems] Bump rb-sys
- Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.100 to 0.9.101.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.100...v0.9.101)
---
updated-dep... - 05:55 PM Revision d1b2479b (git): [rubygems/rubygems] Bump rb-sys
- Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.100 to 0.9.101.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.100...v0.9.101)
---
updated-dep... -
02:58 PM Revision cb284877 (git): Make assertions allow incremental GC when disabled
- When assertions are enabled, the following code triggers an assertion
error:
GC.disable
GC.start(immediate_mark: false, immediate_sweep: false)
10_000_000.times { Object.new }
This is because the GC.start ignores that the ... -
11:48 AM Revision 786d0006 (git): [ruby/rdoc] Avoid potentially loading the same extension from different versions of the same gem
- Avoids warnings like
```
/path/to/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rbs-3.4.0/lib/rdoc/discover.rb:10: warning: method redefined; discarding old scan
/path/to/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rbs-3.5.1/lib/rdoc/discover.rb:10: warn... -
10:50 AM Revision cd0d4ec0 (git): Single letter ASCII operator is same as the corresponding ID
-
10:13 AM Misc #20685: Ruby 3.2.4 tag mentions unrelated changes (CVE-2024-27280)
- Thank you for your greate catch! You are totally right. ruby-3.2 seriese contains stringio-3.0.4 from the beginning.
I remove the CVE reference in the GitHub release page now. https://github.com/ruby/ruby/releases/tag/v3_2_4
I will... -
09:21 AM Misc #20685 (Closed): Ruby 3.2.4 tag mentions unrelated changes (CVE-2024-27280)
- # Problem
According to https://github.com/ruby/ruby/releases/tag/v3_2_4,
it mentions "CVE-2024-27280: Buffer overread vulnerability in StringIO"
as a security fix, but https://www.ruby-lang.org/en/news/2024/03/21/buffer-overread-cve... -
09:20 AM Feature #20684 (Closed): Add optimized instructions for frozen literal Hash and Array
- # Context
Methods that take empty arrays or empty hashes as default values allocate a new object each time the method is called without the argument. Often they don't mutate the parameter. To prevent an allocation, in performance crit... -
06:36 AM Revision 566f2eb5 (git): Merge `rb_fork_ruby2` into `rb_fork_ruby`
-
06:35 AM Bug #20677: error: mach-o section specifier requires a segment whose length is between 1 and 16 characters
- https://github.com/ruby/ruby/pull/11405 - I think this should fix it. It seems new toolchains truncate the section name, rather than throwing that error about "length is between 1 and 16 characters", but in any case the section is meanin...
-
05:44 AM Bug #20677: error: mach-o section specifier requires a segment whose length is between 1 and 16 characters
- > deciding if BTI/PAC is available.
Silly me, this is about amd64.
So what you're running into is that I added a `.note.gnu.property` to the amd64 one in https://github.com/ruby/ruby/commit/8ec67052e67dff62b828820e381a94a3acc73459 ... -
04:58 AM Misc #20683: Propose @ono-max as a committer
- Approved.
Matz.
-
02:34 AM Misc #20683 (Assigned): Propose @ono-max as a committer
- +1
Our test suite and CI are complex and complicated. We need more maintainer for that. -
02:04 AM Misc #20683: Propose @ono-max as a committer
- I forgot to mention that he has expressed his willingness to accept committer's proposal here: https://bugs.ruby-lang.org/issues/20682#note-3
-
02:01 AM Misc #20683 (Closed): Propose @ono-max as a committer
- I'd like to propose @ono-max as a committer.
He has contributed to Ruby's test framework, starting with the introduction of Launchable (#20254, #20661).
Also he has been an ongoing contributor to the investigation and correction of f... -
01:53 AM Bug #20682: Slave PTY output is lost after a child process exits in macOS
- mame (Yusuke Endoh) wrote in #note-2:
> The PR looks good to me.
> ...
Sure! I would be delighted to accept a committer.
-
01:51 AM Bug #20682: Slave PTY output is lost after a child process exits in macOS
- The PR looks good to me.
@ono-max Do you want to merge it yourself? If you are willing, I'd like to propose you as a committer. -
01:21 AM Bug #20682: Slave PTY output is lost after a child process exits in macOS
- I created the PR: https://github.com/ruby/ruby/pull/11404
This change works in my macOS environment. -
01:16 AM Bug #20682 (Closed): Slave PTY output is lost after a child process exits in macOS
- According to Launchable, the following PTY tests are flaky only on macOS.
https://app.launchableinc.com/organizations/ruby/workspaces/ruby/data/test-paths/file%3Dtest%2Ftest_pty.rb%23%23%23class%3DTestPTY%23%23%23testcase%3Dtest_spawn... -
12:04 AM Revision 70613595 (git): [rubygems/rubygems] Change new gem README template to have copyable code blocks
- https://github.com/rubygems/rubygems/commit/c805e9b558
08/18/2024
-
01:22 PM Bug #19374: Issue with Ractor.make_shareable with curried procs
- Hey y'all -
I'm commenting here to say that this bug seems to be the only way I was able to pass a Proc to a Ractor even though it doesn't reference self - so wondering what the path is for that instead of exploiting this bug. For cont... -
10:15 AM Feature #18368 (Closed): Range#step semantics for non-Numeric ranges
- Applied in changeset commit:git|d450f9d6a28f01b7ca6030a925921dbf35cee439.
----------
Make Range#step to consistently use + for iteration (#7444)
Make Range#step to consistently use + for iteration [Feature #18368]
Previously, non-num... -
10:15 AM Revision d450f9d6 (git): Make Range#step to consistently use + for iteration (#7444)
- Make Range#step to consistently use + for iteration [Feature #18368]
Previously, non-numerics expected step to be integer,
and iterated with begin#succ, skipping over step value
steps. Since this commit, numeric and non-numeric iteratio... -
09:30 AM Bug #20344: argument stack underflow (-1)
- ruby_3_2 commit:21c708ee802e1a59901eccc6448e40e8f72189b8 merged revision(s) commit:992596fb7af18a7f472589a607d0eb3fbb03b49a.
-
09:07 AM Revision 21c708ee (git): merge revision(s) 992596fb7af18a7f472589a607d0eb3fbb03b49a: [Backport #20344]
- Fix next inside block argument stack underflow
[Bug #20344]
Fix compile_next adding removable adjust label -
09:03 AM Bug #20490: Process.waitpid2(-1, Process::WNOHANG) misbehaves on Ruby 3.1 & 3.2 with detached process
- Merged at https://github.com/ruby/ruby/commit/65fed1c3e439bc47bcf6ec884431a86cb9ebd1dc. Thank you!
-
09:02 AM Revision 65fed1c3 (git): Allow waitpid(-1, Process::WNOHANG) to be woken if a waitpid(pid) is
- ...pending
If two threads are running, with one calling waitpid(-1, Process::WNOHANG),
and another calling waitpid($some_pid), and then
$some_other_pid exits, we would expect the waitpid(-1,
Process::WNOHANG) call to retrieve that exit ... -
08:30 AM Bug #20681: Regular expression warnings are treated as compiler warnings during runtime
- nobu (Nobuyoshi Nakada) wrote in #note-1:
> You may want to re-define `Warning.warn`.
Thank you, that works. Apologies for the wrong report. -
03:25 AM Bug #20681 (Feedback): Regular expression warnings are treated as compiler warnings during runtime
- You may want to re-define `Warning.warn`.
-
03:51 AM Bug #20586: Some filesystem calls in dir.c are missing error handling and can return incorrect results if interrupted - On 2024-08-16 21:59:04, "jeremyevans0 (Jeremy Evans) via ruby-core" <ruby-core@ml.ruby-lang.org> spake thus:
>Issue #20586 has been updated by jeremyevans0 (Jeremy Evans).
>
>
>I've submitted a pull request that I hope will address ... -
02:20 AM Bug #20649: Ripper fails to tokenize `def f; (x)::A =`
- ruby_3_2 commit:a8a25291447e3630d455e82851ca58fc8ac372ec merged revision(s) commit:97449338d6cb42d9dd7c9ca61550616e7e6b6ef6.
-
02:19 AM Bug #20571: Compile error on for loop
- ruby_3_2 commit:50399eebd96c76ce808ea4d84fe39693f585a531 merged revision(s) commit:1870505f478cc75993b296b7144a45137ace6937.
-
02:19 AM Bug #20651: `false && (1 in 1)` produces argument stack underflow (-1)
- ruby_3_2 commit:50399eebd96c76ce808ea4d84fe39693f585a531 merged revision(s) commit:1870505f478cc75993b296b7144a45137ace6937.
-
02:19 AM Revision 50399eeb (git): merge revision(s) 1870505f478cc75993b296b7144a45137ace6937: [Backport #20651] [Backport #20571]
- Fix wrong unreachable chunk remove when jump destination label is unremovable
-
02:03 AM Bug #20654: Floor and ceil have unexpected behaviour when ndigits is large
- Thank you for preparing the backport PRs. They were merged.
-
01:52 AM Revision a8a25291 (git): merge revision(s) 97449338d6cb42d9dd7c9ca61550616e7e6b6ef6: [Backport #20649]
- [Bug #20649] Allow `nil` as 2nd argument of `assign_error`
Fallback to the last token element in that case, for the backward
compatibilities.
08/17/2024
-
12:42 PM Bug #20667: Backport REXML CVE fixes
- ruby_3_2 commit:0f2f6b31aa6433fd800f0621b5bedbaf0da12a6f merged revision(s) commit:2a7da0b6e76929c684cd948630a897c1d5b16c26.
-
12:41 PM Revision 0f2f6b31 (git): merge revision(s) 2a7da0b6e76929c684cd948630a897c1d5b16c26: [Backport #20667]
- Update bundled gems list as of 2024-08-12
-
11:08 AM Bug #20681 (Feedback): Regular expression warnings are treated as compiler warnings during runtime
- I have some code that recieves arbitrary input and parses it as a regexp. To supress potential warnings I'm defining the `warn` method. Unfortunately it is not getting called:
```rb
def warn(...)
puts "CALLED"
end
source = "/\... - 10:36 AM Revision 4dbf386c (git): [DOC] Add `$;` to the list of deprecated global variables
-
09:57 AM Bug #20680 (Closed): No "void context" warning for literals/etc. in ensure block
- Providing this code, I would expect ruby to emit a void context warning:
```rb
begin
foo
rescue
bar
ensure
42
end
```
`ensure` blocks don't return a value unless `return` is used explicitly. Am I right in my assumptio... - 07:00 AM Revision 694181a9 (git): Update bundled gems list as of 2024-08-16
-
12:59 AM Bug #20679: Rails CI errors since abc04e898b627ab37fa9dd5e330f239768778d8b
- Reverted in commit:d56470a27c5a8a2e7aee7a76cea445c2d29c0c59
Here's a failing example that does not require Rails:
```ruby
class A
def self.get(uri, params = {}, env = {}, &block)
env['HTTPS']
end
ruby2_keywords ... -
12:59 AM Revision d56470a2 (git): Revert "Avoid hash allocation for certain proc calls"
- This reverts commit abc04e898b627ab37fa9dd5e330f239768778d8b.
This caused problems in a Rails test.