Project

General

Profile

Activity

From 11/02/2024 to 11/08/2024

11/08/2024

11:38 PM Feature #20770: A *new* pipe operator proposal
@austin, @AlexandreMagro I understand that this is a creature from the functional world. However, I wonder whether the current proposal (statement operator) would allow for such a forms:
``` ruby
def foo
r |> (q_result = q(_)) |> p(...
lpogic (Łukasz Pomietło)
08:28 PM Feature #20770: A *new* pipe operator proposal
@lpogic In these cases, you wouldn’t use pipes:
```ruby
def foo
q_result = q(r) # because q_result is important and deserves its own variable

p(r)
q_result
end
```
The pipe operator is useful when you just need to...
AlexandreMagro (Alexandre Magro)
07:29 PM Feature #20770: A *new* pipe operator proposal
lpogic (Łukasz Pomietło) wrote in #note-36:
> What if I need an intermediate result beyond the next step of the method chain?
> ...
If you need an intermediate result for any reason, don't use a pipeline, or restructure your return val...
austin (Austin Ziegler)
12:40 PM Feature #20770: A *new* pipe operator proposal
What if I need an intermediate result beyond the next step of the method chain?
Cases:
``` ruby
def foo
r |> q(_) |> p(_)
return q_result # "q_result" should be the result of the second step of the chain
end
```
``` ruby...
lpogic (Łukasz Pomietło)
10:28 PM Feature #20882 (Rejected): Provide Boolean(...)
Ruby provides Integer(...) and Float(...) global methods to coerce values. Is there a similar method for Booleans?
I'd like to do something like:
```
# ENV["SOME_FEATURE"] is unset
Boolean(ENV["SOME_FEATURE"]) # => false
# ENV...
getajobmike (Mike Perham)
08:43 PM Revision 51ffef28 (git): Fix memory leak in prism when syntax error in iseq compilation
If there's a syntax error during iseq compilation then prism would leak
memory because it would not free the pm_parse_result_t.
This commit changes pm_iseq_new_with_opt to have a rb_protect to catch
when an error is raised, and return N...
peterzhu2118 (Peter Zhu)
07:56 PM Revision 72550d26 (git): [DOC] Doc for Array#zip (#11961)
burdettelamar (Burdette Lamar)
07:09 PM Revision dccfab0c (git): YJIT: Always abandon the block when gen_branch() or defer_compilation() fails
In [1], we started checking for gen_branch failures, but I made two
crucial mistakes. One, defer_compilation() had the same issue as
gen_branch() but wasn't checked. Two, returning None from a codegen
function does not throw away the blo...
alanwu (Alan Wu)
05:55 PM Bug #20704: Windows: `-C` option does not work for multibyte path name
I just found https://github.com/ruby/ruby/pull/11991 which seems a more likely culprit, sorry for the noise here! deivid (David Rodríguez)
05:30 PM Feature #20878: A new C API to create a String by adopting a pointer: `rb_enc_str_adopt(const char *ptr, long len, long capa, rb_encoding *enc)`
This would likely be useful in Nokogiri as well. The two key places I have in mind are
1. returning a large serialization string generated within libxml2 (which is configured to use `ruby_xmalloc` by default)
2. assembling an HTML5-c...
mdalessio (Mike Dalessio)
03:47 PM Feature #20878: A new C API to create a String by adopting a pointer: `rb_enc_str_adopt(const char *ptr, long len, long capa, rb_encoding *enc)`
I would use this in Prism as well. There are many cases where we allocate a string in the parser and then when we reify the Ruby AST we have to copy the string over. But the string content was allocated with ruby_xmalloc. So it would be ... kddnewton (Kevin Newton)
10:08 AM Feature #20878: A new C API to create a String by adopting a pointer: `rb_enc_str_adopt(const char *ptr, long len, long capa, rb_encoding *enc)`
> If that's okay that's okay. For instance a return value of asprintf cannot be "adopt"ed then because obviously, that's not allocated by ruby_xmalloc.
Yes, that's why I'm wondering if this requirement should be relaxed to "MUST be fr...
byroot (Jean Boussier)
08:56 AM Feature #20878: A new C API to create a String by adopting a pointer: `rb_enc_str_adopt(const char *ptr, long len, long capa, rb_encoding *enc)`
byroot (Jean Boussier) wrote:
> #### Work inside RString allocated memory
> ...
I thought `rb_str_set_len()` was supposed to be the efficient alternative to `rb_str_resize()` meant for such a purpose.
I think an assert on the capaci...
rhenium (Kazuki Yamaguchi)
08:43 AM Feature #20878: A new C API to create a String by adopting a pointer: `rb_enc_str_adopt(const char *ptr, long len, long capa, rb_encoding *enc)`
byroot (Jean Boussier) wrote in #note-7:
> > There is no reason for us to believe that the const char *ptr was allocated by malloc.
> ...
If that's okay that's okay. For instance a return value of asprintf cannot be "adopt"ed then be...
shyouhei (Shyouhei Urabe)
07:53 AM Feature #20878: A new C API to create a String by adopting a pointer: `rb_enc_str_adopt(const char *ptr, long len, long capa, rb_encoding *enc)`
> There is no reason for us to believe that the const char *ptr was allocated by malloc.
The proposed function documentation state that the pointer MUST have been allocated with `ruby_xmalloc`.
> ...
I see. From my understanding, ...
byroot (Jean Boussier)
03:20 AM Feature #20878: A new C API to create a String by adopting a pointer: `rb_enc_str_adopt(const char *ptr, long len, long capa, rb_encoding *enc)`
byroot (Jean Boussier) wrote in #note-4:
> > I think it is unsafe for memory leak, in comparison with "RString allocated memory".
> ...
Whenever you allocate a new object, there is a risk of a memory error.
In that case, who will look...
nobu (Nobuyoshi Nakada)
12:02 AM Feature #20878: A new C API to create a String by adopting a pointer: `rb_enc_str_adopt(const char *ptr, long len, long capa, rb_encoding *enc)`
byroot (Jean Boussier) wrote in #note-4:
> > I think it is unsafe for memory leak, in comparison with "RString allocated memory".
> ...
There is no reason for us to believe that the `const char *ptr` was allocated by malloc. It could ...
shyouhei (Shyouhei Urabe)
03:50 PM Revision 6767117b (git): [ruby/prism] Fix splat after kwsplat
https://github.com/ruby/prism/commit/70c1cd480f Haldun Bayhantopcu
03:45 PM Feature #20792 (Rejected): String#with_encoding(encoding)
In that case I think I will close this. kddnewton (Kevin Newton)
03:45 PM Bug #20862: gem install --document=rdoc,ri fails with some gem
Thanks for reporting, I've opened https://github.com/ruby/rdoc/pull/1200 to address it. st0012 (Stan Lo)
03:45 PM Bug #20790: Syntax acceptance of `*x = p rescue p 1` is different between parse.y and prism
That makes sense to me, we can make that work. kddnewton (Kevin Newton)
03:44 PM Bug #20785: Should `a in b, and c` `a in b, or c` `a in b, rescue c` be syntax ok?
I think this resolution makes sense, we can make that work. Should we get started on it? kddnewton (Kevin Newton)
03:29 PM Revision 4b4c94b1 (git): CI: In parse.y runs, use ./configure --with-parser=parse.y
Because tests might not use the command-line --parser option, or be
aware that they should be, it's better to test with the default
parser set.
alanwu (Alan Wu)
03:08 PM Revision 39537e07 (git): Check bignum multiplication digits overflow
nobu (Nobuyoshi Nakada)
03:08 PM Revision edb1c821 (git): Add integer overflow check macros for add/sub as well as mul
nobu (Nobuyoshi Nakada)
03:06 PM Revision d1969474 (git): YJIT: Pass panic message to rb_bug()
So that the Rust panic message is forwarded to the RUBY_CRASH_REPORT
system, instead of only the static "YJIT panicked" message done so
previously. This helps with triaging crashes since it's easier than
trying to parse stderr output.
S...
alanwu (Alan Wu)
01:16 PM Bug #20869: IO buffer handling is inconsistent when seeking
> Since io.pos (not assignment) looks mere attribute, differentiated from seek.
If not for the fact that `IO#seek` always returns 0 regardless of its arguments (something I've never understood), `IO#pos` could be implemented as `IO#se...
javanthropus (Jeremy Bopp)
04:28 AM Bug #20869: IO buffer handling is inconsistent when seeking
The documentation is outdated, I'll fix it.
Since `io.pos` (not assignment) looks mere attribute, differentiated from `seek`.
Doesn't this make sense?
nobu (Nobuyoshi Nakada)
12:26 PM Feature #20864: Allow `Kernel#warn` to accept `**options` and pass these to `Warning.warn`.
From the experience of mspec or ruby/spec which used to override `Kernel#warn` it's very confusing and messy, and I removed that.
Overriding `Kernel#warn` typically also breaks `uplevel` handling and might also break the recursion check...
Eregon (Benoit Daloze)
09:00 AM Feature #20864: Allow `Kernel#warn` to accept `**options` and pass these to `Warning.warn`.
I also want something like this. In order to move things forward we have to clear some points:
- There could be programs that redefine `Kernel#warn` on the fly in the wild. They might suffer from the API change. About the only thin...
shyouhei (Shyouhei Urabe)
12:15 PM Revision fbe35bcc (git): [rubygems/rubygems] Fix private registry credentials being written to logs
https://github.com/rubygems/rubygems/commit/d070fa10c1
Co-authored-by: Artem Ignatyev <zazubrik@gmail.com>
samisalamiws
12:06 PM Revision 10d694a1 (git): [rubygems/rubygems] Warn on insecure materialization
https://github.com/rubygems/rubygems/commit/bc2537de71 deivid (David Rodríguez)
12:06 PM Revision 7cb0bb43 (git): [rubygems/rubygems] Fix typo
https://github.com/rubygems/rubygems/commit/f68a2c30bb deivid (David Rodríguez)
12:06 PM Revision 8869c311 (git): [rubygems/rubygems] Simplify tests that deal with lockfile using only "ruby" platform
Using an old bundler version was necessary at the beginning because we
checked the version of Bundler being run in order to enable the new
behavior. But we removed that a long time ago and now we only look at
whether the lockfile only in...
deivid (David Rodríguez)
12:06 PM Revision 7f2db157 (git): [rubygems/rubygems] Small tweak
https://github.com/rubygems/rubygems/commit/98641d21a2 deivid (David Rodríguez)
12:06 PM Revision 4d83f37f (git): [rubygems/rubygems] Reduce global state
https://github.com/rubygems/rubygems/commit/43c0c41c6b deivid (David Rodríguez)
12:06 PM Revision ebf07f7a (git): [rubygems/rubygems] Remove unnecessary attribute
It's defined in the superclass already.
https://github.com/rubygems/rubygems/commit/e269f5477b
deivid (David Rodríguez)
12:06 PM Revision bf35b2c0 (git): [rubygems/rubygems] Cleaner extension of `Gem::Specification` to be able to set source
https://github.com/rubygems/rubygems/commit/3749273ec6 deivid (David Rodríguez)
12:06 PM Revision 50e6363e (git): [rubygems/rubygems] Remove accessor that's been unused for years
https://github.com/rubygems/rubygems/commit/ffd2fbaf6c deivid (David Rodríguez)
12:06 PM Revision 88fa4fe5 (git): [rubygems/rubygems] Make sure platforms in spec lockfile are properly sorted
https://github.com/rubygems/rubygems/commit/99b4ac4548 deivid (David Rodríguez)
11:53 AM Revision fde6d189 (git): Avoid calculating large powers
... for slow CI machines like macOS. mame (Yusuke Endoh)
10:49 AM Feature #20811 (Closed): `warning: in a**b, b may be too big` is really helpful?
Applied in changeset commit:git|45cd4a8296814f3b082dfb906cdef29974726731.
----------
Do not round `a**b` to infinity
... instead, just calculate the value unless it is too big.
Also, this change raises an ArgumentError if it is expecte...
mame (Yusuke Endoh)
09:25 AM Feature #20811: `warning: in a**b, b may be too big` is really helpful?
I have created https://github.com/ruby/ruby/pull/12033
This patch changes the behavior of `Integer#**` and `Rational#**`. If the generated bignum is not likely to exceed an estimated 16 GB, it will be calculated straightforwardly. If ...
mame (Yusuke Endoh)
10:48 AM Revision c348a4fd (git): Avoid interger multiplication overflow
mame (Yusuke Endoh)
10:48 AM Revision 45cd4a82 (git): Do not round `a**b` to infinity
... instead, just calculate the value unless it is too big.
Also, this change raises an ArgumentError if it is expected to exceed
16 GB in a 64-bit environment.
(It is possible to calculate it straightforward, but it would likely be
out...
mame (Yusuke Endoh)
10:27 AM Revision f7b334e0 (git): [rubygems/rubygems] Add `bundle lock --add-checksums` to add checksums to an existing lockfile
https://github.com/rubygems/rubygems/commit/0a9c1ce60d deivid (David Rodríguez)
10:26 AM Revision 1f62a98f (git): [rubygems/rubygems] Remove no longer necessary hacks to define the `gem` command
We did this because RubyGems `require` would call `gem` on self, so
defining a `gem` method in the CLI would cause conflicts. However, this
is not the case since
https://github.com/rubygems/rubygems/commit/439c4464890958fec17b3aa65b9d3a4...
deivid (David Rodríguez)
09:37 AM Bug #20881 (Assigned): Complex#** returns discontinuous results in Fixnum and Bignum exponents
`Complex#**` performs the straightforward calculation when the exponent is Fixnum, but performs the computation in the polar coordinate system when the exponent is Bignum. Therefore, errors accumulate in the former case and not in the la... mame (Yusuke Endoh)
09:02 AM Feature #20627 (Closed): `require` on Ractor should run on the main Ractor
Applied in changeset commit:git|aa63699d10e489bc6d9c13406fc47f581001568b.
----------
support `require` in non-main Ractors
Many libraries should be loaded on the main ractor because of
setting constants with unshareable objects and so ...
ko1 (Koichi Sasada)
09:02 AM Feature #20715 (Closed): `Ractor.[]` and `Ractor.[]=` to access Ractor local storage
Applied in changeset commit:git|075a102c937969c62a6798b32b3c3188df91a075.
----------
`Ractor.[]` and `Ractor.[]=`
`Ractor#[]/[]=` is only for accessors to the current ractor, so that
`Ractor.[]/[]=` is simpler.
[Feature #20715]
ko1 (Koichi Sasada)
09:02 AM Revision 16159960 (git): specify NOINLINE for LTO
ko1 (Koichi Sasada)
09:02 AM Revision 78064d07 (git): skip `SystemStackError`
with -O0 build, prism parser consumes a lot of machine stack and
it doesn't work with minimum machine stack for threads, which
specified with `RUBY_THREAD_MACHINE_STACK_SIZE=1`.
So simply ignore `SystemStackError` for btest.
ko1 (Koichi Sasada)
09:02 AM Revision 97aaf6f7 (git): introduce `rb_ec_check_ints()`
to avoid TLS issue with N:M threads. ko1 (Koichi Sasada)
09:02 AM Revision 0d63b9b4 (git): check closing flag
`Ractor.receive` and `Ractor.yield` should stop when the
incoming/outgoing port is closed.
ko1 (Koichi Sasada)
09:02 AM Revision 4886a54d (git): fix rjit-bindgen info
ko1 (Koichi Sasada)
09:02 AM Revision 8d88d35f (git): correct dependencies
ko1 (Koichi Sasada)
09:02 AM Revision aa63699d (git): support `require` in non-main Ractors
Many libraries should be loaded on the main ractor because of
setting constants with unshareable objects and so on.
This patch allows to call `requore` on non-main Ractors by
asking the main ractor to call `require` on it. The calling r...
ko1 (Koichi Sasada)
09:02 AM Revision 075a102c (git): `Ractor.[]` and `Ractor.[]=`
`Ractor#[]/[]=` is only for accessors to the current ractor, so that
`Ractor.[]/[]=` is simpler.
[Feature #20715]
ko1 (Koichi Sasada)
09:02 AM Revision f0d0c030 (git): `Ractor.main?`
to return the current ractor is the main ractor.
(== `Ractor.current == Ractor.main`)
ko1 (Koichi Sasada)
09:02 AM Revision c8297c3e (git): `interrupt_exec`
introduce
- rb_threadptr_interrupt_exec
- rb_ractor_interrupt_exec
to intercept the thread/ractor execution.
ko1 (Koichi Sasada)
06:08 AM Revision 29578773 (git): Update default gems list at 35d8427b8b393e1ea6977872d9246e [ci skip]
git[bot]
06:07 AM Revision 35d8427b (git): [ruby/uri] Bump up v1.0.1
https://github.com/ruby/uri/commit/3011eb6f6e hsbt (Hiroshi SHIBATA)
06:06 AM Revision d7c65398 (git): [ruby/uri] Added more fallback constants like URI::PARTTERN and URI::REGEXP
Fixed https://github.com/ruby/uri/issues/125
https://github.com/ruby/uri/commit/1f3d3df02a
hsbt (Hiroshi SHIBATA)
05:19 AM Revision 85868388 (git): Update default gems list at 7772fe05bcb212a96684ea763b7e5c [ci skip]
git[bot]
05:18 AM Revision 7772fe05 (git): [ruby/win32-registry] Bump up v0.1.0
https://github.com/ruby/win32-registry/commit/a87076ee42 hsbt (Hiroshi SHIBATA)
05:01 AM Revision e462ef2e (git): Update default gems list at 7c9cda9b52b6eabde597f265b652c8 [ci skip]
git[bot]
05:00 AM Revision 7c9cda9b (git): [ruby/time] Bump up v0.4.1
https://github.com/ruby/time/commit/539b151049 hsbt (Hiroshi SHIBATA)
04:32 AM Feature #20782: Introduction of Happy Eyeballs Version 2 (RFC8305) in TCPSocket.new
Thanks. I've finished your accounts.
You can merge https://github.com/ruby/ruby/pull/11653 by yourself.
hsbt (Hiroshi SHIBATA)
03:58 AM Feature #20782: Introduction of Happy Eyeballs Version 2 (RFC8305) in TCPSocket.new
@hsbt
I sent them to cvs-admin, thank you.
shioimm (Misaki Shioi)
12:21 AM Feature #20782: Introduction of Happy Eyeballs Version 2 (RFC8305) in TCPSocket.new
@shioimm Can you provide required/optional information at https://github.com/ruby/ruby/wiki/Committer-How-To#how-to-register-you-as-a-committer to cvs-admin@ruby-lang.org? After that, I will prepare your account for Ruby committer. hsbt (Hiroshi SHIBATA)
04:23 AM Revision 8fecc65a (git): Update default gems list at a698b5ebb88ceb54cad4d50abdb4fb [ci skip]
git[bot]
04:22 AM Revision a698b5eb (git): [ruby/optparse] Bump up v0.6.0
https://github.com/ruby/optparse/commit/080360ffd4 hsbt (Hiroshi SHIBATA)
04:06 AM Revision 637b74b0 (git): Update default gems list at 475e8f8c46e9712c32ccd0c33d651d [ci skip]
git[bot]
04:05 AM Revision 475e8f8c (git): [ruby/pstore] Bump up v0.1.4
https://github.com/ruby/pstore/commit/a63a70a830 hsbt (Hiroshi SHIBATA)
03:57 AM Revision ae785d88 (git): `EXE_LDFLAGS` uses the same `MUNICODE_FLAG`
fd0 (Daisuke Fujimura)
03:57 AM Revision 07f45065 (git): `-municode` is available for MinGW-w64 targets only
fd0 (Daisuke Fujimura)
03:55 AM Revision 3c3da1ec (git): Update default gems list at 82dfdb8646ca075b4c1f1750069a83 [ci skip]
git[bot]
03:54 AM Revision 82dfdb86 (git): [ruby/singleton] Bump up v0.3.0
https://github.com/ruby/singleton/commit/256c91171b hsbt (Hiroshi SHIBATA)
03:39 AM Revision ed24c0c8 (git): Update default gems list at 306ce9a9e0f2fe9fe3ec17bf284bcb [ci skip]
git[bot]
03:38 AM Revision 306ce9a9 (git): [ruby/reline] Bump version to 0.5.11
(https://github.com/ruby/reline/pull/777)
https://github.com/ruby/reline/commit/4d90743409
ima1zumi (Mari Imaizumi)
03:28 AM Revision b99c17a9 (git): [ruby/reline] Windows fix (https://github.com/ruby/reline/pull/775)
* test_yamatanooroti: close tempfile before unlink
* test_yamatanooroti: omit because of windows does not support job control
* test_yamatanooroti: change startup message detection for windows
* windows.rb: can call win32api using nil...
YO4 (Yoshinao Muramatsu)
02:46 AM Revision 9a9a586d (git): Update default gems list at 3406e8aad9f43b03b50cef7263fd6f [ci skip]
git[bot]
02:45 AM Revision 3406e8aa (git): [ruby/benchmark] Bump up v0.4.0
https://github.com/ruby/benchmark/commit/a5d77ceae0 hsbt (Hiroshi SHIBATA)
02:32 AM Revision 9523f534 (git): [ruby/benchmark] Adjust ljust Benchmark#bm with labels was not using the highest length among the labels to adjust the correct ljust. Instead of printing the result during the report generation, now it is waiting to print the result once it is generated.
Benchmark.bm { |x|
x.item("aaaa") { 1 }
x.item("aaaaaaaa") { 0 }
}
After
user system total real
aaaa 0.000005 0.000002 0.000007 ( 0.000003)
aaaaaaaa 0.000001 0.000001 0.000002 ( 0.00000...
kaiquekandykoga (Kaíque Koga)
02:27 AM Revision b56b70a3 (git): Temporary removed gmp because vcpkg package is broken.
hsbt (Hiroshi SHIBATA)
01:35 AM Revision 100df03e (git): Update default gems list at 74077a99bfdb62c66cbabd9a111c24 [ci skip]
git[bot]
01:35 AM Revision 74077a99 (git): [ruby/ostruct] Bump up v0.6.1
https://github.com/ruby/ostruct/commit/b38680089f hsbt (Hiroshi SHIBATA)
01:27 AM Revision c05f849c (git): [ruby/ostruct] Update license files same as ruby/ruby
https://github.com/ruby/ostruct/commit/85a773bb41 hsbt (Hiroshi SHIBATA)

11/07/2024

10:05 PM Feature #15554: warn/error passing a block to a method which never use a block
Now that `strict_unused_block` has been added as a warning category, I have to ask what is a "warning category" exactly? Normally I would consider a "category" to be a grouping of similar items. All warnings related to performance go int... Dan0042 (Daniel DeLorme)
09:29 PM Bug #20863: `zlib.c` calls `rb_str_set_len` and `rb_str_modify_expand`(and others) without holding the GVL.
> There would be quite a lot of value in having some nogvl save APIs though. e.g. if database clients could allocate Hash/Array/String to build the response while the GVL is still released, it could really help with throughput of threade... ioquatix (Samuel Williams)
09:28 PM Bug #20863: `zlib.c` calls `rb_str_set_len` and `rb_str_modify_expand`(and others) without holding the GVL.
There would be quite a lot of value in having *some* nogvl save APIs though. e.g. if database clients could allocate Hash/Array/String to build the response while the GVL is still released, it could really help with throughput of threade... byroot (Jean Boussier)
09:25 PM Bug #20863: `zlib.c` calls `rb_str_set_len` and `rb_str_modify_expand`(and others) without holding the GVL.
ioquatix (Samuel Williams) wrote in #note-7:
> Even if today the implementation follows a "safe" code path, in the future, it may not.
This is a good point.
I think we should consider all C API functions unsafe to be called without the ...
Eregon (Benoit Daloze)
08:27 PM Bug #20863: `zlib.c` calls `rb_str_set_len` and `rb_str_modify_expand`(and others) without holding the GVL.
I think the issue is, those methods from a public interface POV, are not allowed to be called without the GVL.
Even if today the implementation follows a "safe" code path, in the future, it may not.
Adding these annotations will he...
ioquatix (Samuel Williams)
05:07 PM Bug #20863: `zlib.c` calls `rb_str_set_len` and `rb_str_modify_expand`(and others) without holding the GVL.
@ko1 Not sure how I didn't think to check that, thank you. So indeed allocations are fine. From what I understand, the issue is mostly exceptions and of course using an object concurrently. byroot (Jean Boussier)
04:46 PM Bug #20863: `zlib.c` calls `rb_str_set_len` and `rb_str_modify_expand`(and others) without holding the GVL.
Quoted from `rb_thread_call_without_gvl` doc:
```
* NOTE: You can not execute most of Ruby C API and touch Ruby
* objects in `func()' and `ubf()', including raising an
* exception, because current thread doesn't acqu...
ko1 (Koichi Sasada)
02:50 PM Bug #20863: `zlib.c` calls `rb_str_set_len` and `rb_str_modify_expand`(and others) without holding the GVL.
@ko1 Do we have a proper description of what is safe and what it unsafe to do with the GVL released?
Because obviously it's OK to use `ruby_xmalloc / ruby_xfree` with the GVL released, so methods which allocate aren't necessarily prob...
byroot (Jean Boussier)
08:41 PM Bug #20880 (Rejected): Hash allows array-type key duplicates
This is not a bug, it is expected. It's best not to mutate objects used as hash keys, but Ruby doesn't stop you from doing it. If you do mutate an object used as a hash key, you need to call rehash on the hash to update it (https://doc... jeremyevans0 (Jeremy Evans)
08:34 PM Bug #20880 (Rejected): Hash allows array-type key duplicates
I was solving small tasks on Leetcode and encountered an issue with Hash which looked strange to me:
There's an array saved into the variable and a hash with a previously created array as a key
``` ruby
arr = [1,2,3]
hsh = {arr => ...
alexfrstnberg (Yana Prystopchuk)
07:06 PM Bug #20704: Windows: `-C` option does not work for multibyte path name
Hello @nobu!
One bundler spec started failing after upgrading our CI to use Ruby 3.3.6 on Windows. The error reads like this:
```
Invoking `C:/hostedtoolcache/windows/Ruby/3.3.6/x64/bin/ruby.exe -ID:/a/rubygems/rubygems/bundler/...
deivid (David Rodríguez)
05:14 PM Feature #20878: A new C API to create a String by adopting a pointer: `rb_enc_str_adopt(const char *ptr, long len, long capa, rb_encoding *enc)`
> I think it is unsafe for memory leak, in comparison with "RString allocated memory".
I'm sorry I don't follow, could you expand on what you mean is unsafe? The entire "adopt" idea?
byroot (Jean Boussier)
04:40 PM Feature #20878: A new C API to create a String by adopting a pointer: `rb_enc_str_adopt(const char *ptr, long len, long capa, rb_encoding *enc)`
I think it is unsafe for memory leak, in comparison with "RString allocated memory".
nobu (Nobuyoshi Nakada)
03:38 PM Feature #20878: A new C API to create a String by adopting a pointer: `rb_enc_str_adopt(const char *ptr, long len, long capa, rb_encoding *enc)`
> Maybe simply rb_str_adopt() for the name?
I don't have a strong opinion here, I just went with the current convention.
On another note:
> ...
I'm actually not sure this really need to be a MUST, I suppose what is a MUST is tha...
byroot (Jean Boussier)
02:54 PM Feature #20878: A new C API to create a String by adopting a pointer: `rb_enc_str_adopt(const char *ptr, long len, long capa, rb_encoding *enc)`
LGTM, +1.
Maybe simply `rb_str_adopt()` for the name?
That way it's closer to `rb_str_new()`, and these days all String C API taking a C string should also take an encoding anyway so we don't need `enc_` and enc-less variants.
Eregon (Benoit Daloze)
10:31 AM Feature #20878 (Open): A new C API to create a String by adopting a pointer: `rb_enc_str_adopt(const char *ptr, long len, long capa, rb_encoding *enc)`
### Context
A common use case when writing C extensions is to generate text or bytes into a buffer, and to return it back
wrapped into a Ruby String. Examples are `JSON.generate(obj) -> String`, and all other format serializers,
com...
byroot (Jean Boussier)
03:02 PM Feature #20350: Return chilled string from Symbol#to_s
Matz already approved this change above, so I think the only missing thing is a PR to implement it.
It might be late to add this in 3.4 though, but it could be merged early in 3.5 dev.
Eregon (Benoit Daloze)
02:35 PM Revision fca07d73 (git): Respect RUBY_CRASH_REPORT path when RUBY_ASSERT() fails
Previously, it always used stderr. Slight shuffle of the first line
of the crash due to reusing code from rb_bug():
```diff
-Assertion Failed: /ruby/object.c:649:rb_obj_itself:false
+/ruby/object.c:649: Assertion Failed: rb_obj_itself:f...
alanwu (Alan Wu)
01:46 PM Misc #20013: Travis CI status
Sorry, I see Travis arm64 jobs are not starting or take long time to start. It's stucking in the step Booting virtual machine.
https://app.travis-ci.com/github/ruby/prism/jobs/627841655
I sent PR to drop Travis arm64 as a temporary work...
jaruga (Jun Aruga)
01:01 PM Bug #20869: IO buffer handling is inconsistent when seeking
The documentation that was added says that `IO#tell` and `IO#pos` would clear the buffers, but they appear to have a special code path now to avoid it. `IO#seek(0, :CUR)` doesn't share this behavior, and that's a curious inconsistency. javanthropus (Jeremy Bopp)
12:38 PM Bug #20869 (Closed): IO buffer handling is inconsistent when seeking
Applied in changeset commit:git|ee29aade1a432cbd5e4d5ec6ea6ccb4fa87361be.
----------
[Bug #20869] Discard read buffer and encoding converters at seeking
nobu (Nobuyoshi Nakada)
12:16 PM Bug #20869: IO buffer handling is inconsistent when seeking
Right, but just discarding the buffers isn't enough, because in the case of `SEEK_CUR`, you need to know exactly how much ahead of the expected cursor you really are.
The only solution I see is to keep a count of how many bytes were a...
byroot (Jean Boussier)
10:46 AM Bug #20869: IO buffer handling is inconsistent when seeking
The buffers and `Encoding::Converter`s should be discarded at positioning, we think. nobu (Nobuyoshi Nakada)
12:52 PM Revision 3f7c72cd (git): [ruby/irb] Correct ja/help-message for --context-mode and --prompt
(https://github.com/ruby/irb/pull/1029)
https://github.com/ruby/irb/commit/b21432daf7
kyanagi (Kouhei Yanagita)
12:47 PM Revision 6385a28c (git): Quarantine unreliable spec
* See discussion on https://github.com/ruby/spec/pull/1210 Eregon (Benoit Daloze)
12:03 PM Revision ee29aade (git): [Bug #20869] Discard read buffer and encoding converters at seeking
nobu (Nobuyoshi Nakada)
11:24 AM Bug #20802 (Closed): It is possible to set the encoding of an IO instance to one that requires binmode when binmode is not set
Applied in changeset commit:git|1701ddea73cf482289361c7559ad42e2694f65f1.
----------
[Bug #20802] Copy encodings at reopen as well
nobu (Nobuyoshi Nakada)
10:57 AM Bug #20808: Data#pretty_print doesn't handle private or remove attribute readers
Proposed patch: https://github.com/ruby/pp/pull/29 byroot (Jean Boussier)
10:39 AM Bug #20808: Data#pretty_print doesn't handle private or remove attribute readers
Discussed the dev meeting. @akr said using `__send__` instead of `public_send` would be good. mame (Yusuke Endoh)
10:45 AM Misc #20879 (Closed): DevMeeting-2024-12-12
# The next dev meeting
**Date: 2024/12/12 13:00-17:00** (JST)
Log: https://github.com/ruby/dev-meeting-log/blob/master/2024/DevMeeting-2024-12-12.md
- Dev meeting *IS NOT* a decision-making place. All decisions should be done at t...
mame (Yusuke Endoh)
10:44 AM Misc #20781 (Closed): DevMeeting-2024-11-07
mame (Yusuke Endoh)
10:38 AM Feature #20792: String#with_encoding(encoding)
Briefly discussed at the dev meeting. If `String#with_encoding` is the same as `.dup.force_encoding`, @matz said `.dup.force_encoding` is good enough. mame (Yusuke Endoh)
10:36 AM Bug #20790: Syntax acceptance of `*x = p rescue p 1` is different between parse.y and prism
Discussed at the dev meeting. Here is matz's preference.
```ruby
# current parse.y behavior # matz's preference
*x = p rescue p 1 # (*x = p) rescue (p 1) # *x = (p rescue (p 1))
*x = p 1 rescue p 1 # (*...
mame (Yusuke Endoh)
10:34 AM Bug #20785: Should `a in b, and c` `a in b, or c` `a in b, rescue c` be syntax ok?
Discussed at the dev meeting. Matz says that, in principle, the trailing comma of a pattern should be allowed.
```ruby
a in b, and c # Prism should accept this as `(a in b,) and c`
a in b, or c # Prism should accept this as `...
mame (Yusuke Endoh)
10:33 AM Revision 1701ddea (git): [Bug #20802] Copy encodings at reopen as well
nobu (Nobuyoshi Nakada)
10:27 AM Bug #20857 (Closed): Ruby 3.4 seems to have backwards compatibility issues more than its predecessors
At the dev meeting, I explained the findings of the incompatibility to matz. He stated that it was within the expected range of impacts and that no revert would be made. mame (Yusuke Endoh)
10:25 AM Feature #20818: Allow passing a block to Hash#store (to update current value)
Discussed at the dev meeting. @matz said "I don't like the style so much, but if the patch is safe and actually improves performance, I'm willing to consider it. I'd like you to show the benchmark."
I am not sure if it is safe to exec...
mame (Yusuke Endoh)
10:17 AM Feature #20811: `warning: in a**b, b may be too big` is really helpful?
Matz said "let's calculate". I will create a PR mame (Yusuke Endoh)
10:03 AM Revision ffcfaf4c (git): [rubygems/rubygems] Undeprecate Gemfiles without a global source
After having a second look at this deprecation, the explanation that
we're giving does not make a lot of sense. When working only with local
gems, Bundler will indeed generate a different lockfile depending on
the latest installed versio...
deivid (David Rodríguez)
10:03 AM Feature #20782: Introduction of Happy Eyeballs Version 2 (RFC8305) in TCPSocket.new
Thank you it's honor to be a Ruby committer...! shioimm (Misaki Shioi)
09:43 AM Feature #20782: Introduction of Happy Eyeballs Version 2 (RFC8305) in TCPSocket.new
Accepted.
Matz.
matz (Yukihiro Matsumoto)
09:45 AM Feature #20852 (Rejected): Anonymous HEREDOC blocks
I don't think we should enhance here-doc syntax any further. It's too complex already.
Matz.
matz (Yukihiro Matsumoto)
09:45 AM Revision df3395f2 (git): [ruby/fcntl] Fixup gemspec files
https://github.com/ruby/fcntl/commit/9e14019f53 hsbt (Hiroshi SHIBATA)
08:58 AM Feature #20793 (Rejected): Allow Multiple Arguments for the .is_a? Method
`is_a?(A, B)` can be read as `is_a?(A) || is_a?(B)` or `is_a?(A) && is_a?(B)`. This ambiguity might lead to less readability.
Matz.
matz (Yukihiro Matsumoto)
08:42 AM Feature #20786 (Rejected): Flow chaining with "then" keyword
We are discussing pipeline operator in #20770. IMO, this proposal does not make the code clearer nor more concise.
Matz.
matz (Yukihiro Matsumoto)
06:53 AM Revision 0172ae6c (git): Update default gems list at fb6645a51095469ab6eac9a819c36c [ci skip]
git[bot]
06:52 AM Revision fb6645a5 (git): [ruby/uri] Bump up v1.0.0
https://github.com/ruby/uri/commit/af8d9d6bb1 hsbt (Hiroshi SHIBATA)
06:46 AM Feature #20859 (Rejected): Make Base64 to core class
Matz is negative for this proposal. I withdraw this. hsbt (Hiroshi SHIBATA)
06:09 AM Feature #20864: Allow `Kernel#warn` to accept `**options` and pass these to `Warning.warn`.
For previous discussion including compatibility, see <https://bugs.ruby-lang.org/issues/17122> ioquatix (Samuel Williams)
05:56 AM Feature #20864: Allow `Kernel#warn` to accept `**options` and pass these to `Warning.warn`.
Compatibility issues for user defined `warn` methods?
```
$ ~/gem-codesearch/gem-codesearch 'def warn\b' | wc -l
3837
```
ko1 (Koichi Sasada)
01:26 AM Feature #20864: Allow `Kernel#warn` to accept `**options` and pass these to `Warning.warn`.
I checked C interface in `error.h` and we end up having a lot of variants:
- `rb_warn`
- `rb_warning`
- `rb_category_warn`
- `rb_compile_warn`
- `rb_category_compile_warn`
etc.
One idea is this:
```
struct rb_warning_arg...
ioquatix (Samuel Williams)
04:51 AM Revision c59b5f58 (git): Update default gems list at 33a80fc0cd77d4dd8d32d25c71ee4c [ci skip]
git[bot]
04:50 AM Revision 33a80fc0 (git): [ruby/psych] Bump up v5.2.0.beta3
https://github.com/ruby/psych/commit/d9e18aaab7 hsbt (Hiroshi SHIBATA)
04:44 AM Revision 0795ed62 (git): Update default gems list at f102901f9a7c0a75f45ad908c84dbe [ci skip]
git[bot]
04:43 AM Revision f102901f (git): [ruby/psych] Bump up v5.2.0.beta2
https://github.com/ruby/psych/commit/a0c353ec97 hsbt (Hiroshi SHIBATA)
04:18 AM Revision f87ec81e (git): Prevent method redefinition warnings in test
mame (Yusuke Endoh)
04:18 AM Revision 6a39e6fc (git): Prevent a warning: ambiguous `/`
mame (Yusuke Endoh)
04:03 AM Feature #20715: `Ractor.[]` and `Ractor.[]=` to access Ractor local storage
I'd expect that accessing other Ractors' local storages will raise an exception. nobu (Nobuyoshi Nakada)
03:53 AM Revision e0d696cd (git): Update default gems list at 4e5ea9f056e4c77e3720d412bb95d9 [ci skip]
git[bot]
03:52 AM Revision 4e5ea9f0 (git): [ruby/fcntl] Bump up v1.2.0
https://github.com/ruby/fcntl/commit/3292a8a862 hsbt (Hiroshi SHIBATA)
03:19 AM Revision 0193f6c2 (git): [DOC] Doc for Array#values_at (#11960)
burdettelamar (Burdette Lamar)
02:40 AM Revision b92ce6fb (git): Update default gems list at 72bc6984192cd7489afafd70a60567 [ci skip]
git[bot]
02:39 AM Revision 72bc6984 (git): [ruby/net-http] Bump up v0.5.0
https://github.com/ruby/net-http/commit/28a4bf9295 hsbt (Hiroshi SHIBATA)
02:28 AM Revision 048bb1e1 (git): `ubf_th` appears to be unused. (#11994)
Samuel Williams
02:27 AM Revision f9cd04ae (git): Update default gems list at 849e651d510765ee7ec21404308462 [ci skip]
git[bot]
02:26 AM Revision 849e651d (git): [ruby/delegate] Bump up v0.4.0
https://github.com/ruby/delegate/commit/713059a5e9 hsbt (Hiroshi SHIBATA)
02:26 AM Revision cf70564c (git): [ruby/delegate] Bump up required ruby version to 3.0
https://github.com/ruby/delegate/commit/6daeb4248f hsbt (Hiroshi SHIBATA)
01:30 AM Bug #20862 (Assigned): gem install --document=rdoc,ri fails with some gem
hsbt (Hiroshi SHIBATA)
01:18 AM Revision 7c893c8d (git): Loosen the criteria for timing checks of Kernel#sleep
The test was too flaky mame (Yusuke Endoh)
12:17 AM Revision 342455e5 (git): [ruby/logger] Enable subclasses to configure level isolation
(https://github.com/ruby/logger/pull/103)
`Logger#with_level` was recently added to enable configuring a
`Logger`'s level for the duration of a block. However, the configured
level is always tied to the currently running `Fiber`, which ...
Hartley McGuire

11/06/2024

11:53 PM Feature #20864: Allow `Kernel#warn` to accept `**options` and pass these to `Warning.warn`.
> We should also have a description of how the structured logging information should be handled by default.
Regarding the default behaviour, I propose no changes.
As an alternative, I'd also be open to dumping it, e.g. using `pp`.
...
ioquatix (Samuel Williams)
11:38 PM Feature #20864: Allow `Kernel#warn` to accept `**options` and pass these to `Warning.warn`.
@ioquatix asked for my feedback on this. I'm against `Warning.warn` taking `**opts` for structured logging. We have an existing `category` keyword option that it would conflict with, and it would prevent the backwards compatible additi... jeremyevans0 (Jeremy Evans)
10:26 PM Feature #20864: Allow `Kernel#warn` to accept `**options` and pass these to `Warning.warn`.
According to the discussion I've updated the proposal. ioquatix (Samuel Williams)
10:56 PM Revision 6bc61426 (git): We should run Check Dependencies always for required status
hsbt (Hiroshi SHIBATA)
10:32 PM Revision 46d25055 (git): Update default gems list at e4c15b8ace76d2a27191fe275b81d7 [ci skip]
git[bot]
10:31 PM Revision e4c15b8a (git): [ruby/json] Release 2.8.0
https://github.com/ruby/json/commit/8071cc6f09 byroot (Jean Boussier)
10:31 PM Revision d188a688 (git): [ruby/json] Implement a fast path for integer parsing
`rb_cstr2inum` isn't very fast because it handles tons of
different scenarios, and also require a NULL terminated string
which forces us to copy the number into a secondary buffer.
But since the parser already computed the length, we ca...
byroot (Jean Boussier)
10:31 PM Revision 29d76d8c (git): [ruby/json] Fix right shift warnings
Ignoring `CHAR_BITS` > 8 platform, as far as `ch` indexes
`escape_table` that is hard-coded as 256 elements.
```
../../../../src/ext/json/generator/generator.c(121): warning C4333: '>>': right shift by too large amount, data loss
../../...
nobu (Nobuyoshi Nakada)
10:31 PM Revision 6cea370b (git): [ruby/json] parser.rl: parse_string implement a fast path
If we assume most string don't contain any escape sequence we can avoid
a lot of costly operations when it holds true.
Before:
```
== Parsing activitypub.json (58160 bytes)
ruby 3.4.0dev (2024-11-06T07:59:09Z precompute-hash-wh.. https...
byroot (Jean Boussier)
10:31 PM Revision 8254f649 (git): [ruby/json] Categorize deprecated warning
https://github.com/ruby/json/commit/1acce7aceb nobu (Nobuyoshi Nakada)
10:03 PM Feature #20350: Return chilled string from Symbol#to_s
As one data point in favour of this we swapped Symbol#to_s for Symbol#name (`Symbol.alias_method :to_s, :name`) to GitHub.com last week and it reduced allocations by about 5% on our web requests. So there should be pretty significant sav... jhawthorn (John Hawthorn)
09:59 PM Feature #20877 (Closed): Introduce (public) debug assertion for holding the GVL.
## Background
I found issues with `zlib.c` calling `rb_` functions without holding the GVL: <https://bugs.ruby-lang.org/issues/20863>. The GVL must be held before many of Ruby's C functions can be called. However, few functions check ...
ioquatix (Samuel Williams)
09:25 PM Feature #20855 (Closed): Introduce `Fiber::Scheduler#blocking_region` to avoid stalling the event loop.
Updated proposal: https://bugs.ruby-lang.org/issues/20876 ioquatix (Samuel Williams)
04:55 AM Feature #20855: Introduce `Fiber::Scheduler#blocking_region` to avoid stalling the event loop.
After discussing this with @ko1, we are going to (1) update the name to `blocking_operation_wait` and (2) introduce a flag to `rb_nogvl` to take a conservative approach to offloading work to the fiber scheduler. Once that's done I'll upd... ioquatix (Samuel Williams)
09:12 PM Feature #20770: A *new* pipe operator proposal
mame (Yusuke Endoh) wrote in https://bugs.ruby-lang.org/issues/20781#note-9 at DevMeeting:
> AlexandreMagro (Alexandre Magro) wrote in #note-8:
> ...
Yes, `r |> q |> p` was just an abstract notation to explicitly show the order of meth...
AlexandreMagro (Alexandre Magro)
08:58 PM Revision fdc82cca (git): Update to ruby/spec@54c391e
Eregon (Benoit Daloze)
08:58 PM Revision 9bc63e7b (git): Update to ruby/mspec@6499325
Eregon (Benoit Daloze)
08:58 PM Bug #20745: IO::Buffer#copy triggers UB when src/dest buffers overlap
Thanks for your work and research about the performance cost. ioquatix (Samuel Williams)
08:55 PM Bug #20745 (Closed): IO::Buffer#copy triggers UB when src/dest buffers overlap
Applied in changeset commit:git|35bf6603372360c7680653328274a670fa1d9f38.
----------
io_buffer.c: Allow copies between overlapping buffers with #copy and #set_string (#11640)
The current implementation of `IO::Buffer#copy` and `#set_st...
hanazuki (Kasumi Hanazuki)
08:55 PM Revision 35bf6603 (git): io_buffer.c: Allow copies between overlapping buffers with #copy and #set_string (#11640)
The current implementation of `IO::Buffer#copy` and `#set_string` has
an undefined behavior when the source and destination memory overlaps,
due to the underlying use of the `memcpy` C function.
This patch guarantees the methods to be s...
hanazuki (Kasumi Hanazuki)
06:21 PM Feature #20792: String#with_encoding(encoding)
Hmm, I see what you mean. In that case I'm convinced. I have changed the title of this request to be String#with_encoding. kddnewton (Kevin Newton)
05:41 PM Feature #20859: Make Base64 to core class
I agree with everything you said @mame. I didn't know the final goal of gemification of the standard library was to make all default gems either stdlib or bundled gems. I like that and I support it. deivid (David Rodríguez)
02:31 AM Feature #20859: Make Base64 to core class
My understanding is that default gems are transitional to eventually being promoted to bundled gems. So, I didn't think there was an option to make it a default gem permanently. As a matter of fact, mirroring repositories is a pain.
I...
mame (Yusuke Endoh)
04:58 PM Bug #20869: IO buffer handling is inconsistent when seeking
Considering a parallel, the [manpage for the fseek(3) function](https://linux.die.net/man/3/fseek) clearly states that the effects of ungetc(3) are undone on successful calls to fseek(3). javanthropus (Jeremy Bopp)
03:53 PM Bug #20869: IO buffer handling is inconsistent when seeking
I'll add this to the next developer meeting. byroot (Jean Boussier)
03:08 PM Bug #20869: IO buffer handling is inconsistent when seeking
I think your code change highlights another bug caused by the current behavior where `IO#pos` can report negative values. Oddly, `IO#seek(0, :CUR)` still returns 0:
```ruby
require 'tempfile'
Tempfile.open do |f|
f.write('0123...
javanthropus (Jeremy Bopp)
04:48 PM Feature #20794: Expose information about the currently running GC module
I agree that parsing a string from `GC.active_gc_name` might not be good. My concern with `GC.config` is that these keys are not configurable at runtime, so the corresponding `GC.config(implementation: "something else")` will not work. I... peterzhu2118 (Peter Zhu)
02:10 AM Feature #20794: Expose information about the currently running GC module
Would a dedicated method like `active_gc_name` be good? I guess there will be variants and configurations like "mmtk-immix". It does not look good to me to add the information into a string, like HTTP user agent. How about adding key-val... mame (Yusuke Endoh)
03:55 PM Misc #20781: DevMeeting-2024-11-07
* [Bug #20869] IO buffer handling is inconsistent when seeking (byroot)
* The ticket show multiple weirdness around `IO#ungetbyte / IO#ungetc` and `#IO#seek`.
* This is very clearly a bug, but what the right behavior should be isn'...
byroot (Jean Boussier)
03:34 PM Bug #20868 (Closed): Method#hash changes after compaction
Applied in changeset commit:git|56ecc243e230e8e99761ec0ffc5116601f094bb0.
----------
[Bug #20868] Fix Method#hash to not change after compaction
The hash value of a Method must remain constant after a compaction, otherwise
it may not w...
peterzhu2118 (Peter Zhu)
03:34 PM Revision 56ecc243 (git): [Bug #20868] Fix Method#hash to not change after compaction
The hash value of a Method must remain constant after a compaction, otherwise
it may not work as the key in a hash table.
For example:
def a; end
# Need this method here because otherwise the iseq may be on the C stack
# w...
peterzhu2118 (Peter Zhu)
02:58 PM Revision 96e695ad (git): Fix flakiness in TestGc#test_thrashing_for_young_objects
I caught a reproduction of this test failing under rr, and was able to
replay it to isolate the failure. The call to
`before_stat_heap = GC.stat_heap` is itself allocating a hash, which in
unlucky circumstances can result in a new page b...
KJ Tsanaktsidis
01:16 PM Revision 261f5d32 (git): [rubygems/rubygems] Add naive infinite loop detection when fixing lockfile dependencies
https://github.com/rubygems/rubygems/commit/5e933968a2 deivid (David Rodríguez)
01:16 PM Revision c79d2364 (git): [rubygems/rubygems] Note about why we don't fix lockfile dependencies backed by installed specs
https://github.com/rubygems/rubygems/commit/6fa94b5d72 deivid (David Rodríguez)
01:16 PM Revision 40a2e8e9 (git): [rubygems/rubygems] This is not about the lockfile anymore
https://github.com/rubygems/rubygems/commit/f2e0a72291 deivid (David Rodríguez)
01:16 PM Revision 54f6b787 (git): [rubygems/rubygems] Automatically fix lockfile when the API reveals missing deps
https://github.com/rubygems/rubygems/commit/92196ccfdb deivid (David Rodríguez)
01:16 PM Revision a4938e5b (git): [rubygems/rubygems] Add missing spec for materializing lockfiles with only "ruby" platform
https://github.com/rubygems/rubygems/commit/4168a7f488 deivid (David Rodríguez)
01:16 PM Revision db7455ae (git): [rubygems/rubygems] Check for `EndpointSpecification` exactly
https://github.com/rubygems/rubygems/commit/8fac200ded deivid (David Rodríguez)
01:16 PM Revision 3e7a43e5 (git): [rubygems/rubygems] Simplify code structure
https://github.com/rubygems/rubygems/commit/a4dd06f095 deivid (David Rodríguez)
12:59 PM Revision cb49ed26 (git): Update ext/openssl/depend
This is a follow-up to commit e5860e565467cb330f2c7b9ae140a1e4b89c0b71. rhenium (Kazuki Yamaguchi)
12:28 PM Feature #20876 (Closed): Introduce `Fiber::Scheduler#blocking_operation_wait` to avoid stalling the event loop.
This is an evolution of the previous proposal: https://bugs.ruby-lang.org/issues/20855
## Background
The current Fiber Scheduler performance can be significantly impacted by blocking operations that cannot be deferred to the event ...
ioquatix (Samuel Williams)
11:57 AM Bug #20872: Undefined RUBY_API_VERSION_* macros used in <ruby/backward/cxxanyargs.hpp>
nobu (Nobuyoshi Nakada) wrote in #note-1:
> It looks no hurt to remove the conditional already.
Ah, yes. That should be right.
hanazuki (Kasumi Hanazuki)
05:59 AM Bug #20872: Undefined RUBY_API_VERSION_* macros used in <ruby/backward/cxxanyargs.hpp>
It looks no hurt to remove the conditional already. nobu (Nobuyoshi Nakada)
11:57 AM Revision 84a8b911 (git): Store precomputed hash when there's capacity
Co-authored-by: Jean Boussier <byroot@ruby-lang.org> etienne (Étienne Barrié)
11:37 AM Revision 350baed6 (git): [rubygems/rubygems] Fix manifest in gem package using incorrect platform sometimes
If a gem package is built from a specification whose platform has been
modified, it will include metadata using the old platform.
This change should fix the problem by making sure `original_platform` is
always properly set.
https://git...
deivid (David Rodríguez)
11:37 AM Revision 8c184885 (git): [rubygems/rubygems] Fix some JRuby warnings when using `bundler/setup` with Ruby's -w flag
When using the `bundler/setup` entrypoint, Bundler prints the following
warnings in JRuby in `-w` is passed to Ruby.
```
/path/to/bundler/shared_helpers.rb:10: warning: constant Bundler::WINDOWS is deprecated
/path/to/bundler/shared_hel...
deivid (David Rodríguez)
10:17 AM Revision e5860e56 (git): [ruby/openssl] move ractor safe macro to ossl.h
in order to import or define the RUBY_TYPED_FROZEN_SHAREABLE macro.
https://github.com/ruby/openssl/commit/b8504c2215
chucke (Tiago Cardoso)
09:19 AM Revision 3b9896ac (git): Revert "Introduce Fiber Scheduler `blocking_region` hook. (#11963)" (#12013)
This reverts some of commit 87fb44dff6409a19d12052cf0fc07ba80a4c45ac.
We will rename and propose a slightly different interface.
Samuel Williams
09:03 AM Feature #20782: Introduction of Happy Eyeballs Version 2 (RFC8305) in TCPSocket.new
+1 matsuda (Akira Matsuda)
02:11 AM Feature #20782: Introduction of Happy Eyeballs Version 2 (RFC8305) in TCPSocket.new
+1 mame (Yusuke Endoh)
08:59 AM Revision 74834fd7 (git): Update default gems list at 82008d38e01f8b0b3f808a91841b8d [ci skip]
git[bot]
08:57 AM Revision 82008d38 (git): [ruby/shellwords] Bump up v0.2.1
https://github.com/ruby/shellwords/commit/ee08b981ac hsbt (Hiroshi SHIBATA)
08:38 AM Revision 6cb43375 (git): Update default gems list at 8f4227b664d8e74fc81adf0b31b295 [ci skip]
git[bot]
08:37 AM Revision 8f4227b6 (git): [ruby/open-uri] Bump up v0.5.0
https://github.com/ruby/open-uri/commit/8f5a4ef6f9 hsbt (Hiroshi SHIBATA)
08:28 AM Feature #20875 (Closed): Atomic initialization for Ractor local storage
## Motivation
Now there is no way to initialize Ractor local storage in multi-thread.
For example, if we want to introduce per-Ractor counter, which should be protected with a per-Ractor Mutex for multi-threading support.
```rub...
ko1 (Koichi Sasada)
08:27 AM Revision 81b30797 (git): Update default gems list at 0c59048b3a981a80d57d2318c37b36 [ci skip]
git[bot]
08:26 AM Revision 0c59048b (git): [ruby/timeout] Bump up v0.4.2
https://github.com/ruby/timeout/commit/2f52522994 hsbt (Hiroshi SHIBATA)
08:06 AM Revision 201e1c6c (git): Update default gems list at 7d9e9eabe7d6c53f5a24297b6275d8 [ci skip]
git[bot]
08:05 AM Revision 7d9e9eab (git): [ruby/tmpdir] Bump up v0.3.0
https://github.com/ruby/tmpdir/commit/ef9ca591cf hsbt (Hiroshi SHIBATA)
07:48 AM Revision 348e9256 (git): Update default gems list at 7e167b3225312410dcd8c303aa1ca9 [ci skip]
git[bot]
07:47 AM Revision 7e167b32 (git): [ruby/tempfile] Bump up v0.3.0
https://github.com/ruby/tempfile/commit/2ff9b3ccef hsbt (Hiroshi SHIBATA)
07:33 AM Revision 9b287d3b (git): Update default gems list at a3a0c675c1e701d88b5d0cbcea54f1 [ci skip]
git[bot]
07:32 AM Revision a3a0c675 (git): [ruby/yaml] Bump up v0.4.0
https://github.com/ruby/yaml/commit/5e9bfff132 hsbt (Hiroshi SHIBATA)
07:10 AM Revision 6e4fcddc (git): Update default gems list at 0949c586c05e7513497fd2e84edb03 [ci skip]
git[bot]
07:09 AM Revision 0949c586 (git): [ruby/pathname] Bump up v0.4.0
https://github.com/ruby/pathname/commit/b020cbde46 hsbt (Hiroshi SHIBATA)
06:45 AM Revision a2dd471d (git): macOS 15 is the stable version today
hsbt (Hiroshi SHIBATA)
06:44 AM Revision 5d10d1f3 (git): Drop EOL versions and added Ruby 3.1 to ruby/spec
hsbt (Hiroshi SHIBATA)
06:35 AM Revision 86fc40ed (git): We should support ruby/spec with Ruby 3.1 and 3.2
hsbt (Hiroshi SHIBATA)
06:35 AM Revision 35bd3d11 (git): Skip MinGW failure with GitHub Actions update
We should fix this later hsbt (Hiroshi SHIBATA)
06:35 AM Revision 2ad331ac (git): Partly reverted from 449899b38314d0ecbe61e42d34398bdf2561b8e9
hsbt (Hiroshi SHIBATA)
06:35 AM Revision e548ff67 (git): Pend some tests because these are not working with macOS 15 and Xcode 16
hsbt (Hiroshi SHIBATA)
06:35 AM Revision 3bea0abd (git): Export homebrew's bison path to PATH environmental variable
hsbt (Hiroshi SHIBATA)
06:35 AM Revision e6ff23ef (git): Retired macos-12 and added macos-14 and macos-15 on GitHub Actions
hsbt (Hiroshi SHIBATA)
06:35 AM Revision 7be9f5a6 (git): Fix test tail with mjit options for clang provided by Xcode 16
```
clang: error: unknown argument '-emit-pch'; did you mean '-Xclang -emit-pch'?
MJIT warning: Making precompiled header failed on compilation. Stopping MJIT worker...
Successful MJIT finish
```
hsbt (Hiroshi SHIBATA)
05:45 AM Bug #20874 (Open): Difference in documentation for `irb -U` between `man irb` and `irb --help`
There is a difference in documentation for `irb -U` between `man irb` and `irb --help`.
* `man irb`: Same as `ruby -U' . Sets the default value for internal encodings (Encoding.default_internal) to UTF-8.
* `irb --help`: Set externa...
kyanagi (Kouhei Yanagita)
05:03 AM Bug #20873 (Closed): `printf("%f")` returns wrong result for `Rational` with `FIXNUM_MIN`
Applied in changeset commit:git|d71be7274bd2623bb521be72c245c08fc38d6ae4.
----------
[Bug #20873] Consider `-FIXNUM_MIN` overflow
`-FIXNUM_MIN` is usually greater than `FIXNUM_MAX` on platforms using
two's complement representation.
nobu (Nobuyoshi Nakada)
04:31 AM Bug #20873 (Closed): `printf("%f")` returns wrong result for `Rational` with `FIXNUM_MIN`
Since the beginning, ruby 2.3.
```ruby
require 'rbconfig/sizeof'
fmin, fmax = RbConfig::LIMITS.values_at("FIXNUM_MIN", "FIXNUM_MAX")
sprintf("%f", Rational(fmin, fmax)) #=> --1.000000
```
nobu (Nobuyoshi Nakada)
04:31 AM Revision d71be727 (git): [Bug #20873] Consider `-FIXNUM_MIN` overflow
`-FIXNUM_MIN` is usually greater than `FIXNUM_MAX` on platforms using
two's complement representation.
nobu (Nobuyoshi Nakada)
04:30 AM Revision c7c895ce (git): * 2024-11-06 [ci skip]
git[bot]
04:30 AM Revision 06926ffb (git): OpenSSL::TestX509Request#test_sign_and_verify_rsa_sha1 is also not working with MinGW
hsbt (Hiroshi SHIBATA)
04:30 AM Revision 279fb008 (git): Skip tests that suddenly started failing for MinGW
These test failures first appeared on irrelevant changes. It probably
came from changes in GitHub Actions instead of CRuby's.
Until we figure out how to fix these tests, let's skip them to make the
CI usable.
k0kubun (Takashi Kokubun)
04:30 AM Revision e9cc29bb (git): Pend some tests because these are not working with macOS 15 and Xcode 16
hsbt (Hiroshi SHIBATA)
04:30 AM Revision ccbe0390 (git): Retired macos-12 and added macos-14 and macos-15 on GitHub Actions
hsbt (Hiroshi SHIBATA)
04:30 AM Revision b57d40d1 (git): Fix test tail with mjit options for clang provided by Xcode 16
```
clang: error: unknown argument '-emit-pch'; did you mean '-Xclang -emit-pch'?
MJIT warning: Making precompiled header failed on compilation. Stopping MJIT worker...
Successful MJIT finish
```
hsbt (Hiroshi SHIBATA)
03:58 AM Revision 18c3e2d9 (git): Assert newly added warning in `JSON.load`
nobu (Nobuyoshi Nakada)
03:37 AM Revision c690ca03 (git): Ignore return value of `into_raw_fd`
Fix as the compiler orders:
```
warning: unused return value of `into_raw_fd` that must be used
--> ../src/yjit/src/disasm.rs:123:21
|
123 | file.into_raw_fd(); // keep the fd open
| ^^^...
nobu (Nobuyoshi Nakada)
02:06 AM Feature #15554 (Closed): warn/error passing a block to a method which never use a block
Applied in changeset commit:git|ab7ab9e4508c24b998703824aa9576fb2e092065.
----------
`Warning[:strict_unused_block]`
to show unused block warning strictly.
```ruby
class C
def f = nil
end
class D
def f = yield
end
[C.new, D.new]...
ko1 (Koichi Sasada)
02:06 AM Revision ab7ab9e4 (git): `Warning[:strict_unused_block]`
to show unused block warning strictly.
```ruby
class C
def f = nil
end
class D
def f = yield
end
[C.new, D.new].each{|obj| obj.f{}}
```
In this case, `D#f` accepts a block. However `C#f` doesn't
accept a block. There are some cas...
ko1 (Koichi Sasada)
01:56 AM Feature #20870 (Third Party's Issue): GEM_ROOT -
Please ask the rubygems upstream. nobu (Nobuyoshi Nakada)
01:53 AM Bug #20867: bundle and Gem.user_dir with spaces or require_relative dir with spaces
`Bundler::SharedHelpers#set_rubylib` sets `RUBYLIB` to include `bundler_ruby_lib`.
So it may work by just setting `RUBYOPT` to `-rbundler/setup` in `Bundler::SharedHelpers#set_rubyopt`.
I don't know why it sets the absolute path, ple...
nobu (Nobuyoshi Nakada)
01:47 AM Bug #20867: bundle and Gem.user_dir with spaces or require_relative dir with spaces
> probably defined in `Bundler::SharedHelpers#set_rubyopt`. nobu (Nobuyoshi Nakada)

11/05/2024

11:40 PM Bug #20872 (Open): Undefined RUBY_API_VERSION_* macros used in <ruby/backward/cxxanyargs.hpp>
I just noticed that C++ compilers warn for undefined RUBY_API_VERSION_MAJOR/RUBY_API_VERSION_MINOR macros in `<ruby/backward/cxxanyargs.hpp>` when preprocessing `<ruby.h>`.
```
% cat test.cpp
#include <ruby.h>
% clang++ -Wundef -...
hanazuki (Kasumi Hanazuki)
10:56 PM Bug #20856 (Closed): Incorrect and inconsistent multi-thread eval execution with Prism compiler
kddnewton (Kevin Newton)
10:08 PM Revision 4203c70d (git): Allow eval to see top scope
Fixes [Bug #20856]
Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
kddnewton (Kevin Newton)
10:05 PM Feature #20864: Allow `Kernel#warn` to accept `**options` and pass these to `Warning.warn`.
Thanks for your feedback. The proposal is deliberately thin - as I said, I don't know exactly how we should adjust the internal interface to handle this (actually I don't have a strong opinion about it). The main point is, to allow for a... ioquatix (Samuel Williams)
04:14 PM Feature #20864: Allow `Kernel#warn` to accept `**options` and pass these to `Warning.warn`.
I think I agree with the general idea but I'm not sure if the proposal is what I think it is. It's a bit thin about what happens with this "error" keyword exactly. So is the idea that this meta-information would be forwarded to another m... Dan0042 (Daniel DeLorme)
03:04 PM Feature #20864: Allow `Kernel#warn` to accept `**options` and pass these to `Warning.warn`.
> I wonder why error: in particular, and not just warn(text, **any_structured_metadata)?..
I'd be okay with that, in fact I was thinking of making that proposal but I wasn't sure it would be accepted if it was too general.
> ...
Good q...
ioquatix (Samuel Williams)
01:47 PM Feature #20864: Allow `Kernel#warn` to accept `**options` and pass these to `Warning.warn`.
Why not include the error directly in the warning message?
It seems that would just work better with the whole `Warning.warn` system and existing handling of warnings.
Eregon (Benoit Daloze)
12:26 PM Feature #20864: Allow `Kernel#warn` to accept `**options` and pass these to `Warning.warn`.
I wonder why `error:` in particular, and not just `warn(text, **any_structured_metadata)`?.. zverok (Victor Shepelev)
11:21 AM Feature #20864 (Open): Allow `Kernel#warn` to accept `**options` and pass these to `Warning.warn`.
## Background
Structured logging is a practice that organizes log data in a consistent, easily parseable format. Unlike traditional unstructured logs, which often consist of plain text entries, structured logs format information in ke...
ioquatix (Samuel Williams)
09:49 PM Feature #20855: Introduce `Fiber::Scheduler#blocking_region` to avoid stalling the event loop.
> Zlib.deflate is a CPU-bound operation right? So it makes sense for Fibers of the same Thread to execute the 10 operations sequentially.
Yes, `Zlib.deflate` with a big enough input can become significantly CPU bound. Yes, executing t...
ioquatix (Samuel Williams)
04:56 PM Feature #20855: Introduce `Fiber::Scheduler#blocking_region` to avoid stalling the event loop.
> If rb_nogvl is called in the fiber scheduler, it can introduce latency, as releasing the GVL will prevent the event loop from progressing while nogvl function is executing
I definitely understand the problem here. But… dealing with ...
kjtsanaktsidis (KJ Tsanaktsidis)
04:38 PM Feature #20855: Introduce `Fiber::Scheduler#blocking_region` to avoid stalling the event loop.
I also don't understand this patch. `Zlib.deflate` is a CPU-bound operation right? So it makes sense for Fibers of the same Thread to execute the 10 operations sequentially. That's what Fibers are about. If you want parallelism you need ... Dan0042 (Daniel DeLorme)
02:20 PM Feature #20855: Introduce `Fiber::Scheduler#blocking_region` to avoid stalling the event loop.
> I don't introduce blocking_region.
I am not strongly attached to the name, I just used `blocking_region` as it is quite commonly used internally for handling of blocking operations and has existed for 13 years (https://github.com/ruby...
ioquatix (Samuel Williams)
01:05 PM Feature #20855: Introduce `Fiber::Scheduler#blocking_region` to avoid stalling the event loop.
In terms of naming, `blocking_region` sounds too internal to me.
I think the C API talks about `blocking_function` (`rb_thread_call_without_gvl`, `rb_blocking_function_t` although that type shouldn't be used) and `unblock_function` (`rb...
Eregon (Benoit Daloze)
07:51 AM Feature #20855 (Open): Introduce `Fiber::Scheduler#blocking_region` to avoid stalling the event loop.
I against this proposal because
* I can't understand what happens on this description. I couldn't understand the control flow with a given func for rb_nogvl.
* I'm not sure what is the `work` for `blocking_region()` callback.
* I don't ...
ko1 (Koichi Sasada)
08:25 PM Bug #20871: Including methods in Enumerable doesn't make them available in Array
Forgot to mention.
We use the `parallel_tests` gem to speed up our specs in CI.
On my local environment, with synchronous tests, I haven't been able to reproduce the same behaviour either.
sanderd17 (Sander Deryckere)
08:09 PM Bug #20871 (Closed): Including methods in Enumerable doesn't make them available in Array
Today, our CI pipeline started failing after the automatic update from v3.3.5 to v3.3.6.
After researching, it turned out that our core extensions to the `Array` class weren't loaded anymore.
The core-extensions code looks like thi...
sanderd17 (Sander Deryckere)
06:11 PM Bug #20865 (Closed): `Stack consistency error` running ActiveSupport test
Yes, quite certain it's a duplicate of [Bug #20799] that I reported to Aaron a couple weeks back and that he already fixed. byroot (Jean Boussier)
04:00 PM Bug #20865: `Stack consistency error` running ActiveSupport test
Can you try with the latest master? I suspect this is already fixed. alanwu (Alan Wu)
02:22 PM Bug #20865: `Stack consistency error` running ActiveSupport test
And this is shorter reproducer:
~~~
$ ruby -Ilib:test -e 'Dir.glob "./test/**/current_attributes_test.rb", &method(:require)' -- -v
/usr/share/gems/gems/minitest-5.25.1/lib/minitest/mock.rb:33: warning: redefining 'object_id' may cause ...
vo.x (Vit Ondruch)
02:16 PM Bug #20865: `Stack consistency error` running ActiveSupport test
Was able to reproduce with debuginfo installed:
~~~
-- C level backtrace information -------------------------------------------
/lib64/libruby.so.3.4(rb_print_backtrace+0x21) [0x7fcf39c5eaf1] /usr/src/debug/ruby-3.4.0~20241016git3d...
vo.x (Vit Ondruch)
02:08 PM Bug #20865 (Closed): `Stack consistency error` running ActiveSupport test
Trying to build ActiveSupport package for Fedora Rawhide, I have hit the following error for the second time:
~~~
+ ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
/usr/share/gems/gems/minitest-5.25.1/lib/mini...
vo.x (Vit Ondruch)
06:06 PM Bug #20869: IO buffer handling is inconsistent when seeking
Just a quick proof of concept that fixes the first case: https://github.com/ruby/ruby/commit/7481a12fef3df934ab0d9db7f8f2d36341a1562e
But I think a lot more codepath would need to consider and update that new offset for the entire cla...
byroot (Jean Boussier)
05:52 PM Bug #20869: IO buffer handling is inconsistent when seeking
I just looked into this a bit, I'm not quite familiar enough with the code to really propose a fix, but I get what is happening:
ungetbyte just shift the buffer offset, but the FD offset in unchanged.
```c
static void
io_ungetbyte(VALU...
byroot (Jean Boussier)
04:07 PM Bug #20869 (Closed): IO buffer handling is inconsistent when seeking
When performing any of the seek based operations on IO (IO#seek, IO#pos=, or IO#rewind), the read buffer is inconsistently cleared:
```ruby
require 'tempfile'
Tempfile.open do |f|
f.write('0123456789')
f.rewind
# Callin...
javanthropus (Jeremy Bopp)
05:40 PM Feature #20870 (Third Party's Issue): GEM_ROOT -
I know we can set GEM_HOME. If I have multiple rubies installed I would like GEM_HOME to be GEM_ROOT/#{RUBY_ENGINE}/#{RUBY_VERSION} without requiring an external script or wrappper script to run ruby and change environment variables dsisnero (Dominic Sisneros)
05:28 PM Bug #20867: bundle and Gem.user_dir with spaces or require_relative dir with spaces
I don't have RUBYOPT set in my environment -Is bundler setting it? dsisnero (Dominic Sisneros)
04:30 PM Bug #20867: bundle and Gem.user_dir with spaces or require_relative dir with spaces
dsisnero (Dominic Sisneros) wrote:
> Trying to run bundle exec rspec or bundle exec hanami. My username on my work computer has space in it "Dominic E Sisneros" (not by choice). When trying to run I get the following output
> ...
It ...
nobu (Nobuyoshi Nakada)
03:38 PM Bug #20867 (Third Party's Issue): bundle and Gem.user_dir with spaces or require_relative dir with spaces
Trying to run bundle exec rspec or bundle exec hanami. My username on my work computer has space in it "Dominic E Sisneros" (not by choice). When trying to run I get the following output
```
C:\windows_home\ruby\ruby-3.3.4-1\bin\ru...
dsisnero (Dominic Sisneros)
05:00 PM Revision 4120f2ba (git): [ruby/json] Appease ruby/ruby CI
https://github.com/ruby/json/commit/bc2c970ce4 byroot (Jean Boussier)
05:00 PM Revision 633f65e4 (git): [ruby/json] Strip whitespaces
https://github.com/ruby/json/commit/e85107197b byroot (Jean Boussier)
05:00 PM Revision 99872986 (git): Update depend files
byroot (Jean Boussier)
05:00 PM Revision ca8f21ac (git): [ruby/json] Resync
byroot (Jean Boussier)
05:00 PM Revision e8522f06 (git): [ruby/json] Re-enable passing test
https://github.com/ruby/json/commit/82d21f01c5 Eregon (Benoit Daloze)
05:00 PM Revision f664e7ea (git): [ruby/json] Add tests for the behavior of JSON.generate with base types subclasses
Ref: https://github.com/ruby/json/pull/674
Ref: https://github.com/ruby/json/pull/668
The behavior on such case it quite unclear, the goal here is to
figure out whatever was the behavior on Cext version of `json 2.7.0`
and get all imple...
byroot (Jean Boussier)
05:00 PM Revision 2f84a02a (git): [ruby/json] Use rb_str_new_frozen
https://github.com/ruby/json/commit/90c8aaaa6a byroot (Jean Boussier)
05:00 PM Revision ed22e683 (git): [ruby/json] JSON::Ext::Parser mark the name cache entries when not on the heap
This is somewhat dead code as unless you are using `JSON::Parser.new`
direcltly we never allocate `JSON::Ext::Parser` anymore.
But still, we should mark all its reference in case some code out there
uses that.
Followup: #675
https://g...
byroot (Jean Boussier)
05:00 PM Revision 241a0348 (git): Update json gem syncing logic
byroot (Jean Boussier)
04:07 PM Revision 7fe77569 (git): [rubygems/rubygems] Test with JRuby 9.4.9.0
https://github.com/rubygems/rubygems/commit/b282668d9d deivid (David Rodríguez)
03:55 PM Bug #20868 (Closed): Method#hash changes after compaction
Fix: https://github.com/ruby/ruby/pull/12004
The hash value of a Method may change after a compaction but must remain constant because otherwise it may not work as the key in a hash table.
For example:
```ruby
def a; end
# N...
peterzhu2118 (Peter Zhu)
03:52 PM Bug #20753 (Closed): [doc] IO::Buffer examples try to write into readonly buffer returned from IO::Buffer.for
Thanks for your report, this is now fixed. ioquatix (Samuel Williams)
03:36 PM Bug #20762 (Closed): `make test-basic` with -DRGENGC_FORCE_MAJOR_GC is always failure
Applied in changeset commit:git|01e509c45bca9ca5800df36690904f4b883d3292.
----------
Remove RGENGC_FORCE_MAJOR_GC flag
[Bug #20762]
eightbitraptor (Matt V-H)
06:33 AM Bug #20762: `make test-basic` with -DRGENGC_FORCE_MAJOR_GC is always failure
Nobody uses `RGENGC_FORCE_MAJOR_GC` so I'm okay to remove this flag. ko1 (Koichi Sasada)
03:36 PM Revision 01e509c4 (git): Remove RGENGC_FORCE_MAJOR_GC flag
[Bug #20762] eightbitraptor (Matt V-H)
03:15 PM Bug #20866 (Closed): Prism assertion when running simplecov with branch coverage and requiring certain code
I stumbled upon the following bug report against simplecov: https://github.com/simplecov-ruby/simplecov/issues/1113
I reduced the error down to the following:
```rb
# Gemfile
source "https://rubygems.org"
gem "simplecov"
```
...
Earlopain (Earlopain _)
02:04 PM Revision 74fcf437 (git): Use wide character startup
Mingw crt-git 12.0.0.r369.g0d4221712-1 now prohibits "command line
contains characters that are not supported in the active code page".
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/0d42217123d3aec0341b79f6d959c76e09648a1e/
Already R...
nobu (Nobuyoshi Nakada)
01:53 PM Revision ed06f018 (git): [ruby/irb] windows does not support Process.kill("TERM", pid)
(https://github.com/ruby/irb/pull/1026)
https://github.com/ruby/irb/commit/7bbb885163
YO4 (Yoshinao Muramatsu)
11:19 AM Revision e440268d (git): Get rid of JSON benchmarks
byroot (Jean Boussier)
11:19 AM Revision 1cb9f9af (git): tool/sync_default_gems.rb: update json rules
`lib/json/ext/generator/state.rb` should actually be
`ext/json/lib/json/ext/generator/state.rb`
byroot (Jean Boussier)
10:54 AM Misc #20781: DevMeeting-2024-11-07
- [Bug #20863] `zlib.c` calls `rb_str_set_len` and `rb_str_modify_expand`(and others) without holding the GVL (ioquatix)
- Is the PR (https://github.com/ruby/zlib/pull/88) to zlib acceptable?
- [Feature #20877] Introduce (public) debug...
ioquatix (Samuel Williams)
06:05 AM Misc #20781: DevMeeting-2024-11-07
AlexandreMagro (Alexandre Magro) wrote in #note-8:
> * Improves readability by transforming `p(q(r))` into a more natural `r |> q |> p`, matching how we think.
Do you mean `r |> q(_) |> p(_)`?
mame (Yusuke Endoh)
10:48 AM Revision 6c5a808b (git): Use rb_fiber_scheduler_get() instead of rb_fiber_scheduler_current()
rb_fiber_scheduler_current() may return nil depending on whether the
scheduler is being prevented for some reason, e.g., Fiber.blocking{}.
Co-Authored-By: Samuel Williams <samuel.williams@oriontransfer.co.nz>
mame (Yusuke Endoh)
10:47 AM Bug #20863 (Closed): `zlib.c` calls `rb_str_set_len` and `rb_str_modify_expand`(and others) without holding the GVL.
## Background
I was working on https://bugs.ruby-lang.org/issues/20876 and was investigating some problems with `zlib.c` and GVL, and noticed that `zstream_run_func` is executed without the GVL, but can invoke various `rb_` string fun...
ioquatix (Samuel Williams)
09:04 AM Revision cb1c79e8 (git): Name dependency checks job
And run on the latest ubuntu. nobu (Nobuyoshi Nakada)
08:55 AM Revision 7e9c5903 (git): Update dependency
mame (Yusuke Endoh)
08:48 AM Revision 2d2d3630 (git): Let vm_dump show whether the fiber scheduler is enabled or not
... just for the case. mame (Yusuke Endoh)
07:53 AM Feature #20861: Add an environment variable for tuning the default thread quantum
https://github.com/ivoanjo/gvl-tracing/blob/master/examples/rubykaigi2023/rk-example6.rb (from [here](https://ivoanjo.me/rubykaigi2023/#:~:text=Observing%20the%20GVL%20%236)) is probably a good example without `sleep` -- the thread doing... ivoanjo (Ivo Anjo)
07:40 AM Feature #20861: Add an environment variable for tuning the default thread quantum
This example doesn't make sense for the real app because nobody repeat sleeping for the constant.
Do you have any example similar to the example?
But the current 100ms is not based on strong opinion (it equals to Linux time quantum), so...
ko1 (Koichi Sasada)
07:18 AM Feature #20861: Add an environment variable for tuning the default thread quantum
I think this is really nice first step and worth having to enable experimentation as well.
Having said that, I'm not sure there's ever going to be a good value single (even per-thread). It may be worth considering on the medium/long-t...
ivoanjo (Ivo Anjo)
07:16 AM Bug #20767 (Closed): VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation
Maybe fixed by commit:783dde2159a3689ad2d3ef6b7d0005a7cf80adba mame (Yusuke Endoh)
07:14 AM Bug #20813: Segfault in rgengc_check_relation/RVALUE_WB_UNPROTECTED
https://github.com/ruby/ruby/blob/v3_3_5/gc.c#L7529C1-L7530C1
It seems marking `T_STRUCT` fields.
Marking miss for that?
ko1 (Koichi Sasada)
06:37 AM Feature #20738 (Rejected): Removing a specific entry from a hash literal
mame (Yusuke Endoh)
06:35 AM Feature #20775 (Closed): Gemify win32-registry, win32-sspi and win32-resolv
mame (Yusuke Endoh)
06:29 AM Bug #20787 (Closed): IO#readline does not check its arguments like IO#gets and will read more data than limit
Fixed by commit:773d140f65c1c8b726e107915bc003c186f38677 mame (Yusuke Endoh)
06:26 AM Bug #20784 (Closed): `?\` followed by EOF is parsed wrong
mame (Yusuke Endoh)
05:01 AM Revision 348a5341 (git): [ruby/stringio] Copy from the relocated string
When ungetting the string same as the same buffer string, extending
the buffer can move the pointer in the argument. Reported by manun
Manu (manun) at https://hackerone.com/reports/2805165.
https://github.com/ruby/stringio/commit/95c11...
nobu (Nobuyoshi Nakada)
04:19 AM Revision 511954dd (git): [ruby/date] Extract Julian calendar epoch literals
https://github.com/ruby/date/commit/e677e99a86 nobu (Nobuyoshi Nakada)
04:19 AM Revision c51feedb (git): [ruby/date] Update `argc` by `rb_scan_args` not to contain keywords
https://github.com/ruby/date/commit/f277463439 nobu (Nobuyoshi Nakada)
04:19 AM Revision e4f5fd8e (git): [ruby/date] Refine assertions
https://github.com/ruby/date/commit/1970b740d0 nobu (Nobuyoshi Nakada)
03:38 AM Revision ee4599db (git): [ruby/date] Fix incorrect argc2 decrement in datetime_s_iso8601 function
Replace the decrement (argc2--) with an increment (argc2++) for
the correct number of arguments when opt is provided.
https://github.com/ruby/date/commit/b6974b00d8
Dmitrii Zudin
03:15 AM Revision e0611ebd (git): Try macos-15 build
https://github.com/actions/runner-images/issues/10686 hsbt (Hiroshi SHIBATA)
02:02 AM Revision ff560644 (git): Fixup b1fc1af4440. Removed benchmark files from ruby/json
hsbt (Hiroshi SHIBATA)
12:49 AM Revision 75015d4c (git): v3.3.6
k0kubun (Takashi Kokubun)
12:00 AM Revision f72eb702 (git): Skip tests that suddenly started failing for MinGW
These test failures first appeared on irrelevant changes. It probably
came from changes in GitHub Actions instead of CRuby's.
Until we figure out how to fix these tests, let's skip them to make the
CI usable.
k0kubun (Takashi Kokubun)

11/04/2024

11:58 PM Revision b1fc1af4 (git): Stop syncing json benchmarks.
nagachika (Tomoyuki Chikanaga)
10:52 PM Revision 7237ded9 (git): macos-12 is deprecated and fails on Mondays
https://github.com/actions/runner-images/issues/10721 k0kubun (Takashi Kokubun)
10:51 PM Revision d6d2c247 (git): macos-12 is deprecated and fails on Mondays
https://github.com/actions/runner-images/issues/10721 k0kubun (Takashi Kokubun)
10:43 PM Bug #20853: Hash key retrieval after Process.warmup
ruby_3_3 commit:6db39f4677ff50aacfe54bd9dda052c09e1c6ab0 merged revision(s) commit:29c480dd6fca993590c82078ba797e2c4e876ac7. k0kubun (Takashi Kokubun)
10:43 PM Revision 6db39f46 (git): merge revision(s) 29c480dd6fca993590c82078ba797e2c4e876ac7: [Backport #20853]
[Bug #20853] Fix Proc#hash to not change after compaction
The hash value of a Proc must remain constant after a compaction, otherwise
it may not work as the key in a hash table.
k0kubun (Takashi Kokubun)
10:43 PM Bug #20716: Different instance_method behavior in Ruby 2.7 and Ruby 3.x
ruby_3_3 commit:edeb0319f7a95dfe3f9b895bcf32371dd8514726 merged revision(s) commit:6118e8a47394409b53164b60e79fadf348b97db3. k0kubun (Takashi Kokubun)
10:42 PM Revision edeb0319 (git): merge revision(s) 6118e8a47394409b53164b60e79fadf348b97db3: [Backport #20716]
Fix method caching bug when including/prepend module A that prepends module B
Fix by always adding the generated iclass to the subclasses list,
otherwise the method cache for the iclass is not cleared when
the me...
k0kubun (Takashi Kokubun)
10:42 PM Bug #20797: UTC offset seconds part is not checked
I feel the same about it. This is gonna be a WONTFIX for `ruby_3_3` too. k0kubun (Takashi Kokubun)
10:39 PM Bug #20755: IO::Buffer#transfer transfers mutable reference to String's memory but not lock ownership
ruby_3_3 commit:5ce0ba0d415deb99527c409cc5f1df16ce02ef3e merged revision(s) commit:35e124832e29b65c84d4e0e4e434616859f9bdf5. k0kubun (Takashi Kokubun)
10:39 PM Revision 5ce0ba0d (git): merge revision(s) 35e124832e29b65c84d4e0e4e434616859f9bdf5: [Backport #20755]
[Bug #20755] Frozen string should not be writable via IO::Buffer k0kubun (Takashi Kokubun)
10:38 PM Bug #20752: IO::Buffer#slice creates mutable IO::Buffer instance that points to readonly memory (e.g. fronzen String)
ruby_3_3 commit:12ea98e8c8af0ed6778aad26e7ec5f95e2c239e5 merged revision(s) commit:637067440f74043c6d79fc649ab8acf1afea25a5. k0kubun (Takashi Kokubun)
10:38 PM Revision 12ea98e8 (git): merge revision(s) 637067440f74043c6d79fc649ab8acf1afea25a5: [Backport #20752]
[Bug #20752] Slice of readonly `IO::Buffer` also should be readonly k0kubun (Takashi Kokubun)
10:37 PM Bug #20719: `Float` converts ASCII-incompatible string
ruby_3_3 commit:34a0f41d0aaff190f1647a6fa0e905690d0eff98 merged revision(s) commit:c1862cbb89a6bf42dcd07d92fe4f4bfeebca5775. k0kubun (Takashi Kokubun)
10:37 PM Revision 34a0f41d (git): merge revision(s) c1862cbb89a6bf42dcd07d92fe4f4bfeebca5775: [Backport #20719]
[Bug #20719] `Float` argument must be ASCII compatible k0kubun (Takashi Kokubun)
10:36 PM Bug #20704: Windows: `-C` option does not work for multibyte path name
ruby_3_3 commit:2b713dcb89c620daa55d672d2933ffde333ca5de merged revision(s) commit:d33e3d47b84a73b38644f2a3d41881ce9be6ef18. k0kubun (Takashi Kokubun)
10:36 PM Revision 2b713dcb (git): merge revision(s) d33e3d47b84a73b38644f2a3d41881ce9be6ef18: [Backport #20704]
[Bug #20704] Win32: Fix chdir to non-ASCII path
On Windows, `chdir` in compilers' runtime libraries uses the active
code page, but command line arguments in ruby are always UTF-8, since
commit:33ea2646b98adb49ae2...
k0kubun (Takashi Kokubun)
10:32 PM Bug #20501: ruby SEGV
Backporting this patch (https://github.com/ruby/ruby/pull/11554) to `ruby_3_3` causes a lot of conflicts. Please file a PR to `ruby_3_3` branch on GitHub for this ticket to be backported. k0kubun (Takashi Kokubun)
10:29 PM Bug #20777: 3.3: `RUBY_DESCRIPTION` is corrupt when `--yjit` and `--parser=prism`
ruby_3_3 commit:e7c939aea1034a463226635e11117ade42cba4e4 merged revision(s) commit:76ea5cde2a0f4834a5228104249b6b3346ddfc94. k0kubun (Takashi Kokubun)
10:29 PM Revision e7c939ae (git): merge revision(s) 76ea5cde2a0f4834a5228104249b6b3346ddfc94: [Backport #20777]
Refactor RUBY_DESCRIPTION assertions in test_rubyoptions k0kubun (Takashi Kokubun)
10:26 PM Bug #13831: error when try to install
ruby_3_3 commit:7446f7cdd103b129b8b750f577efd29e069176c0 merged revision(s) commit:0d16c36d0ab2afa2ec79b72b229e69c141ebdaba. k0kubun (Takashi Kokubun)
10:26 PM Revision 7446f7cd (git): merge revision(s) 0d16c36d0ab2afa2ec79b72b229e69c141ebdaba: [Backport #13831]
[win32/registry] Fallback to UTF-8 for unknown codepages
There are some codepages like cp708 for which no ruby encoding exists:
$ ruby -e "Encoding.find('cp708')"
Traceback (most recent call last):
...
jcalvert (Jonathan Calvert)
10:23 PM Bug #20723: `IO#close` is broken on Ruby 3.3+ when using the Fiber scheduler.
ruby_3_3 commit:5b6009870dff883a8e71a05e60f175cea1d00d55. k0kubun (Takashi Kokubun)
10:22 PM Bug #20721: Gem executables have a .lock file in Ruby 3.3.5
rubygems v3.5.19 has been merged to `ruby_3_3` https://github.com/ruby/ruby/pull/11682, which addresses this issue. k0kubun (Takashi Kokubun)
10:18 PM Bug #20718: Objects created with Data_Make_Struct and the default free function are not freed
ruby_3_3 commit:55ddfd58dd6e67e88cf9a3e55bf99550affe8b3f. k0kubun (Takashi Kokubun)
08:03 PM Bug #20856: Incorrect and inconsistent multi-thread eval execution with Prism compiler
Thanks for the report, it should be fixed by https://github.com/ruby/ruby/pull/11993. kddnewton (Kevin Newton)
05:34 PM Revision 7ae4b858 (git): [ruby/rdoc] Display class ancestors in the sidebar #1183
https://github.com/ruby/rdoc/commit/50dda13426 akexus (Alexis Bernard)
04:14 PM Revision 478e0fc7 (git): YJIT: Replace Array#each only when YJIT is enabled (#11955)
* YJIT: Replace Array#each only when YJIT is enabled
* Add comments about BUILTIN_ATTR_C_TRACE
* Make Ruby Array#each available with --yjit as well
* Fix all paths that expect a C location
* Use method_basic_definition_p to detect pa...
k0kubun (Takashi Kokubun)
02:32 PM Revision 51ac9301 (git): Fix a typo in a local variable name
nobu (Nobuyoshi Nakada)
02:32 PM Revision 4dc120cb (git): Fix Dir.mktmpdir argument
The temporary directory is the second argument. nobu (Nobuyoshi Nakada)
01:37 PM Revision 1e037108 (git): Precompute hash only once when interning string literals
When a fake string is interned, use the capa field to store the string
hash. This lets us compute it once for hash lookup and embedding the
hash in the interned string.
Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
etienne (Étienne Barrié)
12:12 PM Revision 09874e90 (git): Mingw: Exclude failing tests due to the crt change
Mingw crt-git 12.0.0.r369.g0d4221712-1 now prohibits "command line
contains characters that are not supported in the active code page".
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/0d42217123d3aec0341b79f6d959c76e09648a1e/
Provision...
nobu (Nobuyoshi Nakada)
12:12 PM Bug #20506: YJIT build error on aarch64 with Rust 1.78.0
Thanks for the reply, I appreciate that! It's not urgent or anything, I was just a bit uncertain if musl may be some other issue entirely. I'll follow https://github.com/llvm/llvm-project/issues/114720 and be on the lookout for something... Earlopain (Earlopain _)
12:06 PM Feature #20859: Make Base64 to core class
I think these are two separate issues, so maybe better implement/discuss in two separate steps?
* One would be something like "Making `base64` a bundled gem caused too much trouble, let's revert that". This seems straightforward to fi...
deivid (David Rodríguez)
10:18 AM Revision e7518a78 (git): Validate user input encoding
If the user has the encoding of her system messed up, she may end up
sending us incorrectly encoding input, causing "invalid byte sequence in
UTF-8" errors at random places.
These errors can be forced on a system without encoding issues...
deivid (David Rodríguez)
10:04 AM Revision 9ce1b5e1 (git): [rubygems/rubygems] Fix commands with 2 MFA requests when webauthn is enabled
If a command requires two MFA authenticated requests, and webauthn is
enabled, then first one will succeed but the second one will fail
because it tries to reuse the OTP code from the first request and that
does not work.
This happens w...
deivid (David Rodríguez)
10:04 AM Revision 1b190b34 (git): [rubygems/rubygems] TermError should inherit from SystemExit
The `gem owner` command rescues standard errors, but does not rescue
SystemExit errors. If TermError is a standard error, not a system exit,
tests don't behave like realworld for this command.
https://github.com/rubygems/rubygems/commit...
deivid (David Rodríguez)
10:04 AM Revision 7fba517d (git): [rubygems/rubygems] OTP is already added by `rubygems_api_request`
https://github.com/rubygems/rubygems/commit/15930fe126 deivid (David Rodríguez)
10:04 AM Revision 50dbe19b (git): [rubygems/rubygems] Fix incompatible encodings error
https://github.com/rubygems/rubygems/commit/d478ec403f deivid (David Rodríguez)
08:11 AM Feature #20861: Add an environment variable for tuning the default thread quantum
> Thread priority is good because it is more abstract, which gives flexibility on implementation.
Then we should document what it does, even if stated that the behavior may change between version. Because in its current state it's pre...
byroot (Jean Boussier)
04:24 AM Feature #20861: Add an environment variable for tuning the default thread quantum
I don't think we should expose the quantum per-thread inside Ruby. I worry it will prevent future improvements. The fact that Thread scheduling and priorities are currently done by giving a shorter/longer quantum is an implementation det... jhawthorn (John Hawthorn)

11/03/2024

11:28 PM Bug #20506: YJIT build error on aarch64 with Rust 1.78.0
I tested 1.82.0 from rustup and [rust-lang/rust#125619](https://github.com/rust-lang/rust/issues/125619)
does reproduce when targeting aarch64-unknown-linux-musl. I was under the
impression that we've worked around the issue for all targ...
alanwu (Alan Wu)
03:49 PM Bug #20506: YJIT build error on aarch64 with Rust 1.78.0
Yes, guilty as charged. I apologize, I only saw the failure for one variant and assumed the same for others.
Can you say if what I wrote above is correct for musl? I guess I'll see when the next version releases regardless.
Edit: Hm, I...
Earlopain (Earlopain _)
03:05 PM Bug #20506: YJIT build error on aarch64 with Rust 1.78.0
@Earlopain Are you using musl through e.g. Alpine Linux? The workaround rust PR is <https://github.com/rust-lang/rust/pull/125999>, it shipped in 1.81.0 and we've seen it [work](https://github.com/Shopify/ruby/issues/559#issuecomment-241... alanwu (Alan Wu)
10:36 AM Bug #20506: YJIT build error on aarch64 with Rust 1.78.0
Small update, I believe https://github.com/rust-lang/rust/pull/131221 will fix this, which is slated for Rust 1.83. Not so sure about that since the actual fix seems to have been applied in llvm https://github.com/llvm/llvm-project/pull/... Earlopain (Earlopain _)
09:21 PM Misc #20781: DevMeeting-2024-11-07
* [Feature #20770] (Re)Introduce pipe operator (AlexandreMagro)
* Initially proposed as syntactic sugar for `.then`, and later refined after discussion to work as a statement separator (like `;`) with a variable carrying the LHS expres...
AlexandreMagro (Alexandre Magro)
06:43 PM Revision 21af248f (git): [ruby/prism] Error for def ivar
https://github.com/ruby/prism/commit/232a02acef kddnewton (Kevin Newton)

11/02/2024

09:25 PM Revision 3e2ee990 (git): Skip TestProc#test_hash_does_not_change_after_compaction if compaction is not supported
peterzhu2118 (Peter Zhu)
08:34 PM Feature #20861: Add an environment variable for tuning the default thread quantum
byroot (Jean Boussier) wrote in #note-6:
> > Are you thinking something different (like specify quantum in time rather than priority?)
> ...
Makes sense, and I agree.
> But perhaps a `Thread.default_quantum = XX` would be needed too...
tenderlovemaking (Aaron Patterson)
08:02 PM Feature #20861: Add an environment variable for tuning the default thread quantum
> Are you thinking something different (like specify quantum in time rather than priority?)
Yes, quite literally: `Thread.current.quantum = 20` or something like that.
Which IMO is much easier to reason about than priorities. And g...
byroot (Jean Boussier)
07:58 PM Feature #20861: Add an environment variable for tuning the default thread quantum
ioquatix (Samuel Williams) wrote in #note-2:
> This can be useful, so I agree with adding it.
> ...
Thank you for the feedback, but I think these points should be addressed as a different feature. I do think the default quantum should...
tenderlovemaking (Aaron Patterson)
06:43 AM Feature #20861: Add an environment variable for tuning the default thread quantum
This was discussed a few times at Kaigi, and IMO a quantum value on a per thread basis would make more sense. byroot (Jean Boussier)
03:03 AM Feature #20861: Add an environment variable for tuning the default thread quantum
Your patch misses pthread_win32.c, and if we add a new environment variable, man/ruby.1 must be updated as well. nobu (Nobuyoshi Nakada)
01:33 AM Feature #20861: Add an environment variable for tuning the default thread quantum
This can be useful, so I agree with adding it.
For the sake of providing feedback, some thoughts:
1. Does the default value of 100ms make sense? Should we update the default too?
2. Should we mark this as experimental in the first...
ioquatix (Samuel Williams)
02:34 PM Bug #20862 (Closed): gem install --document=rdoc,ri fails with some gem
With using commit:24f7829abfd29fc226e38829caaecaa76885afbf , trying `$ gem install --document=rdoc,ri foo.gem` fails with some (not one) gem like:
```
$ gem install -V --document=rdoc,ri tk
...
...
ERROR: While executing gem ... ...
mtasaka (Mamoru TASAKA)
01:27 PM Revision e2909570 (git): Include windows.h for `LONG` and `Interlocked` functions
nobu (Nobuyoshi Nakada)
03:04 AM Revision 24f7829a (git): Fix the conditional macro name [ci skip]
`RUBY_VM_CRITICAL_SECTION` is not used anywhere. nobu (Nobuyoshi Nakada)
01:44 AM Revision 4031beb0 (git): Add documentation for `RUBY_ASSERT_CRITICAL_SECTION`. (#11982)
Samuel Williams
12:18 AM Bug #20722 (Closed): curious search result order on docs.ruby-lang.org
jeremyevans0 (Jeremy Evans)
 

Also available in: Atom