Project

General

Profile

Activity

From 12/29/2021 to 01/04/2022

01/04/2022

11:18 PM Revision 13241b71 (git): Fix failures on ruby 3.1
Because https://github.com/ruby/ruby/pull/5148 merged after Ruby 3.1.0 released.
https://github.com/ruby/actions/runs/4705986643?check_suite_focus=true#step:18:144
```
1)
Method#parameters adds * rest arg for "star" argument FAILED
...
znz (Kazuhiro NISHIYAMA)
10:53 PM Feature #18181: Introduce Enumerable#min_with_value, max_with_value, and minmax_with_value
For a single value, a "then" suffix might be nice.
``` ruby
%w(abcde fg hijk).min_by(&:size)
#=> "fg"
%w(abcde fg hijk).min_by_then(&:size)
#=> 2
```
It mirrors #min_by and #then with the same block.
``` ruby
%w(abcde fg...
shan (Shannon Skipper)
10:25 PM Revision d1a91076 (git): [rubygems/rubygems] Fix race conditon on JRuby
On JRuby, sometimes we get the following error in CI when running a
realworld test that checks that `gem install rails` succeeds:
```
ERROR: While executing gem ... (NoMethodError)
undefined method `ignored=' for nil:NilClass
...
deivid (David Rodríguez)
08:42 PM Bug #18436 (Closed): Fix Pathname dot directory globbing
Applied in changeset commit:git|5917f49ad03cd3b2c13d3eea85c969a113b83bf8.
----------
Fix documentation for Dir.glob
Dir.glob("*", File::FNM_DOTMATCH) no longer includes ".." in the
returned array as of Ruby 3.1.
Fixes [Bug #18436]
jeremyevans (Jeremy Evans)
08:38 PM Bug #18436: Fix Pathname dot directory globbing
The glob difference between Ruby 3.0 and 3.1 is expected, as the change was made to fix bug #17280. Looks like the documentation needs to be updated to reflect the change. I'll take care of that shortly. jeremyevans0 (Jeremy Evans)
08:38 PM Revision 5917f49a (git): Fix documentation for Dir.glob
Dir.glob("*", File::FNM_DOTMATCH) no longer includes ".." in the
returned array as of Ruby 3.1.
Fixes [Bug #18436]
jeremyevans (Jeremy Evans)
08:20 PM Bug #18449 (Rejected): Bug in 3.1 regexp literals with \c
jeremyevans0 (Jeremy Evans)
08:15 PM Bug #18432 (Rejected): case ... when bug if add a extra comma on the end of condition.
jeremyevans0 (Jeremy Evans)
07:46 PM Revision 44379805 (git): Fix crash on bootup when RGENGC_CHECK_MODE=2 with GC stress
We need to unshare the array loaded_features because the shared root
could be old gen (while loaded_features is young) which causes a WB
miss.
peterzhu2118 (Peter Zhu)
07:28 PM Feature #18459 (Closed): IRB autocomplete dropdown colour options
It would be great to be able to specify bg/fg colours for the new autocomplete dropdown in irb in ruby 3.1. This could help for accessibility purposes, or for anyone who just wants to make it look more personalised for their terminal 😎
...
johansenjaa (Joseph Johansen)
06:57 PM Revision 9c15da0f (git): Enhanced RDoc for IO (#5381)
Treats:
#lineno
#lineno=
#readline
#readlines
#each_line
#each_byte
#each_char
#each_codepoint
burdettelamar (Burdette Lamar)
06:03 PM Bug #18458 (Closed): Segmentation fault when missing Warning#warn method
Applied in changeset commit:git|9e0a91d0640600f2dfd7fc1d5fae6667019c9ca5.
----------
Don't segfault if Warning.warn is undefined
Check that there is a method entry for the method before passing
it to rb_method_entry_arity.
Fixes [Bug ...
jeremyevans (Jeremy Evans)
05:15 PM Bug #18458: Segmentation fault when missing Warning#warn method
Pull requested submitted to fix this: https://github.com/ruby/ruby/pull/5391 jeremyevans0 (Jeremy Evans)
02:21 PM Bug #18458 (Closed): Segmentation fault when missing Warning#warn method
If you remove the `Warning#warn` method and call `Kernel#warn`, you get a segmentation fault:
ruby 3.1.0:
```
$ ruby -e 'Warning.undef_method(:warn); warn ""' 2>&1 | head -2 ...
etienne (Étienne Barrié)
06:03 PM Revision 9e0a91d0 (git): Don't segfault if Warning.warn is undefined
Check that there is a method entry for the method before passing
it to rb_method_entry_arity.
Fixes [Bug #18458]
jeremyevans (Jeremy Evans)
03:28 PM Revision e7806049 (git): * 2022-01-05 [ci skip]
git[bot]
03:27 PM Revision ad007bc6 (git): Switch `is_pointer_to_heap` to use library bsearch
This commit switches from a custom implemented bsearch algorithm to
use the one provided by the C standard library.
Because `is_pointer_to_heap` will only return true if the pointer
being searched for is a valid slot starting address wi...
eightbitraptor (Matt V-H)
02:48 PM Feature #18364 (Closed): Add GC.stat_pool for Variable Width Allocation
Applied in changeset commit:git|615e9b28658c5b44a4474e04a53b84ae83b8e3fd.
----------
[Feature #18364] Add GC.stat_heap to get stats for memory heaps
GC.stat_heap will return stats for memory heaps. This is
used for the Variable Width A...
peterzhu2118 (Peter Zhu)
02:46 PM Revision 615e9b28 (git): [Feature #18364] Add GC.stat_heap to get stats for memory heaps
GC.stat_heap will return stats for memory heaps. This is
used for the Variable Width Allocation feature.
peterzhu2118 (Peter Zhu)
02:18 PM Revision e9a4cc02 (git): [ruby/error_highlight] Add a test to check if it is robust against a spoofed filename
Previously, RubyVM::AST.of opened a wrong file if the iseq's file path is spoofed.
```
module Dummy
binding.irb
end
```
```
$ ruby test.rb
From: test.rb @ line 2 :
1: module Dummy
=> 2: binding.irb
3: end
irb(Dummy):001...
mame (Yusuke Endoh)
02:09 PM Revision 11b1ebe6 (git): [ruby/error_highlight] Fix the spurious TypeError.
When we have no backtrace locations, we can't have the highlight,
so just return the message.
https://github.com/ruby/error_highlight/commit/9f5c639494
Christian Boos
02:09 PM Revision e22218b5 (git): [ruby/error_highlight] Reproduce the error seen when calling .to_s in embedded Ruby
The test fails with the following error:
Error: test_simulate_funcallv_from_embedded_ruby(ErrorHighlightTest): TypeError: wrong argument type nil (expected method)
https://github.com/ruby/error_highlight/commit/52943c9cd2
Christian Boos
11:09 AM Feature #18136: take_while_after
`take_until`, from reading the method name, clearly implies to me including the element for which the condition became true, i.e., it includes that "last" element, like `1..3` includes `3`.
But if that's too confusing for others then it...
Eregon (Benoit Daloze)
10:59 AM Feature #16663: Add block or filtered forms of Kernel#caller to allow early bail-out
I also think the approach of yielding an enumerable while smart looks really complicated to implement properly, and I could imagine it might cause issues in some VMs.
Also if I understand correctly, that would mean `enum.each` would star...
Eregon (Benoit Daloze)
08:52 AM Revision b673e9a3 (git): Fix the previous commit
mame (Yusuke Endoh)
08:45 AM Bug #18454: YJIT slowing down key Discourse benchmarks
What about YJIT_STATS=1 ? That's the part that will tell us why it's slower.
> Oddly bootsnap may be causing an RSS increase 338 -> 370 (on 2.7.5 290 -> 315)
RSS isn't necessarily the best mesure, but yes bootsnap incur increased m...
byroot (Jean Boussier)
02:29 AM Bug #18454: YJIT slowing down key Discourse benchmarks
@k0kubun already doing 20 iterations as a warmup, so it is not likely :cry: https://github.com/discourse/discourse/blob/bbca25e875c36d3541b22c520b6d56ae6322dfbe/script/bench.rb#L192-L192
@byroot @noahgibbs this is a tough one Ruby ...
sam.saffron (Sam Saffron)
08:34 AM Revision 426ddbff (git): test/ruby/test_method.rb: Fix a random failure during `make COVERAGE=1`
This fixes the following failure.
```
1) Error:
TestMethod#test_method_list:
NoMethodError: undefined method `<=>' for #<BasicObject:0x00007f7757e7eb60>
mods = mods.sort_by {|m| m.name }
^^^^^^^^
```
https://gith...
mame (Yusuke Endoh)
08:25 AM Revision 47bf64a2 (git): Use omit instead of skip: test/ruby/**/*.rb
hsbt (Hiroshi SHIBATA)
07:38 AM Revision f0669fb6 (git): [ruby/optparse] Use `require_relative` for internal requires (https://github.com/ruby/optparse/pull/28)
https://github.com/ruby/optparse/commit/e4f2682128 deivid (David Rodríguez)
06:31 AM Misc #18399: DevMeeting-2022-01-13
* [Feature #18438] Add `Exception#additional_message` to show additional error information (mame)
* I'd like to apply error_highlight more exceptions than NameError, but it will break some existing tests that check the return value of...
mame (Yusuke Endoh)
05:59 AM Revision 5074aa19 (git): [rubygems/rubygems] Test the actual checksums of the mock gems
https://github.com/rubygems/rubygems/commit/2b42630959 nobu (Nobuyoshi Nakada)
05:59 AM Revision 0bfb406b (git): [rubygems/rubygems] Fix the test to use the mock gem path
"NUL.*" means the NUL device on Windows, as well as mere "NUL",
and no data is read.
https://github.com/rubygems/rubygems/commit/e2c7d22745
nobu (Nobuyoshi Nakada)
05:59 AM Revision 8f962374 (git): [rubygems/rubygems] Append a newline to the checksum file
https://github.com/rubygems/rubygems/commit/48ea2778e9 nobu (Nobuyoshi Nakada)
05:59 AM Revision c2e8e1f6 (git): [rubygems/rubygems] Fix checksum
Calculate the checksum of the content, not the given pathname at
the build time itself.
https://github.com/rubygems/rubygems/commit/b60ee97ee9
nobu (Nobuyoshi Nakada)

01/03/2022

11:25 PM Revision 67612dad (git): [ruby/net-http] Handle invalid use of IP addresses in SNI
Server Name Indication does not allow IP addresses (RFC 6066, section 3:
`Literal IPv4 and IPv6 addresses are not permitted in "HostName".`).
Recent versions of LibreSSL enforce this restriction, which raises
when setting the hostname t...
jeremyevans (Jeremy Evans)
08:11 PM Revision 8d6e4f15 (git): * 2022-01-04 [ci skip]
git[bot]
07:36 PM Feature #18136: take_while_after
`until` is the negative of `while`, so I would expect `take_until{cond}` (or the synonym `take_till`) to behave like `take_while{!cond}`. So `(1..9).take_until{_1==5}` would/should produce `[1,2,3,4]`, unlike the current proposal to get ... Dan0042 (Daniel DeLorme)
01:52 PM Feature #18136: take_while_after
I recently wanted to have something like this for advent of code, and worked around by using `Enumerator.produce + find + side effect` but it feels clearly less elegant.
https://github.com/eregon/adventofcode/blob/a582daa1f2c549d459d6b0...
Eregon (Benoit Daloze)
06:22 PM Misc #18399: DevMeeting-2022-01-13
* [Bug #15928] Constant declaration does not conform to JIS 3017:2013 (jeremyevans0)
* This was discussed at the May 2021 developer meeting, and it was decided to wait until after 3.1.
* This makes constant assignment consistent wi...
jeremyevans0 (Jeremy Evans)
06:16 PM Feature #16663: Add block or filtered forms of Kernel#caller to allow early bail-out
headius (Charles Nutter) wrote in #note-15:
> Yes I botched that part of my example. The Enumerable would have to be yielded to a block and used within that block. My example done right would be more like:
> ...
I think this approach o...
jeremyevans0 (Jeremy Evans)
06:13 PM Bug #18431: Ruby 2.6.9, bundler 1.17.2 and CVE-2021-43809
I see, I agree more with GitHub assessment.
If I understand correctly, ruby 2.6 will be declared as EOL soon, so it seems fine to me to way for that to happen and don't take any action. Users who want to stick to Ruby 2.6 but use a fi...
deivid (David Rodríguez)
10:19 AM Bug #18431: Ruby 2.6.9, bundler 1.17.2 and CVE-2021-43809
deivid (David Rodríguez) wrote in #note-3:
> How is the score for vulnerabilities calculated? I tried to set the score myself to "Low" in the Github Advisory, because the chances that this issue is ever explored seemed very low to me. I...
npic1 (Nat Pic1)
05:43 PM Revision 3ae8b115 (git): YJIT: Fix confusing self reference when initializing variable
alanwu (Alan Wu)
05:43 PM Revision c7177288 (git): YJIT: Refine comments
Correct method name, fix copypasta, and add an ASCII illustration.
[ci skip]
alanwu (Alan Wu)
02:13 PM Bug #18454: YJIT slowing down key Discourse benchmarks
Possibly related: YJIT released 3.1 was breaking Rails caching: https://bugs.ruby-lang.org/issues/18453 noahgibbs (Noah Gibbs)
01:33 PM Revision 980bf94f (git): Kernel#=~: delete
Has been deprecated since ebff9dc10e6e72239c23e50acc7d3cbfdc659e7a. shyouhei (Shyouhei Urabe)
01:00 PM Bug #18457 (Closed): ruby 2.7.5 fiddle/types.rb use uint32_t but fiddle/cparser.rb lacks uint32_t
```
C:\src\git\reline>bundle exec rake test_yamatanooroti
Traceback (most recent call last):
17: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/rake_test_loader.rb:6:in `<main>'
16: from C:/Ruby27-x6...
YO4 (Yoshinao Muramatsu)

01/02/2022

10:06 PM Revision 3ff762cc (git): * 2022-01-03 [ci skip]
git[bot]
10:06 PM Revision 66e92561 (git): [ruby/reline] Remove test TODO comments that have been confirmed by E2E tests
https://github.com/ruby/reline/commit/2ed77b693f aycabta (aycabta .)
11:24 AM Revision c8694303 (git): Update RBS to skip testing `Kernel#=~` (#5386)
soutaro (Soutaro Matsumoto)
08:47 AM Revision 03d97cc9 (git): Remove UTF-8 from documentation.
Samuel Williams
08:43 AM Revision e7c2d5cc (git): [DOC] Adjust IO::Buffer docs (#5374)
zverok (Victor Shepelev)
08:22 AM Bug #18132: TODO: fix ccan/list thread safety
Can you explain what VM list has a problem? ioquatix (Samuel Williams)
06:16 AM Revision 1136985c (git): [ruby/etc] Note for rb_deprecate_constant [ci skip]
https://github.com/ruby/etc/commit/f87fe7ad93 nobu (Nobuyoshi Nakada)
06:06 AM Revision 30c03f9e (git): Update default gems list at 6f53425825eb71d71c7fdd424801a2 [ci skip]
git[bot]
06:05 AM Revision 6f534258 (git): NEWS: Removed constants
nobu (Nobuyoshi Nakada)
06:03 AM Revision 46207961 (git): [ruby/etc] Remove deprecate constants under Struct
https://github.com/ruby/etc/commit/143edbd215 nobu (Nobuyoshi Nakada)
06:03 AM Revision eb294491 (git): [ruby/etc] bump up to 1.4.0
https://github.com/ruby/etc/commit/ca41f182f6 nobu (Nobuyoshi Nakada)
05:52 AM Revision 91d09ca9 (git): [ruby/etc] bump up to 1.3.1
https://github.com/ruby/etc/commit/82dd69a4cf nobu (Nobuyoshi Nakada)
05:52 AM Revision bb0a725f (git): [ruby/etc] [DOC] Refine Etc::Passwd#passwd description
https://github.com/ruby/etc/commit/17b99fe42e nobu (Nobuyoshi Nakada)
05:52 AM Revision 314effdf (git): [ruby/etc] [DOC] Document Etc::Passwd and Etc::Group as classes
https://github.com/ruby/etc/commit/106429f10b nobu (Nobuyoshi Nakada)
05:52 AM Revision 9135a3e8 (git): [ruby/etc] [DOC] Add document task
https://github.com/ruby/etc/commit/8c8c6198e2 nobu (Nobuyoshi Nakada)
04:29 AM Revision 546dbcfe (git): [ruby/etc] Update ruby versions
https://github.com/ruby/etc/commit/959416b18a nobu (Nobuyoshi Nakada)
02:44 AM Revision 76181ae9 (git): [ruby/reline] Check capname of tigetstr/tigetflag/tigetnum
Incorrect arguments can cause SEGV.
https://github.com/ruby/reline/commit/a58748bcf9
aycabta (aycabta .)
02:44 AM Revision f375b641 (git): [ruby/reline] Add test_tigetstr_with_error
https://github.com/ruby/reline/commit/1ca779740a aycabta (aycabta .)
02:29 AM Revision b2a88063 (git): Update default gems list at 6d1b406dc8dea6f618ae14899dc6b7 [ci skip]
git[bot]
02:24 AM Revision 6d1b406d (git): [ruby/reline] Version 0.3.1
https://github.com/ruby/reline/commit/9ab5850444 aycabta (aycabta .)
01:29 AM Misc #18399: DevMeeting-2022-01-13
- [Bug #18294] error when parsing regexp comment (Martin Dürst)
- We should decide whether this is spec, or to make parsing easier, or a bug.
duerst (Martin Dürst)
01:27 AM Revision 85f304b9 (git): [ruby/reline] Implement Reline::Terminfo.tigetnum
https://github.com/ruby/reline/commit/695212d5d2 aycabta (aycabta .)

01/01/2022

11:15 PM Bug #18456 (Closed): rdoc non-determinism: module includes can be added once or twice to generated .ri
We're observing a sporadically occurring non-determinism in generated .ri files:
```
[ak@localhost ruby-repro]$ ri --dump=./oe-reproducible-20211214-gj4vndgo/packages-excluded/reproducibleA/tmp/deploy/rpm/core2_64/usr/share/ri/3.0.0/...
alex.kanavin@gmail.com (Alexander Kanavin)
05:04 PM Revision 071653ec (git): Run the prerequisites of test-bundled-gems in order
nobu (Nobuyoshi Nakada)
03:40 PM Revision fa5b32f1 (git): * 2022-01-02 [ci skip]
git[bot]
03:39 PM Revision 530586fa (git): [ruby/reline] Fix the difinition of tigetflag() in comment...
https://github.com/ruby/reline/commit/af4d77ba09 aycabta (aycabta .)
02:13 PM Revision 0af9eab0 (git): [ruby/reline] Consolidate tests that were unnecessarily divided
https://github.com/ruby/reline/commit/62eec42e4a aycabta (aycabta .)
02:12 PM Revision 7deee741 (git): [ruby/reline] Remove unnecessary qualifiers on definition of comments
https://github.com/ruby/reline/commit/abc1e4ee88 aycabta (aycabta .)
02:06 PM Revision 6300c4dc (git): [ruby/reline] Implement Reline::Terminfo.tigetflag
https://github.com/ruby/reline/commit/0451ed7a28 aycabta (aycabta .)
12:30 PM Feature #12901: Anonymous functions without scope lookup overhead
One more reason for having an isolated kind of Proc is using it with an implicit block argument - for `define_method` or for some other metaprogramming. For example, `yield` in this code is incorrect due to the scope capturing problem:
...
cvss (Kirill Vechera)
12:10 PM Bug #18455: `IO#close` has poor performance and difficult to understand semantics.
Ah, the difference is thread `t` won't be interrupted anymore, but `close(2)` probably stops the blocking read.
@ioquatix So what's the result of the two snippets after this patch?
Eregon (Benoit Daloze)
11:10 AM Bug #18455: `IO#close` has poor performance and difficult to understand semantics.
Nice, I thought this logic was already per IO instance.
I don't see how it will change anything about `this leads to strange behaviour` though.
Which is fine because it seems unavoidable as long as `IO.for_fd(fd)` exists.
`IO.for_fd(fd...
Eregon (Benoit Daloze)
07:17 AM Bug #18455: `IO#close` has poor performance and difficult to understand semantics.
Here is the PR: https://github.com/ruby/ruby/pull/5384 ioquatix (Samuel Williams)
07:13 AM Bug #18455 (Closed): `IO#close` has poor performance and difficult to understand semantics.
`IO#close` should be responsible for closing the file descriptor referred to by the IO instance. When dealing with buffered IO, one can also expect this to flush the internal buffers if possible.
Currently, all blocking IO operations ...
ioquatix (Samuel Williams)
11:51 AM Bug #18454: YJIT slowing down key Discourse benchmarks
> Any ideas on what we should test here and how to narrow this down?
You could compile Ruby with `YJIT_STATS=1` to have a break down of why and how much YJIT exit back to the interpreter. It's possible that you have some hotspots usin...
byroot (Jean Boussier)
11:49 AM Feature #18438: Add `Exception#additional_message` to show additional error information
@mame Thanks for making this proposal, I believe it goes in the right direction.
Dan0042 (Daniel DeLorme) wrote in #note-6:
> I had the same thought initially but there's a hiccup: the description needed by full_message should includ...
Eregon (Benoit Daloze)
09:55 AM Revision fae0b664 (git): Remove deprecated Random::DEFAULT [Feature #17351]
nobu (Nobuyoshi Nakada)
09:55 AM Revision 84891bff (git): Remove unnecessary Random::DEFAULT expectations
The respond_to expectation just suffice as duck-typing. nobu (Nobuyoshi Nakada)
08:02 AM Revision 789da481 (git): Prefer RBOOL
nobu (Nobuyoshi Nakada)
08:02 AM Revision 069cca6f (git): Negative RBOOL usage
nobu (Nobuyoshi Nakada)
08:01 AM Revision 77ee4718 (git): Make the internal predict `int_zero_p` return a bool
nobu (Nobuyoshi Nakada)
07:23 AM Revision 243320d2 (git): Fix incorrect minimum read length. (#5353)
Samuel Williams
07:12 AM Bug #16908: Strange behaviour of Hash#shift when used with `default_proc`.
Pretty much anything will be better than the current behaviour. I think your proposal makes sense. ioquatix (Samuel Williams)
06:58 AM Bug #18453: YJIT breaks Rails collection caching
Thank you for such a comprehensive bug report! alanwu (Alan Wu)
01:32 AM Bug #18453 (Closed): YJIT breaks Rails collection caching
Applied in changeset commit:git|5414de4b6e4372af832e338f8eb7a9fe8de17c84.
----------
YJIT: Fix SP index with optarg and unordered kwarg
Previously when we were calling a method with an optional argument and
multiple keywords arguments ...
jhawthorn (John Hawthorn)
01:30 AM Revision 5414de4b (git): YJIT: Fix SP index with optarg and unordered kwarg
Previously when we were calling a method with an optional argument and
multiple keywords arguments which weren't in the order the receiver
expected we would use the wrong SP index to rearrange them.
Fixes Bug #18453
jhawthorn (John Hawthorn)

12/31/2021

09:23 PM Bug #18454: YJIT slowing down key Discourse benchmarks
To see what's going on, could you also try running some iterations (at least 10, the default --yjit-call-threashold) before starting performance measurement and/or increasing the number of iterations? k0kubun (Takashi Kokubun)
12:53 AM Bug #18454 (Closed): YJIT slowing down key Discourse benchmarks

4 out of 6 key Discourse benchmarks used in: https://github.com/discourse/discourse/blob/main/script/bench.rb are slower under YJIT.
Vanilla (median) -> YJIT (median)
Categories: 47ms -> 51
Home page: 85 -> 86
Topic: 42 -> 38
...
sam.saffron (Sam Saffron)
06:31 PM Feature #18439: YJIT: Support Microsoft x86 calling convention
Yes, supporting Window's x64 calling convention is non-trivial.
In addition to what John already mentioned we also need to uphold [unwindability](https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170#unwindabil...
alanwu (Alan Wu)
05:39 PM Feature #14982: Improve namespace system in ruby to avoiding top-level names chaos
I really like this idea and can really reduce the name clashes and global namespace pollution. apatniv (Vivek Ak)
03:00 PM Revision 2fac066b (git): * 2022-01-01 [ci skip]
git[bot]
02:59 PM Revision f59b2e44 (git): NEWS: Removed methods
nobu (Nobuyoshi Nakada)
02:59 PM Revision 60e9aa57 (git): NEWS: Removed C APIs
nobu (Nobuyoshi Nakada)
11:13 AM Revision a493732c (git): re-enabled YJIT on x64-mswin64
note that YJIT does not work correctly on the platform now. U.Nakamura
10:48 AM Revision 1034b6e7 (git): merge revision(s) 0c5f8c62766afe4605172800063e63fe36996658: [Backport #10961]
[ruby/zlib] Resume zstream if available [Bug #10961]
---
ext/zlib/zlib.c | 6 ++++++
1 file changed, 6 insertions(+)
U.Nakamura
10:48 AM Revision 1cc5567b (git): merge revision(s) 0846c2da457e7523819236ac7da492029b3ef73d,6c7cb00c094332a208cf36e5cd723a9ba60c41b8: [Backport #16376]
Check backref number buffer overrun [Bug #16376]
---
regcomp.c | 21 ++++++++++++---------
test/ruby/test_regexp.rb | 6 ++++++
2 files changed, 18 insertions(+), 9 deletions(-)
...
U.Nakamura
10:48 AM Revision 426266af (git): merge revision(s) fdf39963490cf2cf95b30d91bb9b35964c2c2350: [Backport #18421]
Empty and return the buffer if zero size is given [Bug #18421]
In `IO#readpartial` and `IO#read_nonblock`, as well as `IO#read`.
---
io.c | 8 ++++++--
test/ruby/test_io.rb | 21 ++++++++...
U.Nakamura
10:48 AM Revision 7d3cff6e (git): merge revision(s) a2d4e1cda68a49980a4f9f353f400efbde7e7884,d6c5a30cfdf658280338dbb8c8b17fab3190b928: [Backport #18392]
Fixed the check order in wmap_live_p [Bug #18392]
Check if the object is a pointer to heap before check the flag in
that object.
---
gc.c | 35 ++++++++++++++++++++++-------------
1 file changed,...
U.Nakamura
10:48 AM Revision b8298111 (git): merge revision(s) 43a3c88187dcd54ba008834a865e50eb28a78de9: [Backport #18372]
[win32] get rid of redefinition of reserved macro
```
warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
```
---
win32/Makefile.sub | 2 ++
1 file changed, 2 in...
U.Nakamura
10:47 AM Revision c24f436c (git): merge revision(s) 9f8a50723f8a84b3e4755b418570148f422d1b28: [Backport #17836]
Specify -c to emit pch with clang (#4423)
[Bug #17836]
---
mjit_worker.c | 1 +
1 file changed, 1 insertion(+)
U.Nakamura
10:44 AM Bug #10961: Zlib corrupts data when receive signal
ruby_2_7 50a986ca582bf16ed643cab33bad9d3d7ebb815d merged revision(s) 0c5f8c62766afe4605172800063e63fe36996658. usa (Usaku NAKAMURA)
10:33 AM Bug #18421: `IO#readpartial` and `IO#read_nonblock` return non-empty string on empty file
ruby_2_7 c4a5eaf37b9bf87f8324a7070c8dbc597b89c4fc merged revision(s) fdf39963490cf2cf95b30d91bb9b35964c2c2350. usa (Usaku NAKAMURA)
10:27 AM Bug #18392: ObjectSpace::WeakMap#inspect causes BUG
ruby_2_7 836aca4fee4d27a55d56044620a00866a2c279ef merged revision(s) a2d4e1cda68a49980a4f9f353f400efbde7e7884,d6c5a30cfdf658280338dbb8c8b17fab3190b928. usa (Usaku NAKAMURA)
10:18 AM Bug #18372: Need to backport 43a3c88187dcd54ba008834a865e50eb28a78de9
ruby_2_7 e42f8fc5a6ae869652cd1feb3d33353f0ad6a4ec merged revision(s) 43a3c88187dcd54ba008834a865e50eb28a78de9. usa (Usaku NAKAMURA)
10:06 AM Bug #17836: JIT fails to create a precompiled header with Clang
ruby_2_7 57f8bbcf63f8e2ef5c2cea488ba21c3e7c34f862 merged revision(s) 9f8a50723f8a84b3e4755b418570148f422d1b28. usa (Usaku NAKAMURA)
01:53 AM Revision 93591d31 (git): Use rb_cObject instead of rb_cData
nobu (Nobuyoshi Nakada)

12/30/2021

10:46 PM Revision 87c03694 (git): Enhanced RDoc for IO (#5367)
Adds sections to class RDoc:
Lines
Line Separator
Line Limit
Line Number
Revises example text file t.txt to:
Include paragraphs (separated by double line separator).
Avoid being too long.
Revises e...
burdettelamar (Burdette Lamar)
10:39 PM Feature #18351 (Closed): Support anonymous rest and keyword rest argument forwarding
Applied in changeset commit:git|f53dfab95c30e222f67e610234f63d3e9189234d.
----------
Add support for anonymous rest and keyword rest argument forwarding
This allows for the following syntax:
```ruby
def foo(*)
bar(*)
end
def baz(**)...
jeremyevans (Jeremy Evans)
10:37 PM Revision a2f47cf8 (git): * 2021-12-31 [ci skip]
git[bot]
10:37 PM Revision f53dfab9 (git): Add support for anonymous rest and keyword rest argument forwarding
This allows for the following syntax:
```ruby
def foo(*)
bar(*)
end
def baz(**)
quux(**)
end
```
This is a natural addition after the introduction of anonymous
block forwarding. Anonymous rest and keyword rest arguments were
alrea...
jeremyevans (Jeremy Evans)
08:17 PM Feature #18440: YJIT is enabled if any YJIT tuning options are set
I think only enabling on explicit --jit/--yjit/--mjit is better because it's more intuitive.
If e.g. ` --yjit-exec-mem-size=32` is in RUBYOPT it seems unexpected that it would enable YJIT without any `--yjit` anywhere.
Eregon (Benoit Daloze)
07:18 PM Bug #18453: YJIT breaks Rails collection caching
https://github.com/ruby/ruby/pull/5379 jhawthorn (John Hawthorn)
06:51 PM Bug #18453: YJIT breaks Rails collection caching
Tracked this down to `cache_fragment_name` (https://github.com/rails/rails/blob/main/actionview/lib/action_view/helpers/cache_helper.rb#L240) getting the wrong args, so probably a bug in kwarg handling. jhawthorn (John Hawthorn)
05:54 PM Bug #18453 (Closed): YJIT breaks Rails collection caching
A minimal app that demonstrates this issue is available [on GitHub](https://github.com/georgeclaghorn/yjit-rails-collection-caching-bug). It has:
* One model, `Post`, with a string `title` attribute.
* One controller action, `posts#ind...
georgeclaghorn (George Claghorn)
05:05 PM Bug #18452 (Rejected): Dramatic performance regression in Zeitwerk with 3.1
jeremyevans0 (Jeremy Evans)
04:59 PM Bug #18452: Dramatic performance regression in Zeitwerk with 3.1
> I think your original assumption is more reasonable, and Bootsnap's assumption is not.
OK, thanks for the hint.
> ...
In projects managed by Zeitwerk, subdirectories represent namespaces. If the namespace has a file defining it, all ...
fxn (Xavier Noria)
04:44 PM Bug #18452: Dramatic performance regression in Zeitwerk with 3.1
fxn (Xavier Noria) wrote in #note-2:
> I thought about different options, and believed that Bootsnap made a reasonable assumption, so just a few days ago I published a new version that pushed the directory to `$LOADED_FEATURES`.
> ...
...
jeremyevans0 (Jeremy Evans)
04:00 PM Bug #18452: Dramatic performance regression in Zeitwerk with 3.1
BTW, Zeitwerk does not call the original `require` either. But it is a fact that if you comment out the `push` call, the regression disappears. fxn (Xavier Noria)
03:56 PM Bug #18452: Dramatic performance regression in Zeitwerk with 3.1
> Is there a reason Zeitwerk is adding directories to $LOADED_FEATURES, instead of using its own data structure?
It didn't do that since it first shipped. The lib intercepted the `require` and did its thing without invoking the original...
fxn (Xavier Noria)
03:40 PM Bug #18452: Dramatic performance regression in Zeitwerk with 3.1
The bug fixed in commit:79a4484a072e9769b603e7b4fbdb15b1d7eccb15 is always going to result in some slow down, since Ruby now has to determine the realpath for all entries in `$LOADED_FEATURES`. The commit doesn't change when the loaded ... jeremyevans0 (Jeremy Evans)
02:02 PM Bug #18452 (Rejected): Dramatic performance regression in Zeitwerk with 3.1
Hi!
In Ruby 3.1, Zeitwerk loads implicit namespaces way slower than in previous versions. In this benchmark:
```ruby
require 'fileutils'
require 'tmpdir'
require 'zeitwerk'
Dir.mktmpdir do |dir|
Dir.chdir(dir)
for i i...
fxn (Xavier Noria)
01:21 PM Revision 2d2ee338 (git): YJIT: Avoid pointer size assumption with intptr_t
Cast to `void *` first to use the definition of `intptr_t`. alanwu (Alan Wu)
12:16 PM Revision d5fc3fa4 (git): win32/win32.c Fix PROT_EXEC bit flag check for FlushInstrucitonCache()
nagachika (Tomoyuki Chikanaga)
12:13 PM Revision db547a3b (git): [ruby/win32ole] Undefine allocator of WIN32OLE_VARIABLE to get rid of warning
https://github.com/ruby/win32ole/commit/27d0fdc622 nobu (Nobuyoshi Nakada)
11:53 AM Revision 31c69d66 (git): [ruby/reline] windows fix scroll
https://github.com/ruby/reline/commit/c559d0f7a9 YO4 (Yoshinao Muramatsu)
11:52 AM Revision 2a311594 (git): [ruby/reline] Omit a test on Ruby 2.6
Some tokens in Ruby 2.6 have difference information than in 2.7 and later,
but 2.6 will soon be out of support.
https://github.com/ruby/reline/commit/f3bc698385
aycabta (aycabta .)
11:52 AM Revision 9295732a (git): [ruby/reline] Use ripper_lex_without_warning
https://github.com/ruby/reline/commit/b7536dc224 aycabta (aycabta .)
11:23 AM Revision f589242e (git): [ruby/reline] Use unix_line_discard when Ctrl-u is entered
The kill-line was called when C-u was entered, so it is now called unix-line-discard.
In readline(3):
> unix-line-discard (C-u)
> ...
https://github.com/ruby/reline/commit/27570d195e
ima1zumi (Mari Imaizumi)
10:33 AM Feature #18376: Version comparison API
pocke (Masataka Kuwabara) wrote in #note-7:
> `::Version` will be conflict with `optparse`'s convention. Probably we need to consider the naming.
Maybe `Semver`?
This is a bit clunky but would arguably indicate the core functional...
janosch-x (Janosch Müller)
09:52 AM Revision 8727161f (git): Flush deprecation declarations for versions older than 3.0
nobu (Nobuyoshi Nakada)
08:20 AM Misc #18451: Undocumented GC.stat keys
Thanks, @peterzhu2118! zverok (Victor Shepelev)
06:33 AM Revision a90d188b (git): Remove declarations of deprecated functions
nobu (Nobuyoshi Nakada)
04:21 AM Bug #18449: Bug in 3.1 regexp literals with \c
mame (Yusuke Endoh) wrote in #note-3:
> Looks like `\c?` in a regexp literal was changed for #14367.
> ...
As @janosch-x mentioned, the matched codepoints are the same. The fact that #source returns a different result does not seem lik...
jeremyevans0 (Jeremy Evans)

12/29/2021

10:50 PM Feature #18402: Argument Labels
i really like this in Swift so i'll try to give another example for how this addition might improve both readability and conciseness.
currently there are two approaches: using verbose names for keyword arguments or short ones. both have...
janosch-x (Janosch Müller)
10:37 PM Bug #18449: Bug in 3.1 regexp literals with \c
regexps with these escapes can still be constructed with the `Regexp::new` constructor, they are only pre-processed to hex escapes in Regexp literals.
```ruby
/\cC/.source == Regexp.new('\cC').source # false iff Ruby >= 3.1
```
a...
janosch-x (Janosch Müller)
05:24 AM Bug #18449: Bug in 3.1 regexp literals with \c
I was just coming back to point at:
```
Jeremy Evans: Fix handling of control/meta escapes in literal regexps [Wed May 12 12:37:55 2021 -0700 (8 months ago)]
```
found in https://github.com/ruby/ruby/commit/11ae581a4a7f5d5f5ec637...
zenspider (Ryan Davis)
05:06 AM Bug #18449: Bug in 3.1 regexp literals with \c
Looks like `\c?` in a regexp literal was changed for #14367.
```
p(/\cC/.source) #=> "\\cC" in Ruby 3.0
p(/\cC/.source) #=> "\\x03" in Ruby 3.1
```
@jeremyevans0 What do you think?
mame (Yusuke Endoh)
05:04 AM Bug #18449: Bug in 3.1 regexp literals with \c
It looks like `tokadd_escape` has drastically changed and dropped the `\c`, `\M-`, and `\C-` forms...
This isn't mentioned in the release notes, and seems a backwards incompatibility that should be reserved for 4.0: https://www.ruby-...
zenspider (Ryan Davis)
04:36 AM Bug #18449 (Rejected): Bug in 3.1 regexp literals with \c
This file passes on 2.7, 3.0, and fails (if you remove the `skip` line) on 3.1:
``` ruby
#!/usr/bin/env ruby -w
require "minitest/autorun"
class TestRegexpCreation < Minitest::Test
R31 = RUBY_VERSION > "3.1"
def test_li...
zenspider (Ryan Davis)
10:26 PM Bug #18294: error when parsing regexp comment
this affects:
- all String escapes that can be invalid (`\x`, `\u`, `\u{...}`, `\M`, `\C`, `\c`)
- only invalid escapes (e.g. `\x7F` is fine)
- no Regexp-specific escapes such as `\p{...}`, `\g<...>`, `\k<...>`
- Regexp literals (`Synt...
janosch-x (Janosch Müller)
10:02 PM Revision 1954a95f (git): [rubygems/rubygems] Better way to join path components
The current way works, but error messages show duplicate "/" in paths,
which is weird.
https://github.com/rubygems/rubygems/commit/9123deb4fa
deivid (David Rodríguez)
09:54 PM Bug #18447: Potential performance regression with String#lines in large strings
Thanks everyone! I wondered if it wasn't due to memory allocations, but the "build a massive string" operation was successful and quite fast. I looked through `rb_str_enumerate_lines` in the C source, and got lost rather quickly, aside f... ttilberg (Tim Tilberg)
09:21 PM Bug #18447 (Closed): Potential performance regression with String#lines in large strings
Applied in changeset commit:git|002fa2859962f22de8afdbeece04966ea57b7da9.
----------
On 64bit macOS, enlarge heap pages to reduce mmap calls [Bug #18447]
nobu (Nobuyoshi Nakada)
04:12 PM Bug #18447: Potential performance regression with String#lines in large strings
I think we should consider making the page sizes 64KB by default. Many systems (e.g. PowerPC) have 64 KB page sizes, so we can't use mmap on those systems meaning that we can't use compaction. See issue #18133.
I opened a PR for this ...
peterzhu2118 (Peter Zhu)
08:05 AM Bug #18447: Potential performance regression with String#lines in large strings
This seems to make it faster nearly to 3.0.
https://github.com/nobu/ruby/tree/mac-heap_page
```diff
diff --git a/gc.c b/gc.c
index a5369c28f13d..aaae009b2ee7 100644
--- a/gc.c
+++ b/gc.c
@@ -847,8 +847,15 @@ typedef struct rb_objs...
nobu (Nobuyoshi Nakada)
05:36 AM Bug #18447: Potential performance regression with String#lines in large strings
Thank you for your great report. I could reproduce the issue on M1 macOS. It does not repro on Ubuntu.
According to `git bisect`, this regression is caused by commit:785f5eb8f0f994c755ac5f1e1479f6e2ec6d0ef3.
```
% git checkout 09f284c0...
mame (Yusuke Endoh)
09:21 PM Misc #18451 (Closed): Undocumented GC.stat keys
peterzhu2118 (Peter Zhu)
09:21 PM Misc #18451 (Open): Undocumented GC.stat keys
I added documentation for these keys in commit [52525b527b4605435110bd61fb9e04d82ca26ff7](https://github.com/ruby/ruby/commit/52525b527b4605435110bd61fb9e04d82ca26ff7). peterzhu2118 (Peter Zhu)
09:21 PM Misc #18451 (Closed): Undocumented GC.stat keys
Applied in changeset commit:git|52525b527b4605435110bd61fb9e04d82ca26ff7.
----------
[Bug #18451] [ci skip] Update documentation for GC.stat
Adds documentation for keys `time`, `compact_count`,
`read_barrier_faults`, `total_moved_objec...
peterzhu2118 (Peter Zhu)
08:42 PM Misc #18451 (Closed): Undocumented GC.stat keys
As of 3.1 these keys aren't [documented](https://docs.ruby-lang.org/en/master/GC.html#method-c-stat):
* `:compact_count` (2.7)
* `:read_barrier_faults`, `:total_moved_objects` (3.0)
* `:time` (new in 3.1)
(I am just judging by vers...
zverok (Victor Shepelev)
09:21 PM Revision 7304e357 (git): * 2021-12-30 [ci skip]
git[bot]
09:20 PM Revision 52525b52 (git): [Bug #18451] [ci skip] Update documentation for GC.stat
Adds documentation for keys `time`, `compact_count`,
`read_barrier_faults`, `total_moved_objects`.
peterzhu2118 (Peter Zhu)
05:15 PM Feature #18438: Add `Exception#additional_message` to show additional error information
So this serves roughly the same purpose as #18296
I also have a slight preference for a `description` method that includes the `message`. It seem simpler for everyone (including Sentry, Datadog, etc.) to use `e.description` instead of...
Dan0042 (Daniel DeLorme)
02:05 PM Feature #18438: Add `Exception#additional_message` to show additional error information
ivoanjo (Ivo Anjo) wrote in #note-3:
> 1. Would `additional_message` only be something that gems like did_you_mean and error_highlight use (e.g. better debugging/developer experience tools), or do you see normal user code using it as we...
mame (Yusuke Endoh)
11:59 AM Feature #18438: Add `Exception#additional_message` to show additional error information
What if instead of having two distinct `#message` and `#additional_message` that need to be concatenated, there would simply be an alternative, more descriptive method?
e.g.
`Exception#description` which would be:
```ruby
def m...
byroot (Jean Boussier)
04:06 PM Bug #18429: Configure ruby-3.0.3 on Solaris 10 Unknown keyword 'URL' in './ruby.tmp.pc'
# gmake
BASERUBY = echo executable host ruby is required. use --with-baseruby option.; false
CC = /usr/local/gcc4/bin/gcc -std=gnu99
LD = /usr/ccs/bin/ld
LDSHARED = /usr/local/gcc4/bin/gcc -std=gnu99 ...
dklein (Dmitri Klein)
04:03 PM Bug #18429: Configure ruby-3.0.3 on Solaris 10 Unknown keyword 'URL' in './ruby.tmp.pc'
We are using newer version of gcc now :
/usr/local/gcc4/bin/gcc --version
gcc (GCC) 4.5.1
dklein (Dmitri Klein)
05:02 AM Bug #18429: Configure ruby-3.0.3 on Solaris 10 Unknown keyword 'URL' in './ruby.tmp.pc'
dklein (Dmitri Klein) wrote in #note-20:
> ```shell-session
> ...
It should be `CC=/opt/csw/bin/gcc-5.5 ./configure`.
> ```shell-session
> ...
Seems the necessary library is not installed.
nobu (Nobuyoshi Nakada)
02:02 PM Feature #18450: Force break in prettyprint
mame (Yusuke Endoh) wrote in #note-1:
> Could you explain a use case?
I am writing a code generator where in some cases I need to force-break the output code because it makes more sense for a human reader/reviewer:
Here's an example tak...
firasalkhalil (Firas al-Khalil)
01:28 PM Feature #18450 (Assigned): Force break in prettyprint
Could you explain a use case? mame (Yusuke Endoh)
01:16 PM Feature #18450 (Assigned): Force break in prettyprint
# Abstract
Support force-breaking a group in the std's [prettyprint](https://github.com/ruby/prettyprint)
# Background
There is a need to forcibly break a group and transform breakables into
newlines. The library doesn't provid...
firasalkhalil (Firas al-Khalil)
11:53 AM Revision 002fa285 (git): On 64bit macOS, enlarge heap pages to reduce mmap calls [Bug #18447]
nobu (Nobuyoshi Nakada)
11:12 AM Revision 239e71c0 (git): [ruby/reline] Use omit instead of skip
https://github.com/ruby/reline/commit/a538de421f hsbt (Hiroshi SHIBATA)
10:27 AM Revision f25c2e63 (git): Use omit instead of skip: test/ruby/enc/**/*.rb
hsbt (Hiroshi SHIBATA)
08:47 AM Bug #18445 (Closed): Make Ruby 3.0.3 on Solaris 10 by gmake with gcc 4.5.1 Assembler: main.c errors
hsbt (Hiroshi SHIBATA)
04:40 AM Bug #18445: Make Ruby 3.0.3 on Solaris 10 by gmake with gcc 4.5.1 Assembler: main.c errors
Looks like there is something wrong in your gcc installation. Maybe you are using GCC with Solaris's as commend. I have no idea that GCC supports such a setup. mame (Yusuke Endoh)
08:46 AM Bug #18448 (Closed): Configuring Ruby 3.0.3 on Solaris 10 by gcc 4.5.1 with error: configure: error: cannot compute sizeof (long long)
hsbt (Hiroshi SHIBATA)
04:44 AM Bug #18448: Configuring Ruby 3.0.3 on Solaris 10 by gcc 4.5.1 with error: configure: error: cannot compute sizeof (long long)
The log contains:
> ld.so.1: conftest: fatal: libssp.so.0: open failed: No such file or directory
I think this means your GCC installation is not working well.
mame (Yusuke Endoh)
12:19 AM Bug #18448 (Closed): Configuring Ruby 3.0.3 on Solaris 10 by gcc 4.5.1 with error: configure: error: cannot compute sizeof (long long)
# /usr/local/gcc4/bin/gcc --version
gcc (GCC) 4.5.1
# which gcc
/usr/local/gcc4/bin/gcc
#
# ./configure
...
checking size of long long... configure: error: in `/export0/home/telegraf/fluentd/ruby_versions/ruby3/ruby-3.0.3':...
dklein (Dmitri Klein)
08:46 AM Bug #18442 (Closed): Make Ruby 3.0.3 on Solaris 10 with "The following command caused the error: cc -D_STDC_C99= "
Can you use a single ticket for this failure? Please use https://bugs.ruby-lang.org/issues/18429 hsbt (Hiroshi SHIBATA)
07:02 AM Revision 6d572902 (git): Update bundled gems list at 2021-12-29
git[bot]
05:09 AM Revision 4e4c4fab (git): YJIT: Use proper size prefix and conversion where IL32LLP64
nobu (Nobuyoshi Nakada)
04:38 AM Feature #18332: a ? b
`??` is a character literal.
As omitting the `:` and after makes the syntax value conflicting of course, I don't think this is acceptable.
nobu (Nobuyoshi Nakada)
02:50 AM Revision 5ca51ddd (git): [DOC] Integer#coerce deals with also Float
nobu (Nobuyoshi Nakada)
02:49 AM Revision 27765a75 (git): Fix the warning in rb_big2dbl, Bignum is no longer defined
nobu (Nobuyoshi Nakada)
02:40 AM Revision 3238164f (git): `ioctl_narg_len` is used only when ioctl(2) is available
nobu (Nobuyoshi Nakada)
01:03 AM Revision 7fbd93e6 (git): Update default gems list at d75f7078c831d45ab5ba2fae4fbb30 [ci skip]
git[bot]
12:37 AM Revision d75f7078 (git): [ruby/io-console] bump up to 0.5.11
https://github.com/ruby/io-console/commit/ad3805200c nobu (Nobuyoshi Nakada)
12:37 AM Revision e4cd319f (git): [ruby/irb] Prefer `IO#wait_readable` over `IO#select`. (https://github.com/ruby/irb/pull/323)
https://github.com/ruby/irb/commit/1c03bd3373 Samuel Williams
12:27 AM Revision f27eb814 (git): Sync io-console gem.
Samuel Williams
 

Also available in: Atom