Project

General

Profile

Activity

From 01/14/2023 to 01/20/2023

01/20/2023

10:49 PM Feature #15778: Expose an API to pry-open the stack frames in Ruby
Outside of error reporting, having this or similar API will also:
- Allow IRB to display richer exception backtrace. This is helpful when used as `binding.irb`.
- Allow IRB to implement a `bt` command that's similar to `debug`'s.
...
st0012 (Stan Lo)
10:11 PM Revision 06b62cbb (git): Add `offsetof` so we can get the offset of members
I want to get the offset of fields inside structs, but I don't want to
instantiate the struct. I need to embed the offsets inside machine
code, and I can't get the offsets without calling `new` on the struct.
This commit adds an `offse...
tenderlovemaking (Aaron Patterson)
10:09 PM Bug #19112: Ractor garbage collection breaks/disables all active tracepoints
To make sure it's collected:
```ruby
puts RUBY_DESCRIPTION
ractor_id = nil
if ENV['RUN_RACTOR'] == '1'
r = Ractor.new { 10 }
ractor_id = r.object_id
r.take
puts "Ractor ran!"
else
puts "Ractor DID NOT ran!"
end
gc_times = 0
r...
luke-gru (Luke Gruber)
09:51 PM Bug #19112: Ractor garbage collection breaks/disables all active tracepoints
I was just looking into this bug and it's really strange, I initially thought it had to do with single ractor mode vs multi, but if we `sleep 100` inside the ractor everything behaves as it should, so it has to do with the ractor finishi... luke-gru (Luke Gruber)
09:07 PM Revision 887d2161 (git): YJIT: Avoid BorrowError on GC.compact (#7164)
k0kubun (Takashi Kokubun)
08:58 PM Revision 4e037075 (git): Fix typo in RHASH_ST_CLEAR
We should be setting as.st and not as.ar. peterzhu2118 (Peter Zhu)
06:05 PM Bug #19358 (Closed): Segfault when setting RUBY_GC_HEAP_INIT_SLOTS to a low value
Thank you for reporting this bug and @eightbitraptor for checking that the patch works on 3.1.3. I marked that patch for backporting to 3.1. peterzhu2118 (Peter Zhu)
05:06 PM Bug #19358: Segfault when setting RUBY_GC_HEAP_INIT_SLOTS to a low value
Can confirm that applying the patch from https://bugs.ruby-lang.org/issues/19284 to the 3.1.3 branch fixes the issue for me.
I think this should be marked for Backport
What do you think @peterzhu2118
eightbitraptor (Matt V-H)
04:08 PM Bug #19358 (Closed): Segfault when setting RUBY_GC_HEAP_INIT_SLOTS to a low value
This bug is similar to #19284
In Ruby 2.7 this works fine
```
docker run --rm -it -e RUBY_GC_HEAP_INIT_SLOTS=1 ruby:2.7 ruby -e 'puts "hello, world!"'
hello, world!
```
On Ruby 3.1 I get a segfault
```
docker run --rm -it ...
xfalcox (Rafael Silva)
04:58 PM Feature #19347: Add Dir.fchdir
ko1 (Koichi Sasada) wrote in #note-3:
> At the dev meeting there are 4 ideas:
I considered the first three ideas when implementing this support. Let me add my comments on each.
> ...
The reason I used this approach is that this f...
jeremyevans0 (Jeremy Evans)
06:25 AM Feature #19347: Add Dir.fchdir
At the dev meeting there are 4 ideas:
* 4 ideas
* `Dir.fchdir(int)`
* Proposed
* Consistent to the POSIX API
* Can be extended for `Dir.fchdir(dir)` and `Dir.fchdir(io)`
* `Dir.chdir(int)`
* Do not need to ad...
ko1 (Koichi Sasada)
04:38 PM Bug #19237 (Closed): Hash default_proc is not thread-safe to lazy-initialize value for a given key
Applied in changeset commit:git|ffd52412ab813854d134dbbc2b60f698fe536487.
----------
Document thread-safety issues with Hash default_proc
Fixes [Bug #19237]
jeremyevans (Jeremy Evans)
05:57 AM Bug #19237: Hash default_proc is not thread-safe to lazy-initialize value for a given key
Discussed at the dev meeting. @matz said "The performance penalty is not acceptable. Addition to the documentation looks good enough." mame (Yusuke Endoh)
04:36 PM Revision ffd52412 (git): Document thread-safety issues with Hash default_proc
Fixes [Bug #19237] jeremyevans (Jeremy Evans)
04:11 PM Bug #18666: No rule to make target 'yaml/yaml.h', needed by 'api.o'
______________________________________________ Anonymous
11:48 AM Bug #18666 (Feedback): No rule to make target 'yaml/yaml.h', needed by 'api.o'
@duerst This issue may cause with your environment. hsbt (Hiroshi SHIBATA)
04:06 PM Feature #19326: Please add a better API for passing a Proc to a Ractor
If you want Ractor to be an implementation detail of Worker you could do:
```ruby
class Worker
def initialize(&block)
@block = block
end
def run
block = @block
true.instance_eval { Ractor.new(&block) }
end
end
work...
luke-gru (Luke Gruber)
04:01 PM Revision 0457e434 (git): Remove unused struct member thgroup->group
eightbitraptor (Matt V-H)
03:57 PM Revision 36fa4f13 (git): YJIT: get rid of unneeded `.into()`
Jimmy Miller
03:30 PM Revision 15328302 (git): In `UNALIGNED_MEMBER_PTR` cast through `void` pointer
Suppress warnings shown even with `-Waddress-of-packed-member`
disabled in gcc 11.
nobu (Nobuyoshi Nakada)
03:30 PM Revision f0f2535c (git): Add `queue_list` and `szqueue_list` macros
nobu (Nobuyoshi Nakada)
01:51 PM Revision 056e7a01 (git): Make all of the references of iseq movable
peterzhu2118 (Peter Zhu)
01:40 PM Revision 76e3d853 (git): [ruby/reline] Add autoindent test for indent after bracket and newline
https://github.com/ruby/reline/commit/3f3da7d0e2 tompng (tomoya ishida)
01:40 PM Revision 4241b3cf (git): [ruby/reline] accept new_indent > cursor_max
https://github.com/ruby/reline/commit/61cc580da4 tompng (tomoya ishida)
01:06 PM Revision 0cc91871 (git): [rubygems/rubygems] Update bundle-exec man page for with_unbundled_env
`with_clean_env` has been deprecated in `with_unbundled_env`. It already generates a deprecation warning when it uses, but this man page was still referring to it. Josh Nichols
12:41 PM Revision c948a081 (git): Add a NEWS entry for [Feature #19314] [ci skip]
shugo (Shugo Maeda)
11:39 AM Feature #16963 (Closed): Remove English.rb from Ruby 2.8/3.0
I withdraw this proposal. We need to consider another deprecate plan. hsbt (Hiroshi SHIBATA)
11:33 AM Bug #18381: Default vs Bundled gems
I'll document this. hsbt (Hiroshi SHIBATA)
11:33 AM Bug #19337 (Closed): What is the difference between "default" gems and "bundled" gems?
This is duplicated as #18381 hsbt (Hiroshi SHIBATA)
11:00 AM Bug #19354: Issues with arguments validation in IO.read
Yeah, I understand that it's caused by the way how `IO.read` is implemented.
My point is that from the end-user point of view current error message (`given 3, expected 0..2`) is slightly misleading/confusing.
andrykonchin (Andrew Konchin)
06:08 AM Bug #19354 (Feedback): Issues with arguments validation in IO.read
`IO.read` opens the file given as the first argument, then delegates the other arguments to `IO#read` on the instance.
Your error happens in the delegated `IO#read`.
Since 3.0, keyword arguments are separated from mere hashes.
I thi...
nobu (Nobuyoshi Nakada)
10:39 AM Revision 53cd5796 (git): [rubygems/rubygems] Clean test output
The output from the command is mixed in this test, even when
successful.
Use the output as a part of the message on failure instead.
https://github.com/rubygems/rubygems/commit/960509a133
nobu (Nobuyoshi Nakada)
09:02 AM Misc #16671 (Closed): BASERUBY version policy
Applied in changeset commit:git|1edef08ddadf0bd76122f830ef7953cda61c78aa.
----------
Added version policy of BASERUBY
[Misc #16671]
hsbt (Hiroshi SHIBATA)
09:02 AM Revision cce39609 (git): [Feature #19314] Add new arguments of String#bytesplice
bytesplice(index, length, str, str_index, str_length) -> string
bytesplice(range, str, str_range) -> string
In these forms, the content of +self+ is replaced by str.byteslice(str_index, str_length) or str.byteslice(str_range); however...
shugo (Shugo Maeda)
08:54 AM Revision 845f6275 (git): OpenSSL, libyaml and zlib is always required to build. see test/test_extlibs.rb
hsbt (Hiroshi SHIBATA)
08:54 AM Revision 231b09f1 (git): Added supported versions to OpenSSL and libyaml
hsbt (Hiroshi SHIBATA)
08:54 AM Revision 1edef08d (git): Added version policy of BASERUBY
[Misc #16671] hsbt (Hiroshi SHIBATA)
08:42 AM Revision 6aa9c845 (git): Separate dependencies section from quick start
hsbt (Hiroshi SHIBATA)
08:42 AM Feature #19236: Allow to create hashes with a specific capacity from Ruby
Well, `Hash.new(capacity: 4096)` was definitely my first pick, so this is great news IMO.
> how about deprecating giving the keyword to Hash.new and then introducing Hash.new(capacity: 4096)?
What would be the timeline?
Depreca...
byroot (Jean Boussier)
05:31 AM Feature #19236: Allow to create hashes with a specific capacity from Ruby
Discussed at the dev meeting.
@matz said that `Hash.create(capacity: 4096)` is acceptable (unless it conflicts with any major gems). However, several participants including @ko1 were a little cautious about introducing the new termino...
mame (Yusuke Endoh)
08:38 AM Revision ea10dea6 (git): fixed wrong version of baseruby
hsbt (Hiroshi SHIBATA)
08:14 AM Feature #19314 (Closed): String#bytesplice should support partial copy
Applied in changeset commit:git|373e62248c9dceb660e95f1cf05fa2a4a469cd64.
----------
merge revision(s) f7b72462aa27716370c6bea1f2c240983aca9a55: [Backport #19356]
String#bytesplice should return self
In Feature #19314,...
naruse (Yui NARUSE)
08:14 AM Bug #19356 (Closed): Backport f7b72462aa27716370c6bea1f2c240983aca9a55
Applied in changeset commit:git|373e62248c9dceb660e95f1cf05fa2a4a469cd64.
----------
merge revision(s) f7b72462aa27716370c6bea1f2c240983aca9a55: [Backport #19356]
String#bytesplice should return self
In Feature #19314,...
naruse (Yui NARUSE)
07:06 AM Bug #19356: Backport f7b72462aa27716370c6bea1f2c240983aca9a55
ruby_3_2 373e62248c9dceb660e95f1cf05fa2a4a469cd64 merged revision(s) f7b72462aa27716370c6bea1f2c240983aca9a55. naruse (Yui NARUSE)
02:28 AM Bug #19356 (Closed): Backport f7b72462aa27716370c6bea1f2c240983aca9a55
Please backport [f7b72462aa27716370c6bea1f2c240983aca9a55](https://github.com/ruby/ruby/commit/f7b72462aa27716370c6bea1f2c240983aca9a55).
In Feature #19314, we concluded that the return value of String#bytesplice should be changed fro...
shugo (Shugo Maeda)
08:13 AM Revision a0626e11 (git): Bundle RBS 2.8.4 (#7159)
soutaro (Soutaro Matsumoto)
08:01 AM Revision c0df0a85 (git): merge revision(s) ed6fbb79e19bf401db0e85447fee955fd10a25c7: [Backport #19339]
Fix crash when defining ivars on special constants
[Bug #19339]
---
test/ruby/test_variable.rb | 6 ++++++
vm_insnhelper.c | 5 +++++
2 files changed, 11 insertions(+)
naruse (Yui NARUSE)
08:01 AM Bug #19316: YJIT crash in 3.2.0
ruby_3_2 1fb5eb5740d4c4f1fc34a4a50bc0482eac27b545 merged revision(s) aeddc19340c7116d48fac3080553fbb823857d16. naruse (Yui NARUSE)
07:05 AM Revision d80a574a (git): Update bundled gems list at 2023-01-20
git[bot]
06:51 AM Bug #19286 (Closed): What should kwargs' arity be?
Withdrawing the issue. Thank you for your participation in the discussion! matsuda (Akira Matsuda)
05:58 AM Bug #19286: What should kwargs' arity be?
Discussed at the dev meeting. @matz said the current behavior is fair, and @matsuda agreed with that. So keep it as is. mame (Yusuke Endoh)
06:10 AM Misc #19357 (Closed): DevMeeting-2023-02-09
# The next dev meeting
**Date: 2023/02/09 13:00-17:00** (JST)
Log: https://github.com/ruby/dev-meeting-log/blob/master/2023/DevMeeting-2023-02-09.md
- Dev meeting *IS NOT* a decision-making place. All decisions should be done at t...
mame (Yusuke Endoh)
06:10 AM Misc #19240 (Closed): DevMeeting-2023-01-19
mame (Yusuke Endoh)
06:02 AM Bug #19293: The new Time.new(String) API is nice... but we still need a stricter version of this
Discussed at the dev meeting. @naruse said "`Time.new("2023")` is 1.9.2 feature. We can’t deprecate on 3.2.1. Need to continue the discussion for Ruby 3.3."
BTW Ruby 3.2.0 accidentally allows `Time.new("2023-01")`, `Time.new("2023-01-...
mame (Yusuke Endoh)
05:55 AM Bug #18518: NoMemoryError + [FATAL] failed to allocate memory for twice 1 << large
Discussed at the dev meeting.
Are there any real-world use cases (other than rubyspec) where you would like to prohibit `integer << large`?
@matz was initially positive about prohibiting huge object generation as early failure. How...
mame (Yusuke Endoh)
05:41 AM Feature #18285: NoMethodError#message uses a lot of CPU/is really expensive to call
Discussed at the dev meeting. @matz is positive about the change and said he would give it a try. The message format is slightly changed as follows:
* If the receiver is a Class, `... for class <class name>` should be printed.
* If t...
mame (Yusuke Endoh)
04:37 AM Feature #19245: Strict mode for Array#pack that doesn't silently truncate numbers that are too large for the given directive
Discussed at the dev meeting. We need to determine some detailed behaviors:
* Should `[-1].pack("C", strict: true)` raise an exception because 'C' represents unsigned char? If what you want is "wrap around", it should raise an error b...
mame (Yusuke Endoh)
03:24 AM Revision 373e6224 (git): merge revision(s) f7b72462aa27716370c6bea1f2c240983aca9a55: [Backport #19356]
String#bytesplice should return self
In Feature #19314, we concluded that the return value of String#bytesplice
should be changed from the source string to the receiver, because the source
string is useless and c...
naruse (Yui NARUSE)
02:05 AM Bug #19327: Backport commits 3be2acfafd3b3c6168e2266c7c6561d143d7ae5c and 9726736006b3f74635fd8af05814fe0908e2cf84
ruby_3_2 6a8fcb50210f8414d76968298576e39b9fa82562 merged revision(s) 3be2acfafd3b3c6168e2266c7c6561d143d7ae5c. naruse (Yui NARUSE)
01:18 AM Bug #19341 (Closed): Write cache issue with class variables
Applied in changeset commit:git|f66804e6f78ed4cf81896d2256743a820b05939a.
----------
don't allow setting class variable on module that's frozen [Bug #19341]
luke-gru (Luke Gruber)

01/19/2023

11:28 PM Bug #15507: Thread#raise is delivered to GC context
❤️ Thank you for fixing this @jeremyevans0 - I was debugging some instances of our Ruby 2.7 app's test suite hanging on exit, and narrowed it down to this reproduction:
```
require 'tempfile'
def forget_about_a_tempfile
Tempfile.new(...
kjtsanaktsidis (KJ Tsanaktsidis)
10:18 PM Feature #19355: Add finer coarsed locking for searching callable method entries
```ruby
MyClass = Object
class MyClass2 < Object;
def call_a_method
[]
end
def call_another_method
{}
end
end
USE_RACTORS = ARGV.first == "ractor"
puts "ractors: #{USE_RACTORS ? 't' : 'f'}"
class FakeRactor
def initial...
luke-gru (Luke Gruber)
09:04 PM Feature #19355 (Open): Add finer coarsed locking for searching callable method entries
During multi-ractor mode, unfortunately when calling methods often there's a call to the internal cruby function `callable_method_entry`, which
returns a cached CME or a new one. In the case that it's cached, there's a VM lock around it...
luke-gru (Luke Gruber)
10:02 PM Misc #19352 (Closed): Feature #17391 was not such a good idea because now Ruby 3.2 can not install Rails v5 or v6 if they use webpacker.
hsbt (Hiroshi SHIBATA)
06:05 PM Misc #19352: Feature #17391 was not such a good idea because now Ruby 3.2 can not install Rails v5 or v6 if they use webpacker.
I’m not entirely sure, as I have never used a version of Rails that has webpacker (I last used Rails 4.2), so I don’t know its initialization process (whether it sees `application.rb` or an initializer). Worst case, you could put that co... austin (Austin Ziegler)
05:37 PM Misc #19352: Feature #17391 was not such a good idea because now Ruby 3.2 can not install Rails v5 or v6 if they use webpacker.
> That said, this is easily monkey patched:
> ...
@Austin, That is AWESOME! Thank you for that!
Where would be the best place for that code go? In application.rb? or as an initializer or? What would you recommend?
I am asking m...
Milella@Hotmail.com (Scott Milella)
07:39 AM Misc #19352: Feature #17391 was not such a good idea because now Ruby 3.2 can not install Rails v5 or v6 if they use webpacker.
Personally, I preferred exists? over exist? but I can live with the change.
"If the file xy.txt exists then ...": if File.exists?("xy.txt") do
I made a gem to monkeypatch the exists? functionality.
The code from austin might however be...
aidog (Andi Idogawa)
03:10 AM Misc #19352: Feature #17391 was not such a good idea because now Ruby 3.2 can not install Rails v5 or v6 if they use webpacker.
I do not believe that this should be reversed.
There’s an older post at FastRuby indicating [version compatibility](https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html), which mostly captures something that I bel...
austin (Austin Ziegler)
12:57 AM Misc #19352 (Closed): Feature #17391 was not such a good idea because now Ruby 3.2 can not install Rails v5 or v6 if they use webpacker.
Hello,
I tried logging a GitHub issue to Rails to make them aware of this issue but they said they are no longer bugfixing Rails v6.1 anymore.
So since this IS a Ruby issue at its core this might be the best place for this.
You re...
Milella@Hotmail.com (Scott Milella)
09:26 PM Revision 0949cd71 (git): [ci skip] Add ticket label to test
peterzhu2118 (Peter Zhu)
09:25 PM Revision f66804e6 (git): don't allow setting class variable on module that's frozen [Bug #19341]
luke-gru (Luke Gruber)
09:10 PM Revision bf3940a3 (git): YJIT: Refactor side_exits
Jimmy Miller
08:02 PM Revision 5ce0c13f (git): YJIT: Remove duplicated information in BranchTarget (#7151)
Note: On the new code of yjit/src/core.rs:2178, we no longer leave the state `.block=None` but `.address=Some...`, which might be important.
We assume it's actually not needed and take a risk here to minimize heap allocations, but in ca...
k0kubun (Takashi Kokubun)
06:58 PM Revision 401aa9dd (git): [ruby/net-http] [DOC] Header doc
(https://github.com/ruby/net-http/pull/104)
https://github.com/ruby/net-http/commit/3308362d9b
burdettelamar (Burdette Lamar)
06:42 PM Revision 762a3d80 (git): Implement splat for cfuncs. Split exit exit cases to better capture where we are exiting (#6929)
YJIT: Implement splat for cfuncs. Split exit cases
This also implements a new check for ruby2keywords as the last
argument of a splat. This does mean that we generate more code, but in
actual benchmarks where we gained speed from this (...
Jimmy Miller
05:22 PM Revision 8872ebec (git): Fix compilation warnings in thread_sync.c
Fixes the following compilation warnings:
thread_sync.c:908:48: warning: taking address of packed member of `struct rb_queue` may result in an unaligned pointer value [-Waddress-of-packed-member]
thread_sync.c:1181:48: warning: taking ...
peterzhu2118 (Peter Zhu)
04:23 PM Revision 9af84c95 (git): Combine code paths for marking cc
This commit avoids a separate code path for marking and moving the
callcache of the iseq.
peterzhu2118 (Peter Zhu)
04:23 PM Revision 41bf2354 (git): Add rb_gc_mark_and_move and implement on iseq
This commit adds rb_gc_mark_and_move which takes a pointer to an object
and marks it during marking phase and updates references during compaction.
This allows for marking and reference updating to be combined into a
single function, whi...
peterzhu2118 (Peter Zhu)
04:15 PM Misc #19265: please remove rust yjit
It is going to be very hard to maintain 3.1 YJIT long-term. There are significant updates to the CRuby internal object structures. We're updating it in 3.2, but the older C-based code is still using the older CRuby internal structures. I... noahgibbs (Noah Gibbs)
04:07 PM Misc #19353: Drop gcc <= 6 and clang <= 9
I recently encountered a CI failure when testing against `C++98` due to the lack of variadic macros. `internal/gc.h` states that
```
* @note To ruby-core: remember that this header can be possibly
* recursiv...
eightbitraptor (Matt V-H)
08:07 AM Misc #19353: Drop gcc <= 6 and clang <= 9
OpenBSD/sparc64 uses gcc 4.2.1 (last GPLv2 version) as the system compiler. The sparc64 backend for clang is not yet mature (last I checked), so this would make it so Ruby 3.3+ would be unlikely to be supported on OpenBSD/sparc64 (at le... jeremyevans0 (Jeremy Evans)
07:04 AM Misc #19353 (Closed): Drop gcc <= 6 and clang <= 9
We test those old compilers using Ubuntu bionic. This OS is reaching its EOL.
Making them available would become harder.
I would like to drop supporting them. Any opinions?
shyouhei (Shyouhei Urabe)
03:30 PM Bug #19289 (Closed): RbConfig::CONFIG["STRIP"] should keep `ruby_abi_version` and `ruby_abi_version` should always be part of Ruby
Applied in changeset commit:git|6f3aff3961a4c5ce87e05096a1a9dcf1055b7647.
----------
[Bug #19289] Retain `ruby_abi_version` function
A few extension libraries, to hide all symbols except for necessary to
load, hardcode the symbols to b...
nobu (Nobuyoshi Nakada)
03:26 PM Revision 6f3aff39 (git): [Bug #19289] Retain `ruby_abi_version` function
A few extension libraries, to hide all symbols except for necessary to
load, hardcode the symbols to be exported in symbol list files for
linker without even checking by `have_func`. As a workaround for such
libraries, retain `ruby_abi_...
nobu (Nobuyoshi Nakada)
03:21 PM Revision 569fbf22 (git): Run `after-update` in the same main make process [ci skip]
nobu (Nobuyoshi Nakada)
03:20 PM Revision f3617800 (git): Fix a typo in BUG message [ci skip]
nobu (Nobuyoshi Nakada)
02:47 PM Revision dcc676a8 (git): ci in iseq can only be object or null
It looks like rb_callinfo in iseq can only be either a Ruby object or
null, since it cannot be allocated on the stack.
peterzhu2118 (Peter Zhu)
02:07 PM Bug #19354 (Feedback): Issues with arguments validation in IO.read
I've noticed a strange error message when `IO.read` is called with additional positional argument:
```ruby
IO.read("a.txt", 3, 0, {mode: "r+"})
# (irb):2:in `read': wrong number of arguments (given 3, expected 0..2) (ArgumentError)
...
andrykonchin (Andrew Konchin)
12:52 PM Revision 6a8fcb50 (git): merge revision(s) 3be2acfafd3b3c6168e2266c7c6561d143d7ae5c: [Backport #19327]
Fix re-embedding of strings during compaction
The reference updating code for strings is not re-embedding strings
because the code is incorrectly wrapped inside of a
`if (STR_SHARED_P(obj))` clause. Shared string...
naruse (Yui NARUSE)
12:50 PM Bug #19319: Crash in rb_str_casemap
ruby_3_2 686b38f83e70b3e1796092c71dd0b7dc2206b118 merged revision(s) d8ef0a98c670449b20436947f5ebbd327ed5ab0d. naruse (Yui NARUSE)
12:17 PM Feature #12698: Method to delete a substring by regex match
I now agree with https://bugs.ruby-lang.org/issues/12698#note-9. This issue can be considered to be along that line. sawa (Tsuyoshi Sawada)
09:14 AM Feature #19314: String#bytesplice should support partial copy
Accepted.
Matz.
matz (Yukihiro Matsumoto)
08:30 AM Feature #19314 (Open): String#bytesplice should support partial copy
shugo (Shugo Maeda)
08:19 AM Feature #19314 (Closed): String#bytesplice should support partial copy
Applied in changeset commit:git|f7b72462aa27716370c6bea1f2c240983aca9a55.
----------
String#bytesplice should return self
In Feature #19314, we concluded that the return value of String#bytesplice
should be changed from the source stri...
shugo (Shugo Maeda)
08:59 AM Feature #13890: Allow a regexp as an argument to 'count', to count more interesting things than single characters
Overlapping can be realized by putting the original regexp within a look-ahead.
```ruby
s = "abcdefghij"
re = /.{3}/
```
Non-overlapping count:
```ruby
s.scan(re).count # => 3
s.count(re) # => Expect 3
```
Overlapping count:
```ruby...
sawa (Tsuyoshi Sawada)
05:20 AM Feature #13890: Allow a regexp as an argument to 'count', to count more interesting things than single characters
If `str.count(re)` works as `str.scan(re).size` (besides efficiency), it's acceptable. But if someone needs overlapping, they needs to explain their use-case.
Matz.
matz (Yukihiro Matsumoto)
08:58 AM Feature #19333: Setting (Fiber Local|Thread Local|Fiber Storage) to nil should delete value in order to avoid memory leaks.
Accepted, although we foresee some possible issues. One example is that people may use `nil` as a value when they only care about existence of keys (set-like usage). They should use non-nil values (e.g., true) for the case.
Matz.
matz (Yukihiro Matsumoto)
08:13 AM Revision f7b72462 (git): String#bytesplice should return self
In Feature #19314, we concluded that the return value of String#bytesplice
should be changed from the source string to the receiver, because the source
string is useless and confusing when extra arguments are added.
This change should b...
shugo (Shugo Maeda)
06:50 AM Revision 98abe4a0 (git): Fix test when Ruby is verbose
The test added in 90a80eb0 fails if Ruby is verbose, it outputs the
following line to stderr:
RUBY_GC_HEAP_INIT_SLOTS=100 (default value: 10000)
peterzhu2118 (Peter Zhu)
06:19 AM Feature #19245: Strict mode for Array#pack that doesn't silently truncate numbers that are too large for the given directive
I don't think it would be default, but adding `strict:` (or any other keyword argument) is OK for me.
Matz.
matz (Yukihiro Matsumoto)
05:12 AM Bug #18658 (Assigned): Need openssl 3 support for Ubuntu 22.04 (Ruby 2.7.x and 3.0.x)
I discussed @usa.
* We want to backport [openssl-3.0.2 gem](https://github.com/ruby/openssl/releases/tag/v3.0.2) into `ruby_3_0` branch.
* We need keep compatibility of OpenSSL-1.1 with openssl-3.0.2 gem
* @usa is considering dropping s...
hsbt (Hiroshi SHIBATA)
02:59 AM Revision 686b38f8 (git): merge revision(s) d8ef0a98c670449b20436947f5ebbd327ed5ab0d: [Backport #19319]
[Bug #19319] Fix crash in rb_str_casemap
The following code crashes on my machine:
```
GC.stress = true
str = "testing testing testing"
puts str.capitalize
```
We need to ensur...
naruse (Yui NARUSE)
02:48 AM Bug #19262: Segmentation fault on RubyVM::AbstractSyntaxTree.node_id_for_backtrace_location
ruby_3_2 1a2447ac9925e7794a7c5aa07960ad4de08e6aca merged revision(s) 979dd02e2f0a70f3f30d47c6115780d8fac6147e. naruse (Yui NARUSE)
02:05 AM Revision 1a2447ac (git): merge revision(s) 979dd02e2f0a70f3f30d47c6115780d8fac6147e: [Backport #19262]
Check if the argument is Thread::Backtrace::Location object
[Bug #19262]
---
ast.c | 5 +++++
test/ruby/test_ast.rb | 6 ++++++
2 files changed, 11 insertions(+)
naruse (Yui NARUSE)
02:05 AM Bug #19248: TestGCCompact#test_moving_objects_between_size_pools test failure
ruby_3_2 08ae7f64dc52c2b61e451d6e79ebdae73d482677 merged revision(s) 273dca3aed7989120d57f80c789733d4bc870ffe. naruse (Yui NARUSE)
01:52 AM Revision 4b42392f (git): YJIT: Use .as_side_exit() for jumps to counted exits
Fewer cycles running nops when these jumps are not taken. Fixing all
these so when they get copy pasted in the future we save on padding.
alanwu (Alan Wu)
01:23 AM Revision 4cf1d9b3 (git): YJIT: Set RUST_BACKTRACE=1 on YJIT GitHub Actions (#7152)
k0kubun (Takashi Kokubun)
01:08 AM Feature #19322: Support spawning "private" child processes
Hey @nobu, @eregon - any further thoughts on this?
@nobu - I changed the proposal not to depend on any new platform-specific process management APIs, but instead to leverage the existing code for managing process waits in `process.c`....
kjtsanaktsidis (KJ Tsanaktsidis)
01:07 AM Feature #19351 (Assigned): Promote bundled gems at Ruby 3.3
>I believe that for instance strscan is used to parse the Gemfile.lock. Historically Bundler simply vendored the gems it needs, but not sure how it could do that since it has a C-ext part.
Thanks. I also confirm that RubyGems/Bundler ...
hsbt (Hiroshi SHIBATA)
12:53 AM Feature #19351: Promote bundled gems at Ruby 3.3
I'm OK with gems maintained by me. kou (Kouhei Sutou)
12:31 AM Revision 08ae7f64 (git): merge revision(s) 273dca3aed7989120d57f80c789733d4bc870ffe: [Backport #19248]
Fix undefined behavior in shape.c
Under strict aliasing, writing to the memory location of a different
type is not allowed and will result in undefined behavior. This was
happening in shape.c due to `rb_id_table_...
naruse (Yui NARUSE)
12:29 AM Bug #19305: TracePoint#parameters segfaults when certain method creation pattern is used
ruby_3_2 d7fb4629b4058eb86be03760e6b9f1f272e44147 merged revision(s) 837ef8911c638c3e2bdb6af710de7c1fac7b5f90. naruse (Yui NARUSE)

01/18/2023

10:59 PM Revision edd00697 (git): Test some missing coverage too. (#7041)
Samuel Williams
09:03 PM Revision 30894292 (git): [ruby/net-http] [DOC] Enhanced RDoc for set_form
(https://github.com/ruby/net-http/pull/103)
https://github.com/ruby/net-http/commit/f6506ff889
burdettelamar (Burdette Lamar)
08:41 PM Revision 6bb576fe (git): YJIT: implement codegen for `String#empty?` (#7148)
YJIT: implement codegen for String#empty? maximecb (Maxime Chevalier-Boisvert)
04:54 PM Revision 0fd5a664 (git): Remove macro RHASH_ITER_LEV
The function rb_hash_iter_lev doesn't exist as it was removed. peterzhu2118 (Peter Zhu)
04:45 PM Bug #19288: Ractor JSON parsing significantly slower than linear parsing
I just took a look at this and it looks like the culprit is the c dtoa function that's called in the json parser, specifically a helper function `Balloc`. It uses a lock for some reason *shrug*.
Edit: It looks like in ruby's missing/dto...
luke-gru (Luke Gruber)
04:08 PM Revision cd979763 (git): Add stats so we can keep track of x86 rel32 vs register calls (#7142)
* Add stats so we can keep track of x86 rel32 vs register calls
To know if we get that "prime real estate" as Alan put it.
* Fix bug pointed by Alan
maximecb (Maxime Chevalier-Boisvert)
03:59 PM Bug #19340: Ruby master 'make install' not installing rbs gem
The particular issue with rbs has been fixed with https://github.com/ruby/ruby/pull/7143
> The current build-system of bundled gems is very complex
Agreed. Several recent commits show updates to it.
Given issues with whether on...
MSP-Greg (Greg L)
06:36 AM Bug #19340: Ruby master 'make install' not installing rbs gem
We discuss this issue with @mame @nobu @ko1 and @soutaro. The current build-system of bundled gems is very complex.
We decide to the following specification for building the bundled gems.
When we provide this `bundled_gems` file:
...
hsbt (Hiroshi SHIBATA)
03:58 PM Feature #19333: Setting (Fiber Local|Thread Local|Fiber Storage) to nil should delete value in order to avoid memory leaks.
There is also `Thread#key?` for Fiber locals, so not just `thread_variable?`.
Above I am talking more about the performance issue than the semantic incompatibility.
Doing delete+insert is more expensive than set+set, and even much mo...
Eregon (Benoit Daloze)
03:48 PM Feature #19351: Promote bundled gems at Ruby 3.3
vo.x (Vit Ondruch) wrote in #note-3:
> BTW I don't think there would be that much fixing needed after all.
As we have seen with the `mail` gem, it can be a [huge](https://github.com/mikel/mail/pull/1439) [pain](https://github.com/mikel/...
Eregon (Benoit Daloze)
02:01 PM Feature #19351: Promote bundled gems at Ruby 3.3
Yeah, a few of these will need to be handled by rubygems/bundler.
I believe that for instance `strscan` is used to parse the `Gemfile.lock`. Historically Bundler simply vendored the gems it needs, but not sure how it could do that sin...
byroot (Jean Boussier)
09:47 AM Feature #19351: Promote bundled gems at Ruby 3.3
I update rails dependencies.
@vo.x Thanks for your comment. Maybe we should remove `irb` from this list.
I welcome feedback for these list and additional gem proposal like `cgi`, `erb` and others.
hsbt (Hiroshi SHIBATA)
09:28 AM Feature #19351: Promote bundled gems at Ruby 3.3
vo.x (Vit Ondruch) wrote in #note-1:
> > But if we promote them to bundled gems, many of users need to add gem "csv" into their Gemfile. I'm considering to avoid this situation.
> ...
BTW I don't think there would be that much fixing n...
vo.x (Vit Ondruch)
09:04 AM Feature #19351: Promote bundled gems at Ruby 3.3
> But if we promote them to bundled gems, many of users need to add gem "csv" into their Gemfile. I'm considering to avoid this situation.
Please let gems to be gems. Please let everybody fix their Gemfiles. Don't make exceptions. The...
vo.x (Vit Ondruch)
08:48 AM Feature #19351 (Closed): Promote bundled gems at Ruby 3.3
In Ruby 3.2, the default gems and bundled gems are changed only adding `syntax_suggest`. I and some committers are considering promote default gems to bundled gems again for Ruby 3.3+.
We hope to keep the current developer experience ...
hsbt (Hiroshi SHIBATA)
02:55 PM Revision 03f5db01 (git): Make installation messages verbose a little [ci skip]
nobu (Nobuyoshi Nakada)
02:49 PM Revision 8e53f09b (git): [ruby/reline] Add constant MINIMUM_SCROLLBAR_HEIGHT for scrollbar rendering when dialog content is very long
https://github.com/ruby/reline/commit/d4c95f89ec tompng (tomoya ishida)
02:49 PM Revision 976d72a9 (git): [ruby/reline] Add scrollbar scroll-to-bottom test and fix existing scrollbar rendeing test
https://github.com/ruby/reline/commit/268e02b155 tompng (tomoya ishida)
02:49 PM Revision a712f2a2 (git): [ruby/reline] Fix dialog scrollbar rendering position and disappearing bug
https://github.com/ruby/reline/commit/e21b69ade4 tompng (tomoya ishida)
01:49 PM Revision 4fa7d383 (git): Don't redefine RB_OBJ_WRITE
RB_OBJ_WRITE already exists in rgengc.h, so we shouldn't redefine it in
gc.h.
peterzhu2118 (Peter Zhu)
12:59 PM Revision e3336e09 (git): Define RUBY_VERSION_IS_3_3 macro in rubyspec.h
nobu (Nobuyoshi Nakada)
12:16 PM Bug #19350: Backport the latest stable version of RubyGems/Bundler
I removed https://github.com/ruby/ruby/commit/2bbf63dd867fe3d349b1758805ad4421f2d772ab from https://github.com/ruby/ruby/pull/7061 hsbt (Hiroshi SHIBATA)
08:33 AM Bug #19350 (Closed): Backport the latest stable version of RubyGems/Bundler
RubyGems 3.4.4 and Bundler 2.4.4 have been released. We should backport them into `ruby_3_2` branch.
https://github.com/ruby/ruby/pull/7061
I also added patch for [Bug #19298] to above pull-request.
hsbt (Hiroshi SHIBATA)
11:19 AM Revision d275adde (git): Pin simplecov-0.20.0
hsbt (Hiroshi SHIBATA)
11:19 AM Revision 18d8333c (git): Switch to use gem version of simplecov, not git clone
hsbt (Hiroshi SHIBATA)
11:15 AM Revision d7fb4629 (git): merge revision(s) 837ef8911c638c3e2bdb6af710de7c1fac7b5f90: [Backport #19305]
Fix crash in TracePoint c_call for removed method
trace_arg->id is the ID of the original method of an aliased method. If
the original method is removed, then the lookup will fail. We should use
trace_arg->called...
naruse (Yui NARUSE)
11:15 AM Bug #19271: irb ignores rbs and debug
ruby_3_2 f7e9b79f815e08e0a29fff11f77466f4ffb92520 merged revision(s) 4959e01932cf6c4d3e5e90d3e0b4fa780f754fa6. naruse (Yui NARUSE)
11:14 AM Bug #19298: `lib/mjit/instruction.rb` was reintroduced by merge mistake
ruby_3_2 44a3043d1182acf3147935d9c1564028b5538417 merged revision(s) 2bbf63dd867fe3d349b1758805ad4421f2d772ab. naruse (Yui NARUSE)
11:14 AM Revision 44a3043d (git): merge revision(s) 2bbf63dd867fe3d349b1758805ad4421f2d772ab: [Backport #19298]
Remove lib/mjit/instruction.rb
This was accidentally re-introduced in f6620037ba1477d2c337d7b511f094d6d0fbb69c.
[Bug #19298]
---
lib/mjit/instruction.rb | 2162 ------------------------------------------...
naruse (Yui NARUSE)
09:58 AM Bug #19336: Backport commit eab7f4623fbf0488e828b75843d70c8e02dc8aa5
ruby_3_2 057eff7663a0a4bc95a4799336a2bc14ca2480f0 merged revision(s) eab7f4623fbf0488e828b75843d70c8e02dc8aa5. naruse (Yui NARUSE)
09:56 AM Revision 1fb5eb57 (git): merge revision(s) aeddc19340c7116d48fac3080553fbb823857d16: [Backport #19316]
YJIT: Save PC and SP before calling leaf builtins (#7090)
Previously, we did not update `cfp->sp` before calling the C function of
ISEQs marked with `Primitive.attr! "inline"` (leaf builtins). This
caused the GC ...
naruse (Yui NARUSE)
09:56 AM Revision f7e9b79f (git): merge revision(s) 4959e01932cf6c4d3e5e90d3e0b4fa780f754fa6: [Backport #19271]
common.mk: Do not invoke outdate-bundled-gems by default
If baseruby is available (and its version is different from one being
built) when compiling ruby, tool/outdate-bundled-gems.rb (which is
invoked by `make i...
naruse (Yui NARUSE)
09:54 AM Bug #19296: Time.new's argument check is incomplete
ruby_3_2 52ea5ea9906c3a96c60a68e01b303672602a6832 merged revision(s) 291a4098cf649c027cb50c16b872455f26ad1dfb,5be0d42d2c4dc765230c76738289560f9ee37f09. naruse (Yui NARUSE)
09:09 AM Bug #19297: Don't download content from internet to execute Ruby test suite
For what it's worth, Bundler's main test suite should pass now without an internet connection since https://github.com/rubygems/rubygems/pull/6243. deivid (David Rodríguez)
08:18 AM Revision 97c32b49 (git): merge revision(s) 43ff0c2c488c80aaf83b486d45bcd4a92ebe3848: [Backport #19299]
YJIT: Fix `yield` into block with >=30 locals on ARM
It's a register spill issue. Fix by moving the Qnil fill snippet to
after registers are released.
[Bug #19299]
---
test/ruby/test_yjit.rb | 1...
naruse (Yui NARUSE)
08:17 AM Revision 52ea5ea9 (git): merge revision(s) 291a4098cf649c027cb50c16b872455f26ad1dfb,5be0d42d2c4dc765230c76738289560f9ee37f09: [Backport #19296]
Add missing assertion
---
test/ruby/test_time.rb | 3 +++
1 file changed, 3 insertions(+)
[Bug #19296] Precheck bits of time components
---
test/ruby/test_time.rb | 15 +++++++++++++++
...
naruse (Yui NARUSE)
08:09 AM Bug #19264: Backport 9f2378959e5c5b5c39c9993f1a84e5304ff113d6
I think this shouldn't be backported naruse (Yui NARUSE)
08:08 AM Revision 057eff76 (git): merge revision(s) eab7f4623fbf0488e828b75843d70c8e02dc8aa5: [Backport #19336]
Return 0 if there is no CFP on the EC yet
StackProf uses a signal handler to call `rb_profile_frames`. Signals
are delivered to threads randomly, and can be delivered after the thread
has been created but before...
naruse (Yui NARUSE)
08:04 AM Bug #19292: Time object's wday, yday, and isdst returns broken value (and so does to_a) when kwarg in: 'UTC' was given
ruby_3_2 89cd61890fe78e0491708f87a5df678b03fda8a3 merged revision(s) 542e984d82fa25098eb15398d716d907acc52b93. naruse (Yui NARUSE)
08:03 AM Bug #19284: Integer overflow when using RUBY_GC_HEAP_INIT_SLOTS environment variable
ruby_3_2 49cf0896a2934547c0764aadaec021fb37a2e96f merged revision(s) 90a80eb076429978e720e11fb17a3cbb96de3454. naruse (Yui NARUSE)
07:14 AM Revision ba45be3c (git): Supressing warnings messages like:
Ignoring debug-1.7.1 because its extensions are not built. Try: gem pristine debug --version 1.7.
Revert "Clear gem paths for each test"
This reverts commit 6698b580ddad8cfa8c5c86df9328472820d3ee6a.
hsbt (Hiroshi SHIBATA)
06:26 AM Revision 5fc97f34 (git): benchmark_driver v0.16.3
Some chruby-related features and bug fixes. k0kubun (Takashi Kokubun)
05:31 AM Revision 7e97e2ba (git): Update RBS commit hash (#7143)
Use a commit at the top of RBS 2.8.3, not 3.0.0.dev.N. soutaro (Soutaro Matsumoto)
05:28 AM Revision 2d7e6395 (git): [ruby/reline] multiline_repl do not need to depend on RubyLex
(https://github.com/ruby/reline/pull/502)
* multiline_repl do not need to depend on RubyLex
* Add auto indent test
tompng (tomoya ishida)
05:25 AM Revision 46066d0b (git): Change ArgumentError message when Comparable#clamp receives min value higher than max value
kaiquekandykoga (Kaíque Koga)
04:53 AM Revision 5ce3855d (git): Update default gems list at 8a771efec21c9dacad5bb8bf14b81c [ci skip]
git[bot]
04:53 AM Revision 8a771efe (git): [ruby/psych] Bump up 5.0.2
https://github.com/ruby/psych/commit/a170b8eb46 hsbt (Hiroshi SHIBATA)
03:27 AM Bug #19349: Kernel.Integer silently discards base argument that does not have a #to_int
https://github.com/ruby/ruby/pull/7144 nobu (Nobuyoshi Nakada)
03:02 AM Revision 8ae4e3dd (git): Clean up removed directories in ext/Setup* [ci skip]
znz (Kazuhiro NISHIYAMA)
02:57 AM Revision 2fa3fda0 (git): Remove removed files from ext/.document [ci skip]
- dbm/dbm.c removed at 55cd3e4ebff8fa75854ecadcd77abbf7cf4b5823
- fiber/fiber.c removed at 521ad9a13aef1e1dae4eaff70d3e6b2e358aa095
- gdbm/gdbm.c removed at edcc29dcff1b269b7748ab83adf21b2f3f97ebff
znz (Kazuhiro NISHIYAMA)

01/17/2023

11:36 PM Bug #19297: Don't download content from internet to execute Ruby test suite
We can add the option of skipping `test-syntax-suggest` to `make check`.
And Fedora can use `make test test-tool test-all test-spec` instead of `make check` for past behavior.
hsbt (Hiroshi SHIBATA)
07:48 PM Bug #19297: Don't download content from internet to execute Ruby test suite
How about adding `make test-offline` and that only runs test suites which don't need any internet connection?
I think that's a better fix, those who want to test offline must accept they only test a subset, I'm confident Bundler will no...
Eregon (Benoit Daloze)
06:14 PM Bug #19297: Don't download content from internet to execute Ruby test suite
For a fix on our side. We could:
## Switch to test-unit
Update `syntax_suggest` to use test unit instead of rspec (since it seems that works fine on other libraries).
This would be straight-forward, though tedious.
## Res...
schneems (Richard Schneeman)
10:13 PM Feature #19333: Setting (Fiber Local|Thread Local|Fiber Storage) to nil should delete value in order to avoid memory leaks.
Thanks for the code search link.
Regarding the usage, wouldn't it only matter if the variable was checked with `thread_variable?` or equivalent? Because `thread_variable_get(:x)` is `nil` regardless of whether it's set (to `nil`) or not...
ioquatix (Samuel Williams)
11:41 AM Feature #19333: Setting (Fiber Local|Thread Local|Fiber Storage) to nil should delete value in order to avoid memory leaks.
There are some, yes, see https://github.com/search?q=%22Thread.current%5B%22+%22%5D+%3D+nil%22+language%3ARuby&type=code&l=Ruby
A better search with a Regexp: https://github.com/search?q=%2FThread.current%5C%5B.*%5C%5D+%3D+nil%2F+languag...
Eregon (Benoit Daloze)
06:40 AM Feature #19333: Setting (Fiber Local|Thread Local|Fiber Storage) to nil should delete value in order to avoid memory leaks.
> The user might use nil as a "valid value"
Have you seen any examples of this?
ioquatix (Samuel Williams)
09:37 PM Bug #11230: Should rb_struct_s_members() be public API?
I submitted a pull request to remove the prototype from the public header files: https://github.com/ruby/ruby/pull/7141
`rb_struct_s_members` is still an exported symbol as it is used internally by `marshal.c`.
One of reasons state...
jeremyevans0 (Jeremy Evans)
09:21 PM Revision a9bcc058 (git): Update yjit.md
maximecb (Maxime Chevalier-Boisvert)
07:58 PM Misc #19304: Kernel vs Object documentation
Thanks for voicing that, @zverok! I always found this confusing (i.e., some methods being defined in Kernel, not in Object), and I'd love to see the docs reflect that in some form. (1) feels like the right thing to do, so what are the ro... matheusrich (Matheus Richard)
06:36 PM Feature #8827 (Closed): A method that flips the receiver and the first argument
jeremyevans0 (Jeremy Evans)
06:32 PM Feature #8827: A method that flips the receiver and the first argument
Since `then` has been introduced, I think using that is more straightforward. I withdraw this feature. Please close it. sawa (Tsuyoshi Sawada)
06:07 PM Bug #19349: Kernel.Integer silently discards base argument that does not have a #to_int
And likely related: in case the output of the call to `to_int` returns something that is not an integer, it gets discarded as well
```
Kernel.Integer('10', Object.new.tap { |x| x.define_singleton_method(:to_int) { '8' } })
=> 10
```
herwin (Herwin W)
05:59 PM Bug #19349 (Closed): Kernel.Integer silently discards base argument that does not have a #to_int
The method `Kernel.Integer` has an optional argument `base`, which is the base to convert the input to:
```
irb(main):001:0> Kernel.Integer('10', 8)
=> 8
```
If the base argument is not an integer, it is converted using `#to_int`
`...
herwin (Herwin W)
05:32 PM Bug #19334: Defining many instance variables and accessing them is slow in Ruby 3.2.0
> An extra map/Hash per Shape to know which ivars it contains could work
Yeah that's more what I had in mind.
> ...
What about one every X shapes? This way you'd have to walk at most X shapes, and then to one hash lookup. X could b...
byroot (Jean Boussier)
03:53 PM Bug #19334: Defining many instance variables and accessing them is slow in Ruby 3.2.0
byroot (Jean Boussier) wrote in #note-5:
> IIRC Aaron mentioned that V8 use a hash table after a certain number of edges (20?).
That's the complexity I'm talking about above which IMO is not worth it (that JS completely changes its o...
Eregon (Benoit Daloze)
02:32 PM Bug #19334: Defining many instance variables and accessing them is slow in Ruby 3.2.0
> I suppose this could be dramatically improved by storing the iv_index inside each shape, at the expense of using a bit more memory.
Actually, nevermind, the iv_index is already in the shape. The reason it's particularly slow here is...
byroot (Jean Boussier)
02:26 PM Bug #19334: Defining many instance variables and accessing them is slow in Ruby 3.2.0
Out of curiosity I profiled this script. 99% of the time is spent in `rb_shape_get_iv_index()`, which makes sense given that it walk back up the shape tree on every access, so the deeper the tree the longer it takes.
I suppose this co...
byroot (Jean Boussier)
04:46 PM Bug #19348 (Closed): GVL being released earlier than expected when loading iseqs
Applied in changeset commit:git|df6b72b8ff7af16a56fa48f3b4abb1d8850f4d1c.
----------
Avoid checking interrupt when loading iseq
The interrupt check will unintentionally release the VM lock when loading an iseq.
And this will cause issu...
Anonymous
11:30 AM Bug #19348 (Closed): GVL being released earlier than expected when loading iseqs
When using the `debug` gem in a Rails app with Ruby 3.2, I noticed that if the VS Code editor connects to the debugger during the app boot, this error could occur:
```
DEBUGGER: ReaderThreadError: uninitialized InstructionSequence
...
st0012 (Stan Lo)
01:01 PM Revision df6b72b8 (git): Avoid checking interrupt when loading iseq
The interrupt check will unintentionally release the VM lock when loading an iseq.
And this will cause issues with the `debug` gem's
[`ObjectSpace.each_iseq` method](https://github.com/ruby/debug/blob/0fcfc28acae33ec1c08068fb7c33703cfa68...
Stan Lo
12:04 PM Bug #19293: The new Time.new(String) API is nice... but we still need a stricter version of this
I think a new method is cleaner. Or maybe reusing `Time.iso8601`.
It feels a hack for Time.new two wildly different things based on the number of arguments and as shown here it's ambiguous.
I had the same concerns when Time.new start...
Eregon (Benoit Daloze)
11:55 AM Feature #19315: Lazy substrings in CRuby
mame (Yusuke Endoh) wrote in #note-7:
> I don't disagree this proposal, but it would be nice if we could evaluate the effectiveness of this optimization.
https://github.com/ruby/net-protocol/pull/14 shows gains between 2% and 27%, an...
Eregon (Benoit Daloze)
03:53 AM Feature #19315: Lazy substrings in CRuby
I heard that Java stopped the shared substring technique 10 years ago (https://www.infoq.com/news/2013/12/Oracle-Tunes-Java-String/) because of the potential for memory leaks
I don't disagree this proposal, but it would be nice if we ...
mame (Yusuke Endoh)
09:57 AM Bug #19339 (Closed): Defining ivar on special constants with @ syntax causes segv
Applied in changeset commit:git|ed6fbb79e19bf401db0e85447fee955fd10a25c7.
----------
Fix crash when defining ivars on special constants
[Bug #19339]
peterzhu2118 (Peter Zhu)
09:57 AM Revision 9399352a (git): [rubygems/rubygems] Bump rb-sys in /test/rubygems/test_gem_ext_cargo_builder/custom_name
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.54 to 0.9.56.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.54...v0.9.56)
---
updated-depende...
dependabot[bot]
09:51 AM Revision ed6fbb79 (git): Fix crash when defining ivars on special constants
[Bug #19339] peterzhu2118 (Peter Zhu)
08:47 AM Revision f8249eb4 (git): Update default gems list at 492d37fbbd3613b7fb180eec529860 [ci skip]
git[bot]
08:46 AM Revision 492d37fb (git): [ruby/psych] Bump up 5.0.2.pre1 for testing
https://github.com/ruby/psych/commit/67ec299c68 hsbt (Hiroshi SHIBATA)
08:26 AM Revision dd510da8 (git): [ruby/psych] configure of libyaml couldn't detect "arm64-apple-darwin22" for build host.
checking whether make sets $(MAKE)... (cached) yes
checking build system type... arm-apple-darwin21.6.0
checking host system type... Invalid configuration `arm64-apple-darwin21': machine `arm64-apple' not recognized
configure: erro...
hsbt (Hiroshi SHIBATA)
07:56 AM Revision 01e28afd (git): test-syntax-suggest is now part of make check
hsbt (Hiroshi SHIBATA)
07:50 AM Revision aad1563c (git): Added make exam to help message
hsbt (Hiroshi SHIBATA)
07:48 AM Revision da7818e6 (git): Added test-syntax-suggest to help message
hsbt (Hiroshi SHIBATA)
07:19 AM Revision d7af0f60 (git): [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.54 to 0.9.56.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.54...v0.9.56)
---
updated-depende...
dependabot[bot]
05:31 AM Revision ff3c1d9e (git): SimpleCov is hosted under simplecov-ruby org now
hsbt (Hiroshi SHIBATA)
02:21 AM Revision 89cd6189 (git): merge revision(s) 542e984d82fa25098eb15398d716d907acc52b93: [Backport #19292]
[Bug #19292] Re-initialize tm when wday or yday is not set
---
test/ruby/test_time.rb | 3 ++-
time.c | 31 ++++++++++++++++++++++---------
2 files changed, 24 insertions(+), 10 deletion...
naruse (Yui NARUSE)
02:20 AM Revision 49cf0896 (git): merge revision(s) 90a80eb076429978e720e11fb17a3cbb96de3454: [Backport #19284]
Fix integer underflow when using HEAP_INIT_SLOTS
There is an integer underflow when the environment variable
RUBY_GC_HEAP_INIT_SLOTS is less than the number of slots currently
in the Ruby heap.
[Bug #192...
naruse (Yui NARUSE)
02:17 AM Feature #19346: Add Ractor escape hatch Ractor.disable_isolation_checks! { }
Hi, thank you for replying. Rubygems is thread-safe but it doesn't work calling `require` inside a non-main ractor because the rubygems internal logic doesn't follow strict isolation protocol. luke-gru (Luke Gruber)

01/16/2023

11:04 PM Feature #19347: Add Dir.fchdir
Having actually read the title of this issue, I see it's for implementing `fchdir`, not `openat` - but the point is the same, directory file descriptors are important to avoid some race conditions and Ruby doesn't really have a way to us... kjtsanaktsidis (KJ Tsanaktsidis)
11:01 PM Feature #19347: Add Dir.fchdir
I have definitely wanted this before FWIW. The main use-case I've had for this feature is writing code to look at things in the `/proc` filesystem on Linux. If a process exits, its pid can be re-used, and so the same path in `/proc` can ... kjtsanaktsidis (KJ Tsanaktsidis)
10:51 PM Feature #19347 (Closed): Add Dir.fchdir
Recently, I was working on a program that passes file descriptors over UNIX sockets (using `send_io`/`recv_io`). For file/socket/device descriptors, this works fine using `File#reopen`. However, I found that while Ruby supports `Dir#fi... jeremyevans0 (Jeremy Evans)
10:52 PM Misc #19240: DevMeeting-2023-01-19
* [Feature #19347] Add Dir.fchdir (jeremyevans0)
* This method is useful when passing directory file descriptors through UNIX sockets or to child processes to avoid TOCTOU vulnerabilities.
* We already have Dir#fileno, but nothing ...
jeremyevans0 (Jeremy Evans)
10:32 PM Revision 14fe7a08 (git): YJIT: Use ThinLTO for Rust parts in release mode
This reduces the code size of libyjit.a by a lot. On darwin it went from
23 MiB to 12 MiB for me. I chose ThinLTO over fat LTO for the relatively
fast build time; in case we need to debug release-build-only problems
it won't be painful.
alanwu (Alan Wu)
08:45 PM Revision b5725959 (git): addr2line.c: Silence GCC 11 false -Wmaybe-uninitialized warning
No warnings from GCC 12. alanwu (Alan Wu)
07:25 PM Revision e22a1fbe (git): addr2line.c: Don't special-case DWARF 5 parsing with GCC
While trying to fix YJIT's symbol hygiene issue over at GH-7115, I found
that addr2line.c's DWARF 5 parsing is half-disabled when building with
GCC. Rust's output contains some DW_AT_rnglists_base records, which the
disabled code reads. ...
alanwu (Alan Wu)
06:21 PM Feature #19346 (Rejected): Add Ractor escape hatch Ractor.disable_isolation_checks! { }
This kind of escape hatch can break the Ractor's assumptions so it is not accepted.
For example, we are working on making ractor-local GC and in this case an object can not be reached from other ractors without special sharing logic.
...
ko1 (Koichi Sasada)
03:55 PM Feature #19346 (Rejected): Add Ractor escape hatch Ractor.disable_isolation_checks! { }
It would be nice to be able to autoload constants inside Ractors. I'm not sure why this is disabled right now because if autoloading is working properly inside threads
then my initial thought is that the autoload implementation should w...
luke-gru (Luke Gruber)
05:09 PM Bug #19266: URI::Generic should use URI::RFC3986_PARSER instead of URI::DEFAULT_PARSER
After a couple of weeks with no reply I wanted to ask if I could get at least one comment on this issue?
A quick summary of the issue:
* In 2014, `URI` was updated to use a new RFC3986-compliant parser by default instead of the pre...
gareth (Gareth Adams)
05:02 PM Revision 30bd2a32 (git): [DOC] Correction to RDoc for Regexp.new (#7130)
Correction to RDoc for Regexp.new burdettelamar (Burdette Lamar)
03:37 PM Bug #19345: Class variable access from top-level inappropriate error
Thanks for the explanation :) class_eval with string also works to change scope, apparently. luke-gru (Luke Gruber)
01:26 PM Bug #19345 (Closed): Class variable access from top-level inappropriate error
Class variables work similar to constants in terms of lookup, they only use the scopes opened by `class Name/module Name/class << expr`.
`module_{eval,exec}/class_{eval,exec}` do not change that scope.
So this is expected, `EnvUtil.lab...
Eregon (Benoit Daloze)
04:50 AM Bug #19345: Class variable access from top-level inappropriate error
I just looked into this some more and if we want to allow the above code to work then we need to change the way the class variable cache works right now. Right now because the lookup of the class where we set the @@variables is static, i... luke-gru (Luke Gruber)
03:59 AM Bug #19345 (Closed): Class variable access from top-level inappropriate error
I was looking at doing something like this:
```ruby
set_cvar = EnvUtil.labeled_class("SetCVar") do
def self.set(val)
@@a = val
end
end
set_cvar.set(1) # fill write cache
set_cvar.freeze
set_cvar.set(2) # hit write cach...
luke-gru (Luke Gruber)
02:34 PM Bug #19339: Defining ivar on special constants with @ syntax causes segv
Thank you for reporting this bug. I opened a PR with the fix here: https://github.com/ruby/ruby/pull/7129 peterzhu2118 (Peter Zhu)
01:59 PM Bug #19154: Specify require and autoload guarantees in ractors
> I think require/autoload in a Ractor should simply be forbidden.
That would be a resolution for this ticket.
fxn (Xavier Noria)
01:41 PM Bug #19154: Specify require and autoload guarantees in ractors
luke-gru (Luke Gruber) wrote in #note-2:
> As long as there's a mutex somewhere protecting these mutations it's safe. There is a mutex around rubygems require. I only had to add `Ractor.force_shareable!` to 2 or 3 places in the rubygems ...
Eregon (Benoit Daloze)
01:46 PM Bug #17420: Unsafe mutation of $" when doing non-RubyGems require in Ractor
@ko1 I believe this needs to be an exception until there is a better solution.
It's likely possible to create a segfault with concurrent mutations of `$"` currently.
And anyway `require` does not work in non-main Ractors, not just `$"`...
Eregon (Benoit Daloze)
11:53 AM Feature #19333: Setting (Fiber Local|Thread Local|Fiber Storage) to nil should delete value in order to avoid memory leaks.
The current solution/workaround to both of these memory leaks is to use concurrent-ruby's [ThreadLocalVar](https://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/ThreadLocalVar.html) (and upcoming FiberLocalVar), which is t... Eregon (Benoit Daloze)
09:53 AM Feature #19333: Setting (Fiber Local|Thread Local|Fiber Storage) to nil should delete value in order to avoid memory leaks.
While the proposed idea is a good move in the right direction, it doesn't handle cases where several (a large number) threads all have the SAME thread local, and that thread local goes out of scope, e.g.
```ruby
name = ":local-#{object_...
ioquatix (Samuel Williams)
10:44 AM Revision a2748c50 (git): [DOC] Update `String#encode` special case
This behavior has been slightly extended with the addition of
`String#scrub`.
nobu (Nobuyoshi Nakada)
09:52 AM Misc #18976: [ANN] blade.nagaokaut.ac.jp is down
I restored `ruby-talk` archives today. Sorry, I forgot to do it. hsbt (Hiroshi SHIBATA)
07:47 AM Bug #19342 (Closed): String#encode does not always throw exceptions for invalid source encodings
I fixed the documentation (which was moved to doc/string/encode.rdoc by @nobu in commit:468ce1488d) in commit:11f28f3268. I think that this issue can therefore be closed. duerst (Martin Dürst)
12:55 AM Bug #19342: String#encode does not always throw exceptions for invalid source encodings
This was discussed in issue 6190. As you already say, it's somehow a weird case. The decision was to make transcoding from an encoding to the same encoding a no-op for performance. There was also some documentation (now in git commit com... duerst (Martin Dürst)
07:30 AM Revision 11f28f32 (git): [DOC] Explain that transcoding to the same encoding just copies.
This is a reenstatement of the explanation in commit
463633e4a934a00f869086a6ffbf84c6cb8ad630 to partially
address Bug #19342.
duerst (Martin Dürst)
07:22 AM Feature #19344: Regexp.new: stricter handling of second argument
It is already warned with `$VERBOSE`, and this make to raise `ArgumentError`.
```diff
diff --git a/re.c b/re.c
index 7a743185589..f03c2b48a1e 100644
--- a/re.c
+++ b/re.c
@@ -3866,7 +3866,7 @@ reg_extract_args(int argc, VALUE *ar...
nobu (Nobuyoshi Nakada)
05:19 AM Feature #19325: YJIT: Windows support lacking.
Hello everyone!
First, let me thank you for all your work! Ruby on Windows has helped me a lot over the years. Gems with C extensions used sometimes fail to install, but nowadays it works. Ruby Installer with MSYS2 actually works quite ...
aidog (Andi Idogawa)
04:38 AM Revision 468ce148 (git): [DOC] Use RDoc inclusions in transcode.c
nobu (Nobuyoshi Nakada)
03:33 AM Bug #19340: Ruby master 'make install' not installing rbs gem
From the ruby-loco log, which has the Ruby PR applied:
```
Copying rbs@eab5367add3469b3f614e663ba43a3debc62420a to rbs-3.0.0.dev.1
From https://github.com/ruby/rbs
* branch eab5367add3469b3f614e663ba43a3debc62420a...
MSP-Greg (Greg L)
02:44 AM Bug #19340: Ruby master 'make install' not installing rbs gem
I couldn't reproduce it.
And What should we install their versions?
1. rbs of eab5367add3469b3f614e663ba43a3debc62420a(not 3.0.0.dev.1)
2. 3.0.0.dev.1
3. rbs-2.8.3
4. Nothing, We skip to install rbs because there is no tested ve...
hsbt (Hiroshi SHIBATA)

01/15/2023

11:00 PM Revision 4617b40f (git): fix typo in comments / autodoc
replace _socktype_ with _type_ in the comments RickHull (Rick Hull)
05:10 PM Feature #19344 (Open): Regexp.new: stricter handling of second argument
Since Ruby 3.2 (#18788), the second argument to `Regexp.new` can be:
1. Integer: then it is treated as a combination of `Regexp::<constant>` flags
2. String: then it is treated as a combination of string flags
3. `nil` or `false`: the...
zverok (Victor Shepelev)
02:57 PM Revision 6698b580 (git): Clear gem paths for each test
So that rubygems can find the bundled rake. nobu (Nobuyoshi Nakada)
08:21 AM Revision 088132fb (git): Do not depend on `REVISION_H`
Disable for now, since this seems causing infinite rebuilding. nobu (Nobuyoshi Nakada)
07:54 AM Bug #19154: Specify require and autoload guarantees in ractors
I've also got parallel references to constant for which there is autoload working, with a few tweaks to the VM needed.
```ruby
rs = []
autoload :C, './test3.rb'
1000.times do
rs << Ractor.new do
C
C
C
end
end
p rs.map(&...
luke-gru (Luke Gruber)
01:33 AM Bug #19154: Specify require and autoload guarantees in ractors
I've taken a look at this a bit and got this working:
```ruby
require 'rubygems' # get rubygems version of require
rs = []
100.times do
rs << Ractor.new do
require './c.rb'
end
end
rs.each(&:take)
p C
```
In file c.rb, it's
```r...
luke-gru (Luke Gruber)
07:02 AM Bug #19343 (Closed): Integer#ceildiv should respect #coerce
https://github.com/ruby/ruby/pull/7118
This issue is similar to #19335.
```Ruby
c = Object.new
def c.coerce(other) = [other, 10]
p 1234 / c # => 123
p 1234.div(c) # => 123
p 1234.quo(c) # => (617/5)
p 1...
kyanagi (Kouhei Yanagita)
05:24 AM Bug #19342 (Closed): String#encode does not always throw exceptions for invalid source encodings
Documentation says that String#encode throws Encoding::InvalidByteSequenceError when the string isn't valid in the source encoding, but it does not always do so:
```
"\x99".encode('UTF-8', 'UTF-8')
"\x99".force_encoding('UTF-8').enc...
mathieu451 (Math Ieu)
04:03 AM Bug #19335 (Closed): Integer#remainder and Numeric#remainder should respect #coerce
Applied in changeset commit:git|71ce7e1825c5b8fe08dd96cd77c6a379afd34256.
----------
[Bug #19335] `Integer#remainder` should respect `#coerce` (#7120)
Also `Numeric#remainder` should.
nobu (Nobuyoshi Nakada)
04:03 AM Revision 71ce7e18 (git): [Bug #19335] `Integer#remainder` should respect `#coerce` (#7120)
Also `Numeric#remainder` should. nobu (Nobuyoshi Nakada)

01/14/2023

09:56 PM Bug #19341 (Closed): Write cache issue with class variables
``` ruby
class SetCvar
def self.set(val)
@@a = val # inline cache
end
end
def test_set_cvar_on_frozen_object
SetCvar.set(1) # fill write cache
SetCvar.freeze
SetCvar.set(2) # hit write cache, but should check fro...
luke-gru (Luke Gruber)
09:22 PM Bug #19340 (Closed): Ruby master 'make install' not installing rbs gem
Last three daily builds of ruby-dev-builder have not included the rbs gem.
See https://github.com/ruby/ruby-dev-builder/actions/runs/3919887598/jobs/6701177359#step:17:284
ruby/ruby PR https://github.com/ruby/ruby/pull/7114
ruby...
MSP-Greg (Greg L)
09:02 PM Bug #19339 (Closed): Defining ivar on special constants with @ syntax causes segv
```ruby
1.instance_eval do
@a = 1
end
```
There's a missing check at the top of vm_setivar_fastpath, should be:
```c
if (UNLIKELY(RB_SPECIAL_CONST_P(obj))) { // example code: 1.instance_eval { @a = 1 }
rb_check_...
luke-gru (Luke Gruber)
06:48 PM Bug #19338: Ruby hangs when ouputting warnings inside ractor with VM lock held
To simplify the problem, this hangs too:
```ruby
MYCONSTANT = 1
Ractor.new do
MYCONSTANT = 2
end.take
```
luke-gru (Luke Gruber)
06:15 PM Bug #19338 (Closed): Ruby hangs when ouputting warnings inside ractor with VM lock held

This code causes Ruby to hang:
``` ruby
rs = []
2.times do
rs << Ractor.new do
MYCONSTANT = 2
end
end
rs.each(&:take)
```
There is a problem when the warning is being outputted with multiple ractors. A thread is c...
luke-gru (Luke Gruber)
11:30 AM Revision 1ddeb747 (git): Move the dependency of makefiles on revision header [ci skip]
Since `REVISION_H` is defined in common.mk which is appended or
included after Makefile.in, it was undefined yet at the point of the
dependency.
nobu (Nobuyoshi Nakada)
09:19 AM Revision 5b26f76a (git): [ruby/reline] Correspond to refactored RubyLex
(https://github.com/ruby/reline/pull/498)
* Correspond to refactored RubyLex
ref: https://github.com/ruby/irb/pull/503
* Fix test_yamatanooroti
hasumikin (hitoshi hasumi)
09:19 AM Revision cb9b885e (git): [ruby/irb] Store context in RubyLex
Some background for this refactor:
1. Through a RubyLex instance's lifetime, the context passed to its methods
should be the same.
Given that `Context` is only initialised in `Irb#initialize`,
this should be true.
2. When `Rub...
st0012 (Stan Lo)
09:13 AM Bug #19337: What is the difference between "default" gems and "bundled" gems?
This is likely dupe of my #18381, which was not addressed yet. vo.x (Vit Ondruch)
07:40 AM Bug #19337 (Closed): What is the difference between "default" gems and "bundled" gems?
Although I found [some answers](https://nts.strzibny.name/ruby-stdlib-default-bundled-gems/) on the [internet](https://stdgems.org), it seems like this information should be available from Ruby itself, if it's not already.
Perhaps thi...
zzak (zzak _)
01:24 AM Revision 2082ba7c (git): [ruby/psych] Remove deleted file from gemspec
https://github.com/ruby/psych/commit/77861ff281 headius (Charles Nutter)
 

Also available in: Atom