Activity
From 06/06/2023 to 06/12/2023
06/12/2023
-
07:33 PM Bug #19724 (Closed): Dir.home returns incorrect home directory
-
07:29 PM Bug #19724: Dir.home returns incorrect home directory
- Ok, my apologies. This was caused by one part of a rather big ruby system passing `:unsetenv_others` into the options for `Process.spawn` with value `true` and one of the processes spawned that way was itself a ruby process. It was that ...
-
05:34 AM Bug #19724: Dir.home returns incorrect home directory
- Looking at the implementation of `rb_default_home_dir`, `$HOME` is always checked, and `getlogin`/`getpwnam` is only used when `$HOME` is not set. If `$HOME` is not set, then Ruby does use `getlogin`, but that appears to be intentional,...
-
03:06 AM Bug #19724 (Closed): Dir.home returns incorrect home directory
- This is probably related to 16787.
From the patch on that issue I conclude that ruby uses getlogin and co to obtain the name of the logged-in user, but that is not valid. Ruby must use the uid of the running process since the user tha... -
06:38 PM Revision 3168f618 (git): hash.c no longer needs the transient heap
-
06:30 PM Revision 78ca0857 (git): Revert "YJIT: Break register cycles for C arguments (#7918)"
- This reverts commit 888ba29e462075472776098f4f95eb6d3df8e730.
It caused a CI failure
http://ci.rvm.jp/results/trunk-yjit@ruby-sp2-docker/4598881
and I'm investigating it. -
04:54 PM Revision 888ba29e (git): YJIT: Break register cycles for C arguments (#7918)
-
04:15 PM Feature #19719: Universal Parser
- IMO it's quite strange and not respectful of the Ruby development workflow to:
* create an issue about a big feature but discuss literally none of the details. Notably the background, design and release management sections are all compl... -
10:10 AM Feature #19719 (Closed): Universal Parser
- Applied in changeset commit:git|b481b673d753339204290d7582dbb91a6e14447a.
----------
[Feature #19719] Universal Parser
Introduce Universal Parser mode for the parser.
This commit includes these changes:
* Introduce `UNIVERSAL_PARSER` ... -
04:59 AM Feature #19719: Universal Parser
- I agree API-wise, YARP is better, and already used from various tools, including TruffleRuby. On the other hand, Lrama is 100% compatible to the current parser (by definition).
As long as kaneko-san (@yui-knk) is willing to try, I'd lik... -
02:42 AM Feature #19719: Universal Parser
- >Release it as gem (ruby/universal_parser)
I'll support it. Please ping me when you need to create new repository under the ruby organization. -
02:20 PM Revision 6fe46ff9 (git): When alloc size is too large, only allocate struct
-
12:31 PM Revision 31e24a42 (git): [ruby/psych] Comment out the code used to expand the file list [ci skip]
- https://github.com/ruby/psych/commit/715f3bfad0
-
11:22 AM Revision 81836c6c (git): Fix duplicate symbol errors when statically linking ripper
-
10:26 AM Bug #19726 (Rejected): Script loaded twice when requiring self
- The executed program is not added to `$LOADED_FEATURES` unexpectedly resulting in the program possibly being loaded twice:
a.rb:
```
#!/usr/bin/env ruby
require "./b"
C = 42
return unless __FILE__ == $0
puts C
```
b.... -
10:10 AM Revision 41035273 (git): [DOC] Should use `NULL` instead of zero
- Since no type information is available for variadic arguments, 0 is
passed as `int` without promoting to pointer. On platforms where
`sizeof(int) < sizeof(void*)`, the terminator argument may be read
together with an adjoining word, and... -
10:10 AM Revision 70483f6c (git): Add missing dependencies
- 09:24 AM Revision a4bb2d7d (git): * expand tabs. [ci skip]
- Please consider using misc/expand_tabs.rb as a pre-commit hook.
-
09:23 AM Revision b481b673 (git): [Feature #19719] Universal Parser
- Introduce Universal Parser mode for the parser.
This commit includes these changes:
* Introduce `UNIVERSAL_PARSER` macro. All of CRuby related functions
are passed via `struct rb_parser_config_struct` when this macro is enabled.
* Add... -
07:55 AM Feature #19717: `ConditionVariable#signal` is not fair when the wakeup is consistently spurious.
- > So, tl;dr, I don't think we should do this "handoff" approach.
After reading this I realised we don't actually have to hand off the GVL when the mutex is handed off. The thread that signalled the condition variable and unlocked the ... -
07:45 AM Feature #19717: `ConditionVariable#signal` is not fair when the wakeup is consistently spurious.
- > I think it's possible, with a bit of shuffling around in thread_sync.c, for the implementation to not actually remove the thread off the ConditionVariable's waitq until it's actually successfully acquired the resource; that way, if e.g...
-
07:42 AM Feature #19717: `ConditionVariable#signal` is not fair when the wakeup is consistently spurious.
- > I like the proposed implementation. Is there any chance it still has the similar problems? If we always reque at the front, could multiple waiters reque in front of each other? i.e. it still depends on the order.
I think it can't ha... -
02:18 AM Feature #19717: `ConditionVariable#signal` is not fair when the wakeup is consistently spurious.
- > the thread which was waiting the longest will actually be the one woken
To me, this is the correct behaviour and what I try to implement in Async. If there is a spurious wakeup, you don't loose your position in the queue.
I like the ... -
02:15 AM Feature #19717: `ConditionVariable#signal` is not fair when the wakeup is consistently spurious.
- Based on the thorough analysis by @kjtsanaktsidis, this doesn't appear to be a bug in Ruby, but rather common behavior of condition variable across implementations. The idea of `ConditionVariable#wait` taking a block to address the spur...
-
07:36 AM Feature #19630: [RFC] Deprecate `Kernel#open("|command-here")` due to frequent security issues
- > is there any objection
Not from me, we should add this ticket to the next dev meeting.
However I feel like other IO methods (`IO.binread`, etc) should do the same otherwise it's a bit inconsistent.
- 07:07 AM Revision b308f7cf (git): Bump actions/checkout from 3.5.2 to 3.5.3
- Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](http... -
07:02 AM Revision bcded49d (git): [ruby/psych] Update spec files
- https://github.com/ruby/psych/commit/ba6fc48591
-
06:22 AM Feature #19725: Improve the match cache optimization to support look-ahead and atomic groups
- Pull request: https://github.com/ruby/ruby/pull/7931
-
06:07 AM Feature #19725 (Closed): Improve the match cache optimization to support look-ahead and atomic groups
- Currently, the Regexp match cache optimization [Feature #19104] memoizes match cache points that once arrived; that is, it memoizes them **before backtracking**. This kind of implementation is simple and works fine in most cases. However...
-
04:18 AM Revision f6e6d52b (git): Try to skip Prime_test.rb
-
04:18 AM Revision 8be4659b (git): Run test-unit test without rake task to avoid yard dependency
-
04:18 AM Revision 2ec18199 (git): pry is not needed for test-bundled-gems
- 03:36 AM Revision c09b75ab (git): Bump github/codeql-action from 2.3.5 to 2.13.4
- Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.5 to 2.13.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)... -
03:02 AM Revision 10e66264 (git): [ruby/psych] Prefer `assert_include` for simple strings
- https://github.com/ruby/psych/commit/33024ce2b0
-
02:16 AM Bug #19711 (Closed): NoMethodError "private method `new' called for class" since bebd05fb51ea65bc57344b67100748200f8311eb
-
02:06 AM Bug #19707 (Closed): Backport openssl fix to ruby_3_2 branch
-
02:01 AM Bug #19701: The rb_classext_t::classpath field is not marked for T_ICLASS
- There is a third option, set "FrozenCore" as an fstring that doesn't get garbage collected (via `rb_gc_register_address` or something). That reduces the cost to 1 object marking per major GC. That seems to be the best option to me if t...
06/11/2023
-
09:01 PM Feature #19723: [RFC] Deprecate/disallow passing `"|command..." values to open-uri's URI.open() method
- mdalessio (Mike Dalessio) wrote in #note-2:
> I think we should merge this discussion into #19630 since the behavior you wish to deprecate comes from `Kernel#open` (called by `URI.open` in the fall-through case).
> ...
This could be do... -
04:18 PM Feature #19723: [RFC] Deprecate/disallow passing `"|command..." values to open-uri's URI.open() method
- I think we should merge this discussion into #19630 since the behavior you wish to deprecate comes from `Kernel#open` (called by `URI.open` in the fall-through case).
If #19630 is accepted, the naive implementation proposed at https:/... -
04:35 PM Feature #19630: [RFC] Deprecate `Kernel#open("|command-here")` due to frequent security issues
- If we all agree that deprecating this behavior in `Kernel#open` is a good idea, is there any objection to something like https://github.com/ruby/ruby/pull/7915 ?
@byroot I agree with your concerns about people ignoring deprecation war... -
03:41 PM Bug #19681: The final classpath of partially named modules is sometimes inconsistent once permanently named
- @matz the related spec proposed in https://github.com/ruby/spec/pull/1044 says in a commment
> You get one of the two, but you don't know which one.
It is written this way because that is all CRuby can say, since we have seen that the ... -
02:19 PM Bug #19681: The final classpath of partially named modules is sometimes inconsistent once permanently named
- Yes, in the C spec terms, “undefined behavior” really is an “undefined behavior”, even a demon can be appeared. We can call it “implementation defined”.
Matz.
-
08:28 AM Bug #19681: The final classpath of partially named modules is sometimes inconsistent once permanently named
- New spec and a couple others for the same price in https://github.com/ruby/spec/pull/1044 👍.
-
01:32 PM Feature #19717: `ConditionVariable#signal` is not fair when the wakeup is consistently spurious.
- > have ConditionVariable#wait take an optional kwarg that lets the caller report whether their last wakeup was spurious or no
A better API might be to have the `ConditionVariable#wait` accept a block, and have Ruby do the looping & ch... -
01:29 PM Feature #19717: `ConditionVariable#signal` is not fair when the wakeup is consistently spurious.
- This is mostly just semantics, but I read some sources tonight - glibc doesn't actually do anything to implement "fair" condition variables. But, in the Linux kernel, the set of waiters waiting on a particular futex address is stored in ...
-
12:33 PM Feature #19717: `ConditionVariable#signal` is not fair when the wakeup is consistently spurious.
- I spent a bit of time looking into this issue. I think I understand _why_ it's happening now, but I don't quite know what, if anything, we should do about it.
Firstly, I fixed up the reproduction issue in a couple of ways - after thes... -
08:31 AM Revision dcdc2cbd (git): `RString::len` was moved at 7577c101ed6452de3e72fadb43db595946acc701
- [ci skip]
- 07:01 AM Revision 52131d84 (git): Update bundled gems list at 2023-06-11
06/10/2023
-
09:20 PM Feature #15192: Introduce a new "shortcut assigning" syntax to convenient setup instance variables
- I really believe this would be seen a major improvement to Ruby.
Personally, I still feel
``` ruby
def initialize(@foo)
```
is the cleanest implementation (or something else the comes _before_ the arg name), but I would be happy ... -
03:01 PM Revision e1ccb283 (git): [ruby/irb] Use `Kernel.warn` to print command alias warning
- (https://github.com/ruby/irb/pull/601)
This aligns with other warnings in irb and properly channel the message
to stderr. - 02:13 PM Revision be86767e (git): Add VM_ASSERT on `fiber->blocking == 0`. (#7926)
- I have not seen any problems with this code, but this ensures the invariant.
-
12:51 PM Revision a41e0886 (git): [ruby/irb] Remove the unused fork command definition
- (https://github.com/ruby/irb/pull/600)
https://github.com/ruby/irb/commit/b039b89343 -
01:41 AM Feature #19723 (Closed): [RFC] Deprecate/disallow passing `"|command..." values to open-uri's URI.open() method
- Due to `Kernel.open()` supporting opening pipe-commands (ex: `"|command-here..."`) this has led to multiple [1] security [2] vulnerabilities [3], where malicious user-input eventually is passed to `Kernel.open()`. One of the code-paths t...
06/09/2023
-
05:45 PM Bug #19681: The final classpath of partially named modules is sometimes inconsistent once permanently named
- Yes, absolutely, a spec example allowing both would be welcome in ruby/spec.
-
03:41 PM Bug #19681: The final classpath of partially named modules is sometimes inconsistent once permanently named
- @Eregon right, I was thinking in terms of "it is M::C or M::D, but which one of the two is undefined".
I was wondering if it would make sense to add a spec that makes this decision explicit, and tests that `M::C.name` is one of the tw... -
02:49 PM Bug #19681: The final classpath of partially named modules is sometimes inconsistent once permanently named
- Just to clarify, this is not undefined behavior (which has very scary semantics in the C language), it is: either "M::D" or "M::C" is an acceptable outcome for the program in the description.
So it is defined but non-deterministic behav... -
02:53 PM Feature #19719: Universal Parser
- Eregon (Benoit Daloze) wrote in #note-2:
> First of all, I think @yui-knk should show the status of Universal Parser and how it improves over YARP, otherwise it seems to purposefully ignore a much more advanced and established project (... -
02:12 PM Feature #19719: Universal Parser
- As I discussed with @matz and @yui-knk at RubyKaigi, the API, serialization to convert efficiently from C to Java, and AST format (a much cleaner AST) needed for JRuby and TruffleRuby are the ones developed in YARP.
JRuby and TruffleRub... -
02:43 PM Misc #19722: DevMeeting-2023-07-13
- * [Feature #19720] Warning for non-linear Regexps (eregon)
* I think this is the best way to avoid ReDoS and ensure there are no too slow Regexps in a Ruby program/app.
* So let's add `Warning[:regexp] = true`?
* I will help to ... -
05:55 AM Misc #19722: DevMeeting-2023-07-13
- * [Bug #18572] Performance regression when invoking refined methods (shugo)
* Should we limit usage of using to fix the performance issue?
* https://bugs.ruby-lang.org/issues/18572?issue_count=121&issue_position=11&next_issue... -
02:04 AM Misc #19722 (Closed): DevMeeting-2023-07-13
- # The next dev meeting
**Date: 2023/07/13 13:00-17:00** (JST)
Log: https://github.com/ruby/dev-meeting-log/blob/master/2023/DevMeeting-2023-07-13.md
- Dev meeting *IS NOT* a decision-making place. All decisions should be done at t... -
01:20 PM Feature #19694: Add Regexp#timeout= setter
- > They are never changed once initialized until destruction, "Copy-on-Write" won't be a proper word.
Right, I just meant directly sharing that structure, or more accurately having some `T_STRUCT` simply keeping a reference to another ... -
01:17 PM Feature #19694: Add Regexp#timeout= setter
- byroot (Jean Boussier) wrote in #note-12:
> > I made a patch to improve Regexp.new(/RE/) (and Regexp#dup).
> ...
Do you mean compiled pattern and so on in `OnigRegexType`?
They are never changed once initialized until destruction, "Co... -
10:00 AM Feature #19694: Add Regexp#timeout= setter
- janosch-x (Janosch Müller) wrote in #note-9:
> A custom `timeout` only being available on `Regexp::new` might lead people to write less performant code.
I think it is very well known and easy to know though profiling that one should ... -
08:05 AM Feature #19694: Add Regexp#timeout= setter
- > I made a patch to improve Regexp.new(/RE/) (and Regexp#dup).
Interesting. Given that literal regexp are frozen, and even for unfrozen ones most of their state is immutable, have you considered using Copy on Write at the Ruby object ... -
05:35 AM Feature #19694: Add Regexp#timeout= setter
- janosch-x (Janosch Müller) wrote in #note-9:
> I guess the only noteworthy argument for a change goes like this:
> ...
I made a patch to improve `Regexp.new(/RE/)` (and `Regexp#dup`).
https://github.com/nobu/ruby/tree/re_copy
Comparison... - 12:45 PM Revision d7300038 (git): * expand tabs. [ci skip]
- Please consider using misc/expand_tabs.rb as a pre-commit hook.
-
11:58 AM Feature #19630: [RFC] Deprecate `Kernel#open("|command-here")` due to frequent security issues
- postmodern (Hal Brodigan) wrote in #note-8:
> I was unaware that these methods can accept `|command` style inputs. Based on the stdlib documentation, the first argument is called `name` and the examples show reading from `testfile`, whi... -
11:22 AM Revision ab6eb378 (git): Optimize `Regexp#dup` and `Regexp.new(/RE/)`
- When copying from another regexp, copy already built `regex_t` instead
of re-compiling its source. -
10:41 AM Feature #19521: Support for `Module#name=` and `Class#name=`.
- @timcraft thanks for your input. All those issues have already been discussed, and it won't work for nested classes or existing code that uses class names without a huge retrofit. I also don't like introducing `label` as a new concept si...
-
10:00 AM Feature #19521: Support for `Module#name=` and `Class#name=`.
- What about `Module#label=` and `Class#label=` etc?
* If the value e.g. `"fake name"` cannot be used to reference the class then is that really a name?
* The naming of the `#labeled_module` and `#labeled_class` methods posted in the d... -
02:29 AM Feature #19521: Support for `Module#name=` and `Class#name=`.
- @matz do you mind clarifying what kind of abuse you are concerned about and whether limitations on `Module#name=` as outlined above are sufficient to consider using `#name=`?
> What if name= was a no-op or raised an error if the class... -
10:40 AM Bug #18572: Performance regression when invoking refined methods
- shugo (Shugo Maeda) wrote in #note-10:
> It's simple to prohibit using calls in blocks, but it will break backward compatibility, e.g., using in module_eval.
It would still be possible to use `using` outside the `module_eval` (e.g. i... -
05:42 AM Bug #18572: Performance regression when invoking refined methods
- Eregon (Benoit Daloze) wrote in #note-9:
> From https://bugs.ruby-lang.org/issues/14083#note-3 it seems part of the problem at least is CRuby currently implements what I would call invalid usages of refinements (different set of activat... -
10:32 AM Feature #19720: Warning for non-linear Regexps
- nobu (Nobuyoshi Nakada) wrote in #note-4:
> Literals can be statically checkable.
> ...
Right, but the monkey-patch has the problem it does not check any dynamically-created regexp created before the monkey-patch was loaded.
So if e.... -
10:17 AM Feature #19720: Warning for non-linear Regexps
- duerst (Martin Dürst) wrote in #note-5:
> Introducing such a warning might be a good idea. But there are several issues:
Thanks for the feedback.
> ...
Yes, as I mentioned in the description, it would be opt-in.
> 2) To a very large e... -
06:32 AM Feature #19720: Warning for non-linear Regexps
- Introducing such a warning *might* be a good idea. But there are several issues:
1) The warning should only be used when asked for with an option (i.e. default off).
2) To a very large extent, whether a regular expression is linear o... -
02:55 AM Feature #19720: Warning for non-linear Regexps
- Eregon (Benoit Daloze) wrote in #note-3:
> nobu (Nobuyoshi Nakada) wrote in #note-2:
> ...
Literals can be statically checkable.
> And even if it did, how could the external utility ensure it is loaded early enough, e.g., before Rub... -
09:54 AM Revision d54f66d1 (git): Assign into optimal size pools using String#split("")
- When String#split is used with an empty string as the field seperator it
effectively splits the original string into chars, and there is a
pre-existing fast path for this using SPLIT_TYPE_CHARS.
However this path creates an empty array ... -
09:53 AM Bug #19715 (Rejected): Coverage oneshot_lines mode is not working after result clear
- Hi @ngan
The documentation may not be clear, but this is by design. (Document improvements are welcome!)
`oneshot_lines` is a mode that reports execution at most once for each line. The record is not reset even by `clear: true`. C... -
09:47 AM Feature #19712: IO#reopen removes singleton class
- I proposed adding a keyword argument as `io1.reopen(io2, retain_class:true)` at the meeting.
The keyword argument `retain_class:true` disables changing the class.
That means `io1.reopen(io2, retain_class:true)` just do `dup2(io2.fileno... -
09:45 AM Revision 72f07f0a (git): Reduce concurrency of Cirrus-CI [ci skip]
- clang-12 takes 2-3 times longer than gcc-11.
-
08:33 AM Feature #19057: Hide implementation of `rb_io_t`.
- Thanks for the report, fixed in https://github.com/ioquatix/raindrops/commit/94dbdd94977d895f98c084d0ca31c2b9cf0d25d3
-
08:14 AM Feature #19057: Hide implementation of `rb_io_t`.
- @ioquatix I'm not sure which change exactly is the cause, but it appears that the recent `rb_io_t` changes broke `raindrops`
```
current directory: /usr/local/lib/ruby/gems/3.3.0+0/gems/raindrops-0.20.1/ext/raindrops
make DESTDIR\= sit... -
07:48 AM Feature #18368: Range#step semantics for non-Numeric ranges
- The three clarifications described in #note-17 were discussed at the dev meeting.
@matz said he wanted to make sure if the following pseudo code meets @zverok's expectation.
```ruby
class Range
def step(n)
# TODO: we need ... -
07:30 AM Revision 11cc1827 (git): Added entry for racc changes to NEWS.md
- 06:47 AM Revision 56d74e4c (git): Update bundled gems list at fcbc721ae92fd66a01cdf42ba24e6e [ci skip]
- 03:38 AM Revision fcbc721a (git): Bump ruby/setup-ruby from 1.150.0 to 1.151.0
- Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.150.0 to 1.151.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Commits](https://github.com/ruby/setup-ruby/compare/8a45918450651f5e4784b6031db26f4b9f... -
02:04 AM Misc #19684 (Closed): DevMeeting-2023-06-08
06/08/2023
-
08:21 PM Bug #19721: IO#timeout= can be called without required argument
- Ah, I see. Thank you.
-
03:04 PM Bug #19721 (Rejected): IO#timeout= can be called without required argument
- All assignment methods called via `recv.method = ` are called with one argument. `()` is translated to `nil` by the compiler, because it is an expression that is evaluated to `nil`:
```ruby
eval('()')
# => nil
``` -
03:03 PM Bug #19721: IO#timeout= can be called without required argument
- I believe the syntax `f.timeout=()` is _not_ calling the `timeout=` method with no parameters, but instead it is assigning `()` to `f.timeout` attribute. Since `()` in Ruby evaluates to `nil` (because it is an empty subexpression), in es...
-
02:54 PM Bug #19721 (Rejected): IO#timeout= can be called without required argument
- ```ruby
f = File.open("a.txt", "w")
f.timeout=() # => nil
```
`IO#timeout=` requires an argument (or it's supposed to require it) but if it's called as a method it seems the check is skipped and missing argument is treated as `nil`... -
04:05 PM Feature #19521: Support for `Module#name=` and `Class#name=`.
- Note that `#name` already returns the temporary name
```ruby
m1 = Module.new
m1::NAMED = m2 = Module.new
m2.name #=> "#<Module:0x00005606bc180560>::NAMED"
```
So if you're talking about changing that current behavior, it may be ok ... -
03:18 PM Feature #19521: Support for `Module#name=` and `Class#name=`.
- If we are adding a setter method, do we really need the `set_` prefix? Moreover, does assigning a "temporary name" change the result of calling `#name`?
IMO, we should add `#temporary_name=` and `#temporary_name` methods, and a non-`n... -
01:47 PM Feature #19521: Support for `Module#name=` and `Class#name=`.
- matz (Yukihiro Matsumoto) wrote in #note-11:
> I agree with adding an ability to name classes/modules. But I am against the method name `name=`. It's too short and handy (and tempting to abuse).
What if `name=` was a no-op or raised ... -
09:39 AM Feature #19521: Support for `Module#name=` and `Class#name=`.
- For more context, CRuby itself refers to permanent and temporary names, and anonymous components/names.
Here: https://github.com/ruby/ruby/blob/d6bddcb0137d5a640eb22fbd17f9aa83f71fbd48/variable.c#L111
```
/**
* Returns +classpath+ of ... -
08:41 AM Feature #19521: Support for `Module#name=` and `Class#name=`.
- Unfortunately, I am not 100% satisfied for both names. For `set_temporary_name`, the name implies limited scope or time of name availability, but it's not.
For `set_anonymous_name`, the name assumes the target is an anonymous (nameless)... -
07:49 AM Feature #19521: Support for `Module#name=` and `Class#name=`.
- Thanks Matz, are you happy with `#set_temporary_name` which is how it's referred to internally (and in contrast to assigning a permanent name when you assign to an actual constant).
An alternative would be `#set_anonymous_name` but I th... -
07:00 AM Feature #19521: Support for `Module#name=` and `Class#name=`.
- I agree with adding an ability to name classes/modules. But I am against the method name `name=`. It's too short and handy (and tempting to abuse).
If we could have a better name, I accept this proposal.
Matz.
-
03:20 PM Revision eaf11d3d (git): [rubygems/rubygems] Stop publishing Gemfile in default gem template
- Similarly to how the other ignored files are intended for local
development and not for production, the Gemfile and Gemfile.lock files
for a gem only relate to local development and aren't useful to people
installing the gem.
https://gi... -
02:42 PM Revision 441302be (git): Remove RHASH_TRANSIENT_FLAG
- Hashes are no longer allocated on the transient heap.
- 02:28 PM Revision 41496305 (git): * remove trailing spaces. [ci skip]
-
02:28 PM Revision d9ef326d (git): [DOC] Add comment about flags for Hash
-
01:50 PM Misc #19679: Migrate Wiki from bugs.ruby-lang.org to ruby/ruby GitHub repository
- Okay, I have now migrated all pages as listed [on this sheet](https://docs.google.com/spreadsheets/d/1Ld83ZKxknYgECXxNSh28fjFw82pSRb6W2iPljtDX95E/edit#gid=0). The new wiki is live at https://github.com/ruby/ruby/wiki 🎉
Next week, I wi... -
01:01 PM Misc #19679: Migrate Wiki from bugs.ruby-lang.org to ruby/ruby GitHub repository
- I now have permissions, thank you!
-
05:33 AM Misc #19679: Migrate Wiki from bugs.ruby-lang.org to ruby/ruby GitHub repository
- @jemmai I added you to `Ruby` project as triage team.

Can you confirm again?
-
12:17 PM Feature #19630: [RFC] Deprecate `Kernel#open("|command-here")` due to frequent security issues
- IIRC `IO` methods all have an equivalent under `File`, and those do not accept pipes.
So e.g. RuboCop warns about them and suggest to use `File.some_method` instead: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Security/IoMethods
... -
03:54 AM Feature #19630: [RFC] Deprecate `Kernel#open("|command-here")` due to frequent security issues
- @mdalessio (Mike Dalessio) wrote in #note-5:
> @hsbt Because this functionality has existed in Ruby for such a long time, maybe we should target the next major release for removal of this functionality, and for now just print a deprecat... -
11:59 AM Feature #19712: IO#reopen removes singleton class
- To clarify, my main motivation to solve this issue is to have a nicer object model (the Kernel#class of an object never changes, only a singleton class can be added to an object, never removed) and to avoid surprises when defining single...
-
11:55 AM Feature #19712: IO#reopen removes singleton class
- @matz What if I made a PR to not change the class for `IO#reopen`, and we commit it experimentally, and if it causes issues in multiple gems/apps, we revert it?
Would it be OK to merge that experimentally? -
09:42 AM Feature #19712: IO#reopen removes singleton class
- We still have concerns about compatibility.
One is keeping the receiver's class, and the other is mixing of file descriptors and sockets (especially on Windows).
Both can be the cause of issues that cannot be solved easily.
We hav... -
09:01 AM Feature #19712: IO#reopen removes singleton class
- @matz (Yukihiro Matsumoto) wrote in #note-5:
> The `#reopen` has special semantics that re-initialized the IO object. As a result, singleton methods will be wiped out.
Yes, that's the current semantics.
I think it's both confusing a... -
08:05 AM Feature #19712: IO#reopen removes singleton class
- The `#reopen` has special semantics that re-initialized the IO object. As a result, singleton methods will be wiped out.
So I propose to update the document to describe regarding singleton classes (and it may change the class of the rec... -
11:49 AM Feature #19720: Warning for non-linear Regexps
- nobu (Nobuyoshi Nakada) wrote in #note-2:
> We introduced `Regexp.linear_time?` in order to check the linear-ness by **external** utilities.
> ...
Interesting.
However that initialize monkey-patch does not get called for literal Regex... -
10:49 AM Feature #19720: Warning for non-linear Regexps
- We introduced `Regexp.linear_time?` in order to check the linear-ness by **external** utilities.
You can also check dynamically created regexps.
```ruby
Regexp.prepend Module.new {
def initialize(...)
re = super
raise "... -
09:41 AM Feature #19720 (Rejected): Warning for non-linear Regexps
- I believe the best way to solve ReDoS is to ensure all Regexps used in the process are linear.
Using `Regexp.timeout = 5.0` or so does not really prevent ReDoS, given enough requests causing that timeout the servers will still be very u... - 11:22 AM Revision 3fe09eba (git): Add deprecations for public `struct rb_io` members. (#7916)
- * Add deprecations for public struct rb_io members.
-
09:05 AM Revision d6bddcb0 (git): racc/cparse is extracted from ruby/ruby repository
-
09:03 AM Feature #19702 (Closed): Promote racc as bundled gems
- Thanks. racc is now bundled gems.
-
06:30 AM Feature #19702: Promote racc as bundled gems
- Sounds OK. Go ahead.
Matz.
-
03:53 AM Feature #19702: Promote racc as bundled gems
- I and @nobu removed `racc/parser` dependency from `RDoc::RD`.
* https://github.com/ruby/racc/pull/218
* https://github.com/ruby/rdoc/pull/1019
-
08:29 AM Feature #19719: Universal Parser
- Sorry for bikeshedding, but can we please avoid using `_struct` on struct tag names? It's already clear it's a `struct` because you must always include the `struct` keyword, i.e. `struct rb_parser_config`. `struct rb_parser_config` does ...
-
02:14 AM Feature #19719 (Closed): Universal Parser
- # Background
There are three use cases where we need a CRuby parser which is independent of other CRuby features like Object, GC. I call such a parser a Universal Parser.
1. Use Universal Parser from Ruby applications.
For example R... - 08:26 AM Revision 4e8b859c (git): Update default gems list at e69bb9f0d7dab447d757c34f674474 [ci skip]
-
08:25 AM Revision e69bb9f0 (git): Bump up racc-1.7.0
-
08:25 AM Revision ab5aade5 (git): Removed executable of racc
-
08:25 AM Revision d24e514d (git): Added racc dependency
-
08:25 AM Revision 55e0f8cf (git): Removed sync task for racc
-
08:25 AM Revision 044d0606 (git): Removed racc/cparse checking
-
08:25 AM Revision d1775aa3 (git): Try to promote racc as bundled gems
-
08:12 AM Feature #19718 (Rejected): Extend `-0` option
- Very few users know the existence of `-0`. If we extend the option, probably no one uses the feature.
Matz.
-
07:51 AM Revision b90683be (git): [ruby/psych] Drop to support Ruby 2.4 because the latest version of core_assertions only support Ruby 2.5+
- https://github.com/ruby/psych/commit/6ec316b7fa
-
06:58 AM Feature #19520 (Rejected): Support for `Module.new(name)` and `Class.new(superclass, name)`.
- I reject this idea, because adding a new optional name argument to `new` method is too easy to abuse. I am rather for the idea in #19521. Let's discuss there.
Matz.
-
12:04 AM Feature #19520: Support for `Module.new(name)` and `Class.new(superclass, name)`.
- As I mentioned, I think using arbitrary `#inspect` is too risky / performance issues. If you are trying to log an error, it's much safer to use a pre-existing string than to call user code (which may fail).
- 06:22 AM Revision fe42d88a (git): Pass -Werror=lto-type-mismatch for GCC LTO jobs
- This helps to find possible LTO miscompilations earlier. See also
https://github.com/ruby/ruby/pull/7695. -
05:41 AM Bug #19681 (Closed): The final classpath of partially named modules is sometimes inconsistent once permanently named
- I understand the feeling the name once was "C", could be renamed to "D" later. But in reality, we don't think it's worth maintaining "C" with adding more complexity.
So I choose option 2 in #note-26. If you see the real-world benefit t... -
04:10 AM Bug #11704 (Rejected): Refinements only get "used" once in loop
- The behavior is intended.
Matz.
-
03:06 AM Revision 533368cc (git): Split long options from `proc_options`
-
03:06 AM Revision 6ffbd961 (git): Split some options from `proc_options`
- `-W`, `-e`, `-K`, `-0`, `-E` and `--encoding` options.
-
02:39 AM Feature #19057: Hide implementation of `rb_io_t`.
- Okay, here is a PR to introduce deprecations: https://github.com/ruby/ruby/pull/7916
-
02:16 AM Misc #19684: DevMeeting-2023-06-08
- [Feature #19719] Universal Parser
* Want to discuss the direction of development (Design) and release management (Release management). -
01:31 AM Revision 182d3262 (git): Sample files of racc is not available in ruby/ruby
-
01:20 AM Revision 7ef1a238 (git): Re-generate RDoc::RD parsers with racc-1.7.0
-
01:13 AM Revision a84f2fe8 (git): Manually merge https://github.com/ruby/racc/pull/217
- 01:09 AM Revision 8a772757 (git): Update default gems list at 0f2ebfee85af383f859d9fdc64d58f [ci skip]
-
01:09 AM Revision 0f2ebfee (git): [ruby/racc] Bump up v1.7.0
- https://github.com/ruby/racc/commit/0feca00301
-
12:59 AM Revision 8206a821 (git): Update parser-text.rb with https://github.com/ruby/racc/pull/218
-
12:58 AM Revision c0bbec2e (git): Fix wrong directory layout for racc test
-
12:49 AM Revision 0ee9bd58 (git): [ruby/racc] Embed racc/info.rb too
- https://github.com/ruby/racc/commit/b5e121f304
06/07/2023
-
11:46 PM Feature #19718: Extend `-0` option
- Dan0042 (Daniel DeLorme) wrote in #note-3:
> I meant it will not be possible to use `-u` in the future.
Yes, and I thought it wouldn’t be a problem, but might not be a good idea.
> ...
`-0=$'\t'` and `-0:09`(= `-0:x09`)?
-
03:39 PM Feature #19718: Extend `-0` option
- I meant it will not be possible to use `-u` in the future.
With colon we could write anything after, like `-0:$'\t'` or `-0:011` or `-0:x09` or `-0:u0009` or `-0:b1001` 😃
Or use `=` instead of `:` ?
Cheers. -
02:25 PM Feature #19718: Extend `-0` option
- I thought the issue about `-u` is simply a matter of priorities; just the chance of `-0x` cannot be denied, but `-0u` should have never been used.
But now I remembered `-U` has been implemented since 1.9.
My patch allows `-0U` as wel... -
02:00 PM Feature #19718: Extend `-0` option
- It's a nifty idea, but `-0uCODEPOINT` means that the `-u` option is forever reserved for this usage which no one will ever really use I think, because `-0` is meant to be used like xargs `-0` option (ex: `find . -print0 | ruby -0ne 'p $_...
-
12:02 PM Feature #19718 (Rejected): Extend `-0` option
- Recently I learned that Perl's `-0` option is extended to accept a hexadecimal Unicode codepoint.
However it uses `-0x`, and since `-x` is used for shebang and cd, it would cause a backward incompatibility if we will incorporate it as i... -
03:01 PM Feature #19712: IO#reopen removes singleton class
- > It's not possible to reuse the singleton class for that example.
Yes, that's why I wrote: "whether the singleton_class should be copied", same semantic than `#clone` -
02:56 PM Feature #19712: IO#reopen removes singleton class
- @byroot It's not possible to reuse the singleton class for that example. A singleton class has a given superclass, and that must never change.
But I suppose it might be possible to *copy* the singleton class, although that might be surp... -
09:50 AM Feature #19712: IO#reopen removes singleton class
- For what it's worth, I think:
- It would seem unnatural to me to not clear the `singleton_class`, as in my mental model at least, the `singleton_class` is the actual class of an object.
- I think it would be even more error prone... -
02:09 PM Feature #19630: [RFC] Deprecate `Kernel#open("|command-here")` due to frequent security issues
- I've created https://github.com/ruby/ruby/pull/7915 for review.
-
01:45 PM Feature #19630: [RFC] Deprecate `Kernel#open("|command-here")` due to frequent security issues
- > for now just print a deprecation warning.
My worry is that since deprecation warnings are disabled by default, many people might not notice.
Recent examples show that things like `File.exists?` was deprecated for a decade, and so... -
01:39 PM Feature #19630: [RFC] Deprecate `Kernel#open("|command-here")` due to frequent security issues
- @hsbt Because this functionality has existed in Ruby for such a long time, maybe we should target the next major release for removal of this functionality, and for now just print a deprecation warning.
@postmodern Just to clarify, you... -
10:04 AM Feature #19717 (Open): `ConditionVariable#signal` is not fair when the wakeup is consistently spurious.
- For background, see this issue <https://github.com/socketry/async/issues/99>.
It looks like `ConditionVariable#signal` is not fair, if the calling thread immediately reacquires the resource.
I've given a detailed reproduction here ... -
06:48 AM Bug #18743: Enumerator#next / peek re-use each others stacktraces
- Your PR makes `stop_exc` to be overwritten for each `StopIteration`.
IMO, it should not change and the `cause` of all subsequent `StopIteration`s should be the same first exception.
-
06:00 AM Bug #19700: TestProcess#test_execopts_redirect_open_fifo_interrupt_print is flaky on macOS
- It seems from my survey around the office that my test program works on Intel macs and crashes on ARM ones. I opened a bug report with Apple about this (FB12251512)
-
01:10 AM Revision 46583f7d (git): Adjust style [ci skip]
-
12:27 AM Bug #19716: SystemStackError occurs too easily on Alpine Linux (due to small stack size reported by pthread_attr_getstacksize on musl libc)
- Output from `make test` after applying the patch:
```
Fiber count: 10000 (skipping)
PASS all 1669 tests
exec ./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems "./bootstraptest/runner.rb" --rub... -
12:19 AM Bug #19716: SystemStackError occurs too easily on Alpine Linux (due to small stack size reported by pthread_attr_getstacksize on musl libc)
- I just applied @ncopa's patch from: https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch
After `make` and `make install`, I am now able to run `bundle exec rake db:migrate`... -
12:13 AM Bug #19716 (Feedback): SystemStackError occurs too easily on Alpine Linux (due to small stack size reported by pthread_attr_getstacksize on musl libc)
- This is the same problem previously reported against Ruby 2.5 in https://bugs.ruby-lang.org/issues/14387. I just ran into the same problem on Ruby 3.1.4, built on Alpine Linux 3.16.
@hsbt stated in the previous thread (https://bugs.ru... -
12:08 AM Bug #19715 (Rejected): Coverage oneshot_lines mode is not working after result clear
- Given a simple Ruby file (`foo.rb`):
```ruby
def hello
puts "hello"
end
```
If I do the following in `irb`, I get unexpected results:
```
irb(main):001:0> require 'coverage'
irb(main):002:0> Coverage.setup(oneshot_lines: tru...
06/06/2023
-
02:21 PM Revision 2b54c135 (git): YJIT: Avoid identity-based known-class guards for IO objects (#7911)
- `IO#reopen` is very special in that it is able to change the class and
singleton class of IO instances. In its presence, it is not correct to
assume that IO instances has a stable class/singleton class and guard
by comparing identity. -
02:19 PM Revision 7577c101 (git): Unify length field for embedded and heap strings (#7908)
- * Unify length field for embedded and heap strings
The length field is of the same type and position in RString for both
embedded and heap allocated strings, so we can unify it.
* Remove RSTRING_EMBED_LEN -
02:18 PM Revision fae2f80d (git): Revert debugging code in test_gc_compact.rb
-
02:18 PM Revision c3dc9fcc (git): Fix heap growth in GC.verify_compaction_references
- We should grow by at least gc_params.heap_init_slots, but the previous
calculation was incorrect. -
01:12 PM Misc #19679: Migrate Wiki from bugs.ruby-lang.org to ruby/ruby GitHub repository
- > If you don't have wiki permission, please ask me again because configuration of Redmine is too complex.
Thanks @hsbt, I think I still don't have edit permissions though.

-
12:44 PM Feature #19714 (Closed): Add Refinement#refined_module
- Eregon (Benoit Daloze) wrote in https://bugs.ruby-lang.org/issues/12737#note-15:
> `Refinement#refined_class` is a bit strange given it can return a module.
> ...
I'm for it. What do you think, Matz?
-
12:37 PM Feature #12737: Module#defined_refinements
- Eregon (Benoit Daloze) wrote in #note-15:
> `Refinement#refined_class` is a bit strange given it can return a module.
> ...
I'm for it, but it may be better to create another issue. -
12:00 PM Feature #12737: Module#defined_refinements
- `Refinement#refined_class` is a bit strange given it can return a module.
How about adding `Refinement#refined_module` as an alias for clarity? -
07:01 AM Feature #19702: Promote racc as bundled gems
- `rails/rails` already used `gem "racc"` under the bundler environment.
https://github.com/rails/rails/blob/main/Gemfile#L145
There is no effect with this changes. -
05:15 AM Bug #19713: Off-by-one error when computing very large Integer numbers
- You can use `Integer#quo`.
```ruby
a.quo(b+c) + b.quo(a+c) + c.quo(a+b) #=> (4/1)
```
-
05:11 AM Bug #19713 (Rejected): Off-by-one error when computing very large Integer numbers
- It is by design. `Integer#/` does integer division.
```
p 1 / 2 #=> 0
``` - 03:42 AM Revision 1f64301e (git): Bump octokit/request-action from 2.1.8 to 2.1.9
- Bumps [octokit/request-action](https://github.com/octokit/request-action) from 2.1.8 to 2.1.9.
- [Release notes](https://github.com/octokit/request-action/releases)
- [Commits](https://github.com/octokit/request-action/compare/352d2ae93e... -
01:52 AM Revision 79e8d914 (git): [rubygems/rubygems] Delay cache access in `LockfileParser`
- It's the only part that needs "root folder resultion" to figure out the
folder for the cache, but it's only needed for some things, so run that
logic lazily when needed.
https://github.com/rubygems/rubygems/commit/c7b9eae0bc -
01:52 AM Revision 03246719 (git): [rubygems/rubygems] Fix `path` vs `deployment` precedence when path set through ENV
- The `deployment` setting sets `path` to `vendor/bundle` implicitly, but
that should only apply if `path` is not set explicitly, at any level.
https://github.com/rubygems/rubygems/commit/3552c064c1 -
01:52 AM Revision 7b317243 (git): [rubygems/rubygems] Unexclude some specs on bundler 3
- These should all be passing on Bundler 3.
https://github.com/rubygems/rubygems/commit/4a8c172965 -
01:52 AM Revision 6353f1d5 (git): [rubygems/rubygems] Fill in missing deployment specs
- https://github.com/rubygems/rubygems/commit/e16aa47b8f
-
01:52 AM Revision 60377244 (git): [rubygems/rubygems] Remove redundant specs
- They are already tested above.
https://github.com/rubygems/rubygems/commit/23073dcece -
01:52 AM Revision 8819dc43 (git): [rubygems/rubygems] Always rely on $LOAD_PATH when jumping from exe to lib
- Normally, we use `require_relative` when requiring internal code.
However, Bundler may also load external code (for example, bundler
plugins), and when that external code loads Bundler itself, using
`require_relative` without setting up ... -
01:52 AM Revision 1f9e6683 (git): [rubygems/rubygems] Fix inline mode with multiple sources
- If we're in inline mode, Bundler first resolves using only local gems,
and if some gems are missing, then it re-resolves using remote gems.
However, "source resolution" from the initial "local" try was being
memoized, resulting in Bundle...