Project

General

Profile

Activity

From 09/15/2021 to 09/21/2021

09/21/2021

10:26 PM Feature #18183: make SecureRandom.choose public
Pull request here: https://github.com/ruby/ruby/pull/4878 olleicua (Antha Auciello)
09:55 PM Feature #18183 (Closed): make SecureRandom.choose public
This issue https://bugs.ruby-lang.org/issues/10849
added `SecureRandom.alphanumeric` and also the private method choose.
`choose` was kept private because the method name wasn't the best name to represent the behavior.
I think if it w...
olleicua (Antha Auciello)
02:58 PM Revision 6e1507f8 (git): Explicit the target of do-install-all as the same as dont-install-all
nobu (Nobuyoshi Nakada)
02:43 PM Feature #18181: Introduce Enumerable#min_with_value, max_with_value, and minmax_with_value
I like this proposal, but I think @sawa's idea has value also. It would be simple to accommodate both uses with a single syntax:
```ruby
%w(abcde fg xx hijk).min_with_value(&:size) # => [2, 'fg', 'xx']
v,elem = %w(abcde fg xx hijk)....
Dan0042 (Daniel DeLorme)
09:01 AM Feature #18181: Introduce Enumerable#min_with_value, max_with_value, and minmax_with_value
I added an example code using `#min_with_value`. kyanagi (Kouhei Yanagita)
08:52 AM Feature #18181: Introduce Enumerable#min_with_value, max_with_value, and minmax_with_value
`enum.group_by { ... }` holds all of the elements of enum,
so it consumes a lot of memory and is very slow if enum is enormous.
``` ruby
require 'benchmark'
Benchmark.bm(16) do |x|
enum = -1000000..1000000
x.report("group_by"...
kyanagi (Kouhei Yanagita)
02:28 PM Revision ee53d97b (git): [ruby/irb] Sort shortest files in each load paths
There are two directories where csv*/**/*.rb exist, lib/ and
test/, and depending on the order of tests, test/ may be placed
before lib/. In that case, as "shortest" names were not sorted,
csv/helper.rb will be the first candidate for "...
nobu (Nobuyoshi Nakada)
02:28 PM Revision c94718e3 (git): [ruby/irb] Check if Gem::Specification is defined
https://github.com/ruby/irb/commit/005ade74dd nobu (Nobuyoshi Nakada)
02:28 PM Revision 4576cdca (git): [ruby/irb] Fix argument order
https://github.com/ruby/irb/commit/05c65858a0 nobu (Nobuyoshi Nakada)
12:13 PM Bug #18182: wrong number of arguments (given 1, expected 0) (ArgumentError) since 178ee1e801acb33d13b3e8a630f6ca4926c68fbc
According to `git bisect`, this behavior has been introduced since 178ee1e801acb33d13b3e8a630f6ca4926c68fbc . It has not been fixed via https://bugs.ruby-lang.org/issues/18177 unlike RSpec one. yahonda (Yasuo Honda)
12:12 PM Bug #18182 (Closed): wrong number of arguments (given 1, expected 0) (ArgumentError) since 178ee1e801acb33d13b3e8a630f6ca4926c68fbc
* Steps to reproduce
```
git clone https://github.com/rails/rails
cd rails/guides/bug_report_templates
ruby active_record_main.rb
```
* Expected behavior as Ruby 3.0.2
It should finish as follows.
```
1 runs, 3 assertions,...
yahonda (Yasuo Honda)
04:05 AM Revision 98c5907c (git): Ripper source on mswin
* Get rid of command substitution for cmd.exe.
* Separate RM1 command to remove single file sans directory.
nobu (Nobuyoshi Nakada)

09/20/2021

11:19 PM Revision 046f1bf4 (git): Enhanced RDoc for Enumerable#inject (#4876)
burdettelamar (Burdette Lamar)
06:41 PM Revision 736eb30e (git): Enhanced RDoc for Range (#4870)
Introductory material revised. burdettelamar (Burdette Lamar)
06:41 PM Revision 53bee753 (git): * 2021-09-21 [ci skip]
git[bot]
06:40 PM Revision 2a9876a8 (git): Enhance documentation on GC.stat (#4843)
jemmai (Jemma Issroff)
04:55 PM Feature #18181: Introduce Enumerable#min_with_value, max_with_value, and minmax_with_value
This is a frequently seen use case. I use code like this:
```ruby
%w(abcde fg hi jkl mn).group_by(&:size).min # => [2, ["fg", "hi", "mn"]]
```
and I don't see a strong need to shorten it into a single method although I am not strongly ...
sawa (Tsuyoshi Sawada)
03:25 PM Feature #18181 (Open): Introduce Enumerable#min_with_value, max_with_value, and minmax_with_value
PR is https://github.com/ruby/ruby/pull/4874
I propose `Enumerable#min_with_value`, `max_with_value` and `minmax_with_value`.
These methods work like this:
``` ruby
%w(abcde fg hijk).min_with_value { |e| e.size } # => ['fg', 2]...
kyanagi (Kouhei Yanagita)
02:08 PM Bug #18177: An error occurs when running RSpec with Ruby 3.1.0-dev
I have confirmed that the issue has been resolved that was raising `ArgumentError` when running RSpec. Thanks a lot for the quick fix!
koic (Koichi ITO)
06:25 AM Bug #18177 (Closed): An error occurs when running RSpec with Ruby 3.1.0-dev
Applied in changeset commit:git|2e3d43e5775799d1b4d6672a3a18b3fc5777c52b.
----------
Allow to include uninitialized modules [Bug #18177]
The module that is about to be included is considered initialized.
nobu (Nobuyoshi Nakada)
01:36 PM Bug #18180 (Closed): opt_newarray_min/max instructions ignore refined methods
```
$ ./miniruby -ve 'module M; refine Array do; def max; :max; end; def min; :min; end; end; end; using M; p [1 + 0, 2, 3].max, [1 + 0, 2, 3].min'
ruby 3.1.0dev (2021-09-20T10:07:58Z master cb8434563d) [x86_64-linux]
3
1
```
I e...
wanabe (_ wanabe)
01:01 PM Revision 9770bf23 (git): Fix malloc_increase is not correctly calculated
Commit 123eeb1c1a904923754ce65148dbef045b56e083 added incremental GC
which moved resetting malloc_increase, oldmalloc_increase to before
marking. However, during_minor_gc is not set until gc_marks_start. So
the value will be from the las...
Peter Zhu
12:52 PM Misc #18175: Propose Jean Boussier (@byroot) as a core committer
Congrats Jean!
Petrik
p8 (Petrik de Heus)
11:16 AM Revision b61064b8 (git): Add gvl and fiber assertions to scheduler interface to catch invalid usage.
Samuel Williams
10:07 AM Revision cb843456 (git): Add alternative optional hook for `scheduler_close` to allow public usage of close.
Samuel Williams
10:07 AM Revision 4730a1e0 (git): Don't describe C function that does not exist in prior versions.
Samuel Williams
06:48 AM Feature #18179: Add Math methods to Numeric
I support this. `x.sqrt` is indeed more object-oriented that `Math.sqrt x`. In an earlier discussion, it was pointed out that for Mathematicians, `sqrt(x)` is more natural than `x.sqrt`. Mathematicians can still use that notation, but al... duerst (Martin Dürst)
04:09 AM Feature #18179 (Open): Add Math methods to Numeric
Hi, I wanted to get thoughts on adding class methods from `Math` as instance methods on `Numeric`.
```ruby
x.sqrt # vs Math.sqrt(x)
x.log # vs Math.log(x)
```
Rust takes this approach and it (subjectively) feels more intuitive/...
ankane (Andrew Kane)
06:30 AM Revision 649c87bd (git): Add C interface spec.
Samuel Williams
06:30 AM Revision 88ba5fe5 (git): Expose `rb_fiber_raise` and tidy up the internal implementation.
Samuel Williams
06:23 AM Revision 2e3d43e5 (git): Allow to include uninitialized modules [Bug #18177]
The module that is about to be included is considered initialized. nobu (Nobuyoshi Nakada)

09/19/2021

03:15 PM Revision d2d54903 (git): * 2021-09-20 [ci skip]
git[bot]
03:15 PM Revision 576b2e64 (git): MINGW-UCRT: Set CONFIG['arch'] and RUBY_PLATFORM to "x64-mingw-ucrt"
This allows easy differentiation between ABI incompatible platforms like MSWIN64 and MSVCRT-based MINGW32.
This also implicates a distinct rubygem platform which is also "x64-mingw-ucrt".
Although the term "mingw32" is the OS-part for 6...
Lars Kanis
03:15 PM Revision 52cc54ce (git): CI: Enable MINGW-UCRT build and test in github actions
This enables a temporary branch on ruby/setup-ruby and MSP-Greg/setup-ruby-pkgs for UCRT-capable action setup.
They set correct PATH and MINGW_PACKAGE_PREFIX for UCRT, if a UCRT based ruby is used.
See here for more details: https://gith...
Lars Kanis
03:15 PM Revision 70cefcfa (git): Adjust test to set+get big values on all platforms and add MINGW-UCRT
Previously the test verified on MSWIN that huge values can not be stored in environment variables but that they can on others.
IMHO the intention of the test should not change between platforms.
Therefore this adjusts the test to have th...
Lars Kanis
03:15 PM Revision e32fe3ce (git): MINGW: _WIN64 is not defined on i386-mingw32 + ucrt.
xtkoba (Tee KOBAYASHI)
03:15 PM Revision 637d7288 (git): MINGW: More permissive pattern matching for coroutine
Pattern matching for target_os in configure script should be permissive if we consider suffixing something onto "mingw32". xtkoba (Tee KOBAYASHI)
03:15 PM Revision 8bda5128 (git): MINGW: set rb_cv_msvcrt=ucrt and RT_VER=140 when UCRT is used
xtkoba (Tee KOBAYASHI)
03:15 PM Revision 4705ebd9 (git): MINGW: Fix build error on Windows UCRT
xtkoba (Tee KOBAYASHI)
02:08 PM Bug #18177: An error occurs when running RSpec with Ruby 3.1.0-dev
Maybe, like this?
```ruby
m = Class.new(Module) {def initialize_copy(other);end}.new.dup
Class.new.include(m)
```
nobu (Nobuyoshi Nakada)
01:36 PM Bug #18177: An error occurs when running RSpec with Ruby 3.1.0-dev
As I'm not sure where the uninitialized module came from, can't make a simple test code.
Does this fix it?
```diff
diff --git a/class.c b/class.c
index 0b075a9abb8..c56a149afc7 100644
--- a/class.c
+++ b/class.c
@@ -917,7 +917...
nobu (Nobuyoshi Nakada)
12:16 AM Bug #18177: An error occurs when running RSpec with Ruby 3.1.0-dev
Rails CI against Ruby master is also affected by this commit. https://github.com/ruby/ruby/pull/4858/commits/178ee1e801acb33d13b3e8a630f6ca4926c68fbc
- CI failure
https://buildkite.com/rails/rails/builds/81084#67d95e32-91b9-49c2-a463...
yahonda (Yasuo Honda)
01:39 PM Revision c0a892a7 (git): Fix a typo [Bug #17048]
nobu (Nobuyoshi Nakada)
10:51 AM Bug #18161: [BACKPORT] b8386f7f7f6d7a7d76481e02d389d0f5211f0f2c
backported into ruby_2_7 at ac7c2754c004cdb3618738e315d2e2cb5f68a3a8 usa (Usaku NAKAMURA)
10:43 AM Revision ac7c2754 (git): merge revision(s) b8386f7f7f6d7a7d76481e02d389d0f5211f0f2c [Backport #18161]
Prepend DebugSystem to VCS class only
And revert 24e5f1c982966c379220b1bbb26b4e0320180fa1, pepending to
Kernel did not affect the top level methods before 3.0.
U.Nakamura
08:17 AM Revision d531f12e (git): Enable shallow clone on appveyor
https://www.appveyor.com/docs/how-to/repository-shallow-clone/ nobu (Nobuyoshi Nakada)
07:27 AM Revision 70624ae4 (git): Extract hook macro for attributes
nobu (Nobuyoshi Nakada)
12:37 AM Revision 162ad65f (git): Revert "Do not load file with same realpath twice when requiring"
This reverts commit ddb85c5d2bdf75a83eb163856508691a7436b446.
This commit causes unexpected warnings in TestTranscode#test_loading_race
occasionally in CI.
jeremyevans (Jeremy Evans)

09/18/2021

06:51 PM Bug #17882: bootstraptest/test_ractor.rb:224 segfaults on Cygwin
This no longer happens as of commit:4cc44bd819, though not bisected. Thanks. xtkoba (Tee KOBAYASHI)
04:08 PM Bug #17885 (Closed): require_relative and require should be compatible with each other when symlinked files are used
Applied in changeset commit:git|ddb85c5d2bdf75a83eb163856508691a7436b446.
----------
Do not load file with same realpath twice when requiring
This fixes issues with paths being loaded twice in certain cases
when symlinks are used.
It ...
jeremyevans (Jeremy Evans)
04:05 PM Revision f9fd04ff (git): * 2021-09-19 [ci skip]
git[bot]
04:05 PM Revision ddb85c5d (git): Do not load file with same realpath twice when requiring
This fixes issues with paths being loaded twice in certain cases
when symlinks are used.
It took me multiple attempts to get this working. My original
attempt tried to convert paths to realpaths before adding them
to $LOADED_FEATURES. ...
jeremyevans (Jeremy Evans)
02:21 PM Misc #18175: Propose Jean Boussier (@byroot) as a core committer
Accepted.
Matz.
matz (Yukihiro Matsumoto)
01:45 PM Bug #18141: Marshal load with proc yield objects before they are fully initialized
I made a followup patch: https://github.com/ruby/ruby/pull/4866
It now handle similar bugs with `Array`, `Hash` and other mutable objects. It also handle circular objects.
byroot (Jean Boussier)
07:34 AM Bug #18141: Marshal load with proc yield objects before they are fully initialized
Hello byroot,
Thank you for the investigation about the issue. Yes, the patch with only the bug fix is very helpful to maintain stable branches.
nagachika (Tomoyuki Chikanaga)
12:53 PM Bug #18178 (Closed): RubyVM::AST.of(method_defined_in_C) Segmentation fault
Applied in changeset commit:git|ed9d9cee76ee941c504ccea33c70c0eb5d825813.
----------
ast.c: AST.of checks if a given method object is defined in C
[Bug #18178]
mame (Yusuke Endoh)
10:05 AM Bug #18178 (Closed): RubyVM::AST.of(method_defined_in_C) Segmentation fault
`RubyVM::AbstractSyntaxTree.of` segfault when it receives a method defined in C.
```console
$ ruby -ve 'RubyVM::AbstractSyntaxTree.of(String.instance_method(:gsub))'
ruby 3.1.0dev (2021-09-17T11:46:18Z master b45fe48fbb) [x86_64-...
pocke (Masataka Kuwabara)
12:52 PM Revision 1b300789 (git): ast.c: AST.of against C method should return nil (as Ruby 2.6--3.0)
mame (Yusuke Endoh)
12:28 PM Revision ed9d9cee (git): ast.c: AST.of checks if a given method object is defined in C
[Bug #18178] mame (Yusuke Endoh)
12:27 PM Revision 1c07c982 (git): Enhanced RDoc for Range (#4847)
Treated:
#to_s
#inspect
#===
#include?
#cover?
#count
burdettelamar (Burdette Lamar)
09:04 AM Revision 593cc4ca (git): * 2021-09-18 [ci skip]
git[bot]
09:03 AM Revision ec4ecb6d (git): Include the invalid value in invalid_utc_offset error
nobu (Nobuyoshi Nakada)
07:52 AM Bug #18160: IndexError raised from MatchData#{offset,begin,end} does not keep the encoding of the argument
ruby_3_0 3e61556191ea7e6586ffb995f03e6d2631ec6fb0 merged revision(s) 99d8c4832a7133ca52578d015e3ddcfd94820f4a. nagachika (Tomoyuki Chikanaga)
07:51 AM Bug #17756: StringScanner#charpos makes segmentation fault when target.byteslice returns non string value
ruby_3_0 7b55ff21b52e818819b698326f80158643175645 merged revision(s) 564ccd095a9d7fbe869031dbf666d61dadfdcb03. nagachika (Tomoyuki Chikanaga)
07:51 AM Bug #17661: IO#each will segfault when if file is closed inside an `each_byte` block
ruby_3_0 e6e25b794d8db52e1df85a02f28846ad7eb82d49 merged revision(s) 13939d61b4b69bd109c5f41303c79868d639fa44. nagachika (Tomoyuki Chikanaga)
07:51 AM Bug #17735: `Hash#transform_keys!` drops non evaluated keys
Additionally backported bb84c75001f1bf13b4b2a12db8f4420e76a3ea03 into ruby_3_0 at 98ac62de5cb03efec0fb32684c61c0d4df692e5a. nagachika (Tomoyuki Chikanaga)
07:23 AM Revision 98ac62de (git): merge revision(s) bb84c75001f1bf13b4b2a12db8f4420e76a3ea03: [Backport #17735]
Revert "Force recycle intermediate collection in Hash#transform_keys!
[Bug #17735]"
This reverts commit 522d4cd32f7727886f4fcbc28ed29c08d361ee20.
---
hash.c | 1 -
1 file changed, 1 deletion(-)
nagachika (Tomoyuki Chikanaga)
07:15 AM Bug #18161: [BACKPORT] b8386f7f7f6d7a7d76481e02d389d0f5211f0f2c
b8386f7f7f6d7a7d76481e02d389d0f5211f0f2c was already backported into ruby_3_0 branch at 80c180df769016d58663218de2687613841864f3. nagachika (Tomoyuki Chikanaga)
07:13 AM Revision 3e615561 (git): merge revision(s) 99d8c4832a7133ca52578d015e3ddcfd94820f4a: [Backport #18160]
Preserve the encoding of the argument in IndexError [Bug #18160]
---
re.c | 20 ++++++++++----------
test/ruby/test_regexp.rb | 7 ++++++-
2 files changed, 16 insertions(+), 11 delet...
nagachika (Tomoyuki Chikanaga)
07:11 AM Revision 7b55ff21 (git): merge revision(s) 564ccd095a9d7fbe869031dbf666d61dadfdcb03: [Backport #17756]
[ruby/strscan] Fix segmentation fault of `StringScanner#charpos` when
`String#byteslice` returns non string value [Bug #17756] (#20)
https://github.com/ruby/strscan/commit/92961cde2b
---
ext/strscan/str...
nagachika (Tomoyuki Chikanaga)
07:07 AM Revision e6e25b79 (git): merge revision(s) 13939d61b4b69bd109c5f41303c79868d639fa44: [Backport #17661]
Check if closed after each yield [Bug #17661]
---
io.c | 4 +++-
test/ruby/test_io.rb | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 1 deletion(-)
nagachika (Tomoyuki Chikanaga)
04:48 AM Bug #18177 (Closed): An error occurs when running RSpec with Ruby 3.1.0-dev
## Reproduction context
The following code causes an `ArgumentError` error when using Ruby 3.1.0-dev.
```ruby
# foo_spec.rb
RSpec.shared_context 'config', :config do
end
RSpec.describe 'foo', :config do
end
```
RSpec ver...
koic (Koichi ITO)
02:48 AM Bug #18169: Local copies of gemified libraries are being released out of sync with their gems
Dan0042 (Daniel DeLorme) wrote in #note-10:
> If I understand correctly, you mean that it's hard/impossible to test the gemified libs via CI unless they are part of the ruby monorepo? Is that the main difficulty?
Yes. Ex. "ruby/setup...
hsbt (Hiroshi SHIBATA)
12:22 AM Feature #18151: Incorrect Resolv result when DNS server is unreachable
The current behavior seems to be expected (the code explicitly rescues the internal ResolvError), so I would consider this a feature request and not a bug. I agree with you that it would be nice to be able to differentiate the cases. I... jeremyevans0 (Jeremy Evans)

09/17/2021

09:51 PM Feature #18159: Integrate functionality of syntax_suggest gem into Ruby
> We want to make sure there's no (or very low) overhead for correct programs. So possibly load dead_end code only when the error occurs, because it's not needed otherwise.
Hooking into SyntaxError#message should make it zero overhead...
schneems (Richard Schneeman)
08:59 AM Feature #18159: Integrate functionality of syntax_suggest gem into Ruby
Some additional comments during the meeting:
- We want to make sure there's no (or very low) overhead for correct programs. So possibly load dead_end code only when the error occurs, because it's not needed otherwise.
- What happen...
duerst (Martin Dürst)
01:35 AM Feature #18159: Integrate functionality of syntax_suggest gem into Ruby
> ko1 (Koichi Sasada) and knu (Akinori MUSHA) were concerned about whether the heuristic algorithm was mature enough. If dead_end prints a misguided summary, it may rather confuse users.
I certainly understand and agree. If you (or an...
schneems (Richard Schneeman)
07:33 PM Bug #18158: Pathname#each_entry without block does not return Enumerator
I've submitted a pull request to have `Pathname#each_entry` return Enumerator: https://github.com/ruby/pathname/pull/10 jeremyevans0 (Jeremy Evans)
02:51 PM Feature #18148: Marshal.load freeze option
I implemented a patch https://github.com/ruby/ruby/pull/4859
NB: it does include some extra fixes for https://bugs.ruby-lang.org/issues/18141#change-93742, because the implementation wouldn't have been possible without.
byroot (Jean Boussier)
02:44 PM Bug #18169: Local copies of gemified libraries are being released out of sync with their gems
hsbt (Hiroshi SHIBATA) wrote in #note-9:
> Because you are not develop CRuby. We need to test EVERY commits of CRuby with default gems. If CRuby or stdlib broke the test/CI,
> ...
If I understand correctly, you mean that it's hard/impo...
Dan0042 (Daniel DeLorme)
12:06 AM Bug #18169: Local copies of gemified libraries are being released out of sync with their gems
>Why not make the changes to the gem itself and be certain that all changes are already in the canonical repository?
> ...
Because you are not develop CRuby. We need to test EVERY commits of CRuby with default gems. If CRuby or stdlib b...
hsbt (Hiroshi SHIBATA)
02:19 PM Bug #18141: Marshal load with proc yield objects before they are fully initialized
So while working on https://bugs.ruby-lang.org/issues/18148, I discovered that many other types of objects are impacted.
Just a few examples:
```ruby
def round_trip(obj, proc = ->(o) { o.freeze })
Marshal.load(Marshal.dump(obj)...
byroot (Jean Boussier)
11:46 AM Revision b45fe48f (git): [rubygems/rubygems] Trigger install command by default on remove
Closes https://github.com/rubygems/rubygems/issues/4889
https://github.com/rubygems/rubygems/commit/2b1754479c
Jose Galisteo
10:07 AM Bug #17048 (Closed): Calling initialize_copy on live modules leads to crashes
Applied in changeset commit:git|178ee1e801acb33d13b3e8a630f6ca4926c68fbc.
----------
Already initialized modules cannot be replaced [Bug #17048]
nobu (Nobuyoshi Nakada)
09:48 AM Bug #17429: Prohibit include/prepend in refinement modules
shugo (Shugo Maeda) wrote in #note-31:
> mame (Yusuke Endoh) wrote in #note-30:
> ...
I've created an issue on the project: <https://github.com/square/refinement/issues/71>.
By gem-codesearch, I've found another gem which defines ::...
shugo (Shugo Maeda)
02:57 AM Bug #17429: Prohibit include/prepend in refinement modules
mame (Yusuke Endoh) wrote in #note-30:
> BTW, the change seems to add a top-level new constant `::Refinement`. I'm not against the addition, but unsure about the impact. Is it okay?
I found a gem named refinement....
https://githu...
shugo (Shugo Maeda)
08:07 AM Misc #18174: DevelopersMeeting20211021Japan
* [Feature #18176] Make Coverage suspendable (mame)
* I'd like to add `Coverage.suspend` and `Coverage.resume`. Any opinion?
* [Bug #18170] `Exception#inspect` should not include newlines (mame)
* I've created a PR for `StandardError...
mame (Yusuke Endoh)
08:04 AM Bug #18170: Exception#inspect should not include newlines
Created a PR: https://github.com/ruby/ruby/pull/4857
As expected, I had to modify some tests. Is this acceptable?
mame (Yusuke Endoh)
07:14 AM Misc #18175: Propose Jean Boussier (@byroot) as a core committer
+2 mame (Yusuke Endoh)
03:17 AM Misc #18175: Propose Jean Boussier (@byroot) as a core committer
+1 k0kubun (Takashi Kokubun)
06:41 AM Feature #18176 (Closed): Make Coverage suspendable
I'd like to add `Coverage.suspend`, `Coverage.resume`, and some methods.
## Synopsis
```
1: # target.rb
2: def foo
3: :foo
4: end
5:
6: def bar
7: :bar
8: end
9:
10: def baz
11: :baz
12: end
```
```
...
mame (Yusuke Endoh)
06:09 AM Bug #14479 (Rejected): Exceptions raised from a :call tracepoint can sometimes be "rescued" inside the method
I want to reject this issue because of the following reasons:
* TracePoint block shouldn't raise an exception. TracePoint should not hurt non-hook (99.99..% case) execution if possible. I don't think this difference is not a matter.
...
ko1 (Koichi Sasada)
02:14 AM Revision fd918d1a (git): Removed Module.allocate [Bug #17048]
nobu (Nobuyoshi Nakada)
02:14 AM Revision 178ee1e8 (git): Already initialized modules cannot be replaced [Bug #17048]
nobu (Nobuyoshi Nakada)
01:27 AM Revision 8f41c791 (git): Add spec for MatchData#match and MatchData#match_length [Feature #18172]
nobu (Nobuyoshi Nakada)
01:03 AM Revision 5a048829 (git): Add WB_PROTECTED to mutexes
mutex_mark is (basically) NULL, so we don't have any references to mark.
This means we should safely be able to mark Mutex as WB_PROTECTED
without changing anything else.
jhawthorn (John Hawthorn)
12:29 AM Feature #18172: MatchData#sublen to return the length of a substring
`match_ary_aref` may return an `Array` of substrings when `idx` is a `Range`. nobu (Nobuyoshi Nakada)

09/16/2021

11:54 PM Revision 34d6720f (git): Prohibit test method redefinition
nobu (Nobuyoshi Nakada)
11:39 PM Revision 8450b6a9 (git): * 2021-09-17 [ci skip]
git[bot]
11:38 PM Revision 475a4651 (git): [Feature #18172] Fix duplicate test name
nobu (Nobuyoshi Nakada)
09:00 PM Bug #17048: Calling initialize_copy on live modules leads to crashes
Here a repro that that always crashes for me on cbbda3e:
```ruby
mod = Module.new { define_method(:foo) {:first} }
klass = Class.new { include mod }
instance = klass.new
p instance.foo
new_mod = Module.new { define_method(:foo) {...
alanwu (Alan Wu)
04:03 PM Bug #17048: Calling initialize_copy on live modules leads to crashes
nobu (Nobuyoshi Nakada) wrote in #note-16:
> As far as I tested it with `master` slightly, it didn't reproduce.
> ...
It still happens in my environment. I tested with 1000 iterations, and it hung on the 14th iteration:
```
$ for ...
jeremyevans0 (Jeremy Evans)
07:18 AM Bug #17048: Calling initialize_copy on live modules leads to crashes
As far as I tested it with `master` slightly, it didn't reproduce.
Does it still happen, and how occational?
nobu (Nobuyoshi Nakada)
05:30 PM Misc #18175 (Closed): Propose Jean Boussier (@byroot) as a core committer
Hi,
I would like to propose adding Jean Boussier (@byroot) as a committer. For years Jean has been doing great work with performance / memory optimizations, reporting and fixing bugs, as well as contributing features that really help ...
tenderlovemaking (Aaron Patterson)
04:28 PM Bug #17568 (Feedback): Thread.handle_interrupt is per-Thread but should probably be per-Fiber
jeremyevans0 (Jeremy Evans)
02:20 PM Bug #17568: Thread.handle_interrupt is per-Thread but should probably be per-Fiber
ko1 (Koichi Sasada) wrote in #note-2:
> mame-san also proposed `Fiber.handle_interrupt` for fiber local handler to set fiber local setting.
No I didn't propose it actually. In today's dev meeting, we discussed that there are a case w...
mame (Yusuke Endoh)
07:12 AM Bug #17568: Thread.handle_interrupt is per-Thread but should probably be per-Fiber
I understand some case it is confusing, but if Fiber is used to represent the data structure like Enumerator, Thread-wide mask is needed.
Could you give us the example which should be fiber local?
mame-san also proposed `Fiber.handle...
ko1 (Koichi Sasada)
04:02 PM Feature #18172: MatchData#sublen to return the length of a substring
nobu (Nobuyoshi Nakada) wrote in #note-4:
> Hanmac (Hans Mackowiak) wrote in #note-3:
> ...
i just wonder why not use the functions there like done in the other method?
``` c
if (FIXNUM_P(idx)) {
return rb_reg_nth_match(FIX2INT(...
Hanmac (Hans Mackowiak)
02:28 PM Feature #18172: MatchData#sublen to return the length of a substring
Hanmac (Hans Mackowiak) wrote in #note-3:
> @nobu, isn't your `MatchData#match` the same as `MatchData#[]` ?
Similar, but `#match` accepts only single index/name, but not a range or an optional length.
nobu (Nobuyoshi Nakada)
01:36 PM Feature #18172: MatchData#sublen to return the length of a substring
@nobu, isn't your `MatchData#match` the same as `MatchData#[]` ? Hanmac (Hans Mackowiak)
12:16 PM Feature #18172 (Closed): MatchData#sublen to return the length of a substring
Applied in changeset commit:git|09d724e6f846b4e53e8571d41ca7d3055d732d9f.
----------
[Feature #18172] Add MatchData#match
The method to return the single matched substring corresponding to
the given argument.
nobu (Nobuyoshi Nakada)
09:04 AM Feature #18172: MatchData#sublen to return the length of a substring
In Ruby C source code, we use names like `sublen` but Ruby methods tend to be fully spelled. So I propose `MatchData#match(n)` and `MatchData#match_length(n)`.
Matz.
matz (Yukihiro Matsumoto)
07:34 AM Feature #18172 (Closed): MatchData#sublen to return the length of a substring
There are many code taking the length of a substring matched by `Regexp`.
For instance, in rdoc/markup/attribute_manager.rb:
```ruby
attr_updated = attrs.set_attrs($`.length + $1.length + $2.length, $3.length, attr)
if at...
nobu (Nobuyoshi Nakada)
03:26 PM Misc #18174 (Closed): DevelopersMeeting20211021Japan
# The next dev meeting
**Date: 2021/10/21 13:00-17:00 +09:00**
Place/Sign-up/Agenda/Log: https://github.com/ruby/dev-meeting-log/blob/master/DevelopersMeeting20211021Japan.md
- Dev meeting *IS NOT* a decision-making place. All dec...
mame (Yusuke Endoh)
03:25 PM Misc #18122 (Closed): DevelopersMeeting20210916Japan
mame (Yusuke Endoh)
03:14 PM Feature #18159: Integrate functionality of syntax_suggest gem into Ruby
In today's dev meeting, we discussed this. Basically, no one was opposed to the concept. But some concerns were discussed.
@ko1 and @knu were concerned about whether the heuristic algorithm was mature enough. If dead_end prints a misg...
mame (Yusuke Endoh)
02:50 PM Bug #18169: Local copies of gemified libraries are being released out of sync with their gems
> We should backport this changes to the upstream repo in github.
Why not make the changes to the gem itself and be certain that all changes are already in the canonical repository?
If it is a problem of testing in CRuby, you can r...
headius (Charles Nutter)
12:09 PM Bug #18169: Local copies of gemified libraries are being released out of sync with their gems
We are sorry to confuse about the versioning policy for the default gems in our transition phase.
I only maintain the version of the default gems with the new release version of Ruby like 2.6.0.
I forgot them with stable version releas...
hsbt (Hiroshi SHIBATA)
03:37 AM Bug #18169: Local copies of gemified libraries are being released out of sync with their gems
An alternative might be to check out the repositories at a specific tag and copy them in place, rather than going to the gems. headius (Charles Nutter)
03:36 AM Bug #18169: Local copies of gemified libraries are being released out of sync with their gems
I am available to help make this happen or describe how we are doing it in JRuby. The short description is just that we install to a temporary location and copy everything in place as part of the build. However, we do that by bootstrappi... headius (Charles Nutter)
02:49 PM Revision cbbda3e6 (git): Adjust indent in string.c [ci skip]
nobu (Nobuyoshi Nakada)
02:15 PM Feature #18136: take_while_after
@mame
> In other words, your use case examples looked not so frequent to make it built-in.
Soooo... Let me summarize :)
In defense of the idea, I provided:
1. **Two** big domains: API clients with pagination ("stop after curr...
zverok (Victor Shepelev)
01:59 PM Feature #18136: take_while_after
zverok (Victor Shepelev) wrote in #note-11:
> > The listed use cases are not so clearly convincing. For the Example 2, "can_continue" field often contains a URL to receive the subsequent results (like `"can_continue": "http://api.exampl...
mame (Yusuke Endoh)
01:26 PM Feature #18136: take_while_after
Then what about `take_till`?
```ruby
Enumerator.produce(Date.today, &:succ).take_till(&:monday?).each { schedule_job(_1) }
```
nobu (Nobuyoshi Nakada)
12:15 PM Feature #18136: take_while_after
@knu
> feels to me like `drop_after`
Hmm, this actually sounds like a good name.
> ...
Of course.
The first case of my initial ticket (take tokens till the token that ends sentence)
```ruby
sentence = tokens.take_while_aft...
zverok (Victor Shepelev)
05:41 AM Feature #18136: take_while_after
In the dev meeting, we discussed this proposal in more than a hour, and reached no conclusion.
* The listed use cases are not so clearly convincing. For the Example 2, "can_continue" field often contains a URL to receive the subsequen...
mame (Yusuke Endoh)
04:56 AM Feature #18136: take_while_after
I want to see use cases without `lazy`. If typical uses cases you could think of were always with `lazy`, then a lazy-minded API would be what you'd need in the first place. knu (Akinori MUSHA)
04:29 AM Feature #18136: take_while_after
This behavior of `take_upto` feels to me like `drop_after`. 🤔 knu (Akinori MUSHA)
02:18 AM Feature #18136: take_while_after
ufuk (Ufuk Kayserilioglu) wrote in #note-5:
> I don't want to detract from the content of the proposal, nor do I want to bikeshed the name, but personally, `take_while_after` does not convey the meaning of this behaviour to me. Can I su...
Dan0042 (Daniel DeLorme)
02:11 PM Feature #18148: Marshal.load freeze option
> Could you please create a patch for your proposal?
That was my intent, it might take me a couple days though.
byroot (Jean Boussier)
02:04 PM Feature #18148 (Assigned): Marshal.load freeze option
@nobu created a ticket #18171 for `Hash#compare_by_identity` issue. It is not so related to this issue, anyway.
@byroot Could you please create a patch for your proposal?
mame (Yusuke Endoh)
05:14 AM Feature #18148: Marshal.load freeze option
Seems reasonable. Accepted.
@nobu might have concerns regarding `Hash#compare_by_identity`.
Matz.
matz (Yukihiro Matsumoto)
02:11 PM Bug #17429: Prohibit include/prepend in refinement modules
BTW, the change seems to add a top-level new constant `::Refinement`. I'm not against the addition, but unsure about the impact. Is it okay? mame (Yusuke Endoh)
02:09 PM Bug #17429: Prohibit include/prepend in refinement modules
In today's dev meeting, matz accepted the concept, but wanted to take some time to consider the name `import`. mame (Yusuke Endoh)
10:55 AM Revision aa3d8388 (git): NEWS for [Feature #18172] [ci skip]
nobu (Nobuyoshi Nakada)
10:55 AM Revision f2cb6288 (git): [Feature #18172] Add MatchData#match_length
The method to return the length of the matched substring
corresponding to the given argument.
nobu (Nobuyoshi Nakada)
10:55 AM Revision 09d724e6 (git): [Feature #18172] Add MatchData#match
The method to return the single matched substring corresponding to
the given argument.
nobu (Nobuyoshi Nakada)
10:43 AM Bug #18173 (Closed): The feature in `$LOADED_FEATURES` is loaded again
Applied in changeset commit:git|ddb32e66160ab50849419ef7c7ac584913b79c34.
----------
[Bug #18173] Update loaded_features_index
If $LOADED_FEATURES is changed in the just required file, also the
index table needs to be updated before lo...
nobu (Nobuyoshi Nakada)
09:47 AM Bug #18173 (Closed): The feature in `$LOADED_FEATURES` is loaded again
In general, the feature name registered in `$LOADED_FEATURES` (e.g. "enumerator.so", "thread.rb", and so on) is expected not to be loaded again.
But, as @ko1 reported, when a feature name is added to the variable during another file i...
nobu (Nobuyoshi Nakada)
10:16 AM Bug #18170: Exception#inspect should not include newlines
Thanks @mame. ioquatix (Samuel Williams)
08:42 AM Bug #18170 (Assigned): Exception#inspect should not include newlines
Matz said "give it a try". I'll create a PR mame (Yusuke Endoh)
02:34 AM Bug #18170 (Closed): Exception#inspect should not include newlines
Is this intentional?
```
p StandardError.new("foo\nbar")
#=>
# #<StandardError: foo
# bar>
```
I expect `#inspect` returns a one-line string. How about returning `#<StandardError: "foo\nbar">` or something?
Recently, multi-...
mame (Yusuke Endoh)
09:48 AM Revision ddb32e66 (git): [Bug #18173] Update loaded_features_index
If $LOADED_FEATURES is changed in the just required file, also the
index table needs to be updated before loaded_features_snapshot is
reset. If the snapshot is reset without updating the table, the
name of the added feature will not be ...
nobu (Nobuyoshi Nakada)
09:22 AM Feature #14579: Hash value omission
...Which is that `{ symbol: }` verbosely means `{ symbol: binding.local_variable_defined?(:symbol) ? binding.local_variable_get(:symbol) : __send__(:symbol) }` with no exception, no matter if the symbol is `if`, `self`, `fork`, `return` ... knu (Akinori MUSHA)
06:10 AM Feature #14579 (Closed): Hash value omission
Matz accepted the current behavior at [DevelopersMeeting20210916Japan](https://bugs.ruby-lang.org/issues/18122) shugo (Shugo Maeda)
01:41 AM Feature #14579: Hash value omission
matz (Yukihiro Matsumoto) wrote in #note-16:
> I assumed the value should be a local variable.
I also assumed the same thing, but after getting over my initial surprise I found this way is quite nice, very ruby-ish. A bit like learni...
Dan0042 (Daniel DeLorme)
08:31 AM Revision 5f1385be (git): Add a newline [ci skip]
shugo (Shugo Maeda)
08:29 AM Revision 81fd91ab (git): Add details of Hash value ommission [ci skip]
shugo (Shugo Maeda)
07:21 AM Feature #18127: Ractor-local version of Singleton
OK, accepted.
Matz.
matz (Yukihiro Matsumoto)
05:16 AM Bug #15027 (Rejected): When Struct#each method is overriden Struct#select and Struct#to_a use wrong collections
The methods may be overridden in the subclass. The assumption in this report seems to be too much.
Rejected.
Matz.
matz (Yukihiro Matsumoto)
05:13 AM Bug #18171 (Closed): `Marshal` ignores `Hash#compare_by_identity`
Is this a bug?
```ruby
h = {}.compare_by_identity
h["a"+"1"] = "1"
h["a"+"1"] = "2"
p h #=> {"a1"=>"1", "a1"=>"2"}
p Marshal.load(Marshal.dump(h)) #=> {"a1"=>"2"}
```
nobu (Nobuyoshi Nakada)
05:02 AM Feature #18143 (Rejected): Add a new method to change GC.stress only in the given block such as GC.with_stress(flag) {...}
I reject this proposal, for several reasons:
* it's very easy to implement the method using existing `GC.stress` and `begin ... ensure` by yourself
* if it's built-in, users may expect too much (thread-safety is one of them)
Matz.
matz (Yukihiro Matsumoto)
04:21 AM Revision 68bd5626 (git): Remove unneeded ruby_reset_leap_second_info function declaration (#4824)
S_H_ (Shun Hiraoka)
01:17 AM Feature #17295: Feature: Create a directory and file with Pathname#touch
In the end I agree that `touch` is enough and `ensure_parent_dir_exists` is unnecessary (even with a shorter name). Even though creating the file via "touch" is kinda redundant before `open('a')` it's not really a problem either.
sch...
Dan0042 (Daniel DeLorme)

09/15/2021

11:01 PM Bug #18169 (Assigned): Local copies of gemified libraries are being released out of sync with their gems
hsbt (Hiroshi SHIBATA)
07:48 PM Bug #18169: Local copies of gemified libraries are being released out of sync with their gems
I am unable to edit the description, but I wanted to make clear that the two proposed solutions are mutually exclusive, and I **strongly** recommend that the gem sources be removed from the CRuby repository rather than auditing them at r... headius (Charles Nutter)
07:41 PM Bug #18169 (Closed): Local copies of gemified libraries are being released out of sync with their gems
The CRuby codebase includes a number of libraries that have been gemified, more and more with each release. Unfortunately, these libraries are continually out of sync with both their home repositories and their released gems.
The prob...
headius (Charles Nutter)
08:51 PM Revision 745287d4 (git): Enhanced RDoc for Range#minmax (#4846)
burdettelamar (Burdette Lamar)
08:00 PM Feature #18159: Integrate functionality of syntax_suggest gem into Ruby
I've made a draft PR with a working spike of getting this into Ruby. https://github.com/ruby/ruby/pull/4845 it should be good enough for discussion. I used the same interface you suggested here. It was very easy.
The only limitation ...
schneems (Richard Schneeman)
07:48 PM Revision e967740d (git): Enhanced RDoc for Range#max (#4844)
burdettelamar (Burdette Lamar)
07:24 PM Feature #17295: Feature: Create a directory and file with Pathname#touch
> Shouldn't this method take keyword arguments that FileUtils.touch accepts?
I looked into it. Of the existing pathnames that delegate to FileUtils, only one supports kwargs and it does not support all of them, just one:
```
  d...
schneems (Richard Schneeman)
06:37 PM Revision 67e3727d (git): * 2021-09-16 [ci skip]
git[bot]
06:37 PM Revision 97374c7e (git): Enhanced RDoc for Range#min (#4842)
burdettelamar (Burdette Lamar)
06:22 PM Feature #10982 (Closed): Clarify location of NoMethod error
ko1 (Koichi Sasada)
02:18 PM Feature #10982: Clarify location of NoMethod error
We can close this due to addition of error_highlight in ruby https://github.com/ruby/ruby/tree/db51bcada408f8b0b93a11d41f8e4222436bd9f2/lib/error_highlight schneems (Richard Schneeman)
01:59 PM Revision db51bcad (git): Fix total_freed_objects for invalidated pages
When the object is moved back into the T_MOVED, the flags of the T_MOVED
is not copied, so the FL_FROM_FREELIST flag is lost. This causes
total_freed_objects to always be incremented.
Peter Zhu
01:00 PM Revision a65ac2d6 (git): Don't overwrite free_slots count during sweeping
gc_compact_finish may invalidate pages, which may move objects from this
page to other pages, which updates the free_slots of this page.
Peter Zhu
01:00 PM Revision e624d0d2 (git): Update the free_slots count of the original page
When invalidating a page during compaction, the free_slots count should
be updated for the page of the object and not the page of the forwarding
address (since the object gets moved back to the forwarding address).
Peter Zhu
10:08 AM Feature #14579: Hash value omission
duerst (Martin Dürst) wrote in #note-27:
> I don't think using `if` as the name of a local variable is a good idea, and I don't think the speed of bad ideas should concern us too much.
As zverok stated, a keyword such as `if` is used...
shugo (Shugo Maeda)
10:00 AM Feature #14579: Hash value omission
@duerst
> I don't think using `if` as the name of a local variable is a good idea,
It is good (and widely used, BTW) name for a method parameter, in contexts like
```ruby
validate :foo, if: :something?
```
I don't see how it is...
zverok (Victor Shepelev)
09:27 AM Feature #14579: Hash value omission
shugo (Shugo Maeda) wrote in #note-26:
> duerst (Martin Dürst) wrote in #note-25:
> ...
I don't think using `if` as the name of a local variable is a good idea, and I don't think the speed of bad ideas should concern us too much.
duerst (Martin Dürst)
08:54 AM Feature #14579: Hash value omission
duerst (Martin Dürst) wrote in #note-25:
> Ah, so `{if:}` means something close to `{if: local_variable_get(:if)}` and '{self:}` means something close to `{self: local_variable_get(:self)}` (and NOT `{self: self}`).
Yes.
Technicall...
shugo (Shugo Maeda)
07:18 AM Feature #14579: Hash value omission
shugo (Shugo Maeda) wrote in #note-24:
> I meant that keywords are allowed as local variable or method names.
> ...
Ah, so `{if:}` means something close to `{if: local_variable_get(:if)}` and '{self:}` means something close to `{self...
duerst (Martin Dürst)
06:40 AM Feature #14579: Hash value omission
shugo (Shugo Maeda) wrote in #note-22:
> except that keywords are allowed.
I meant that keywords are allowed as local variable or method names.
For example, `{if:}` is not a syntax error and `{self:}` doesn't access the receiver but...
shugo (Shugo Maeda)
06:20 AM Feature #14579: Hash value omission
Note that constants are also allowed:
```ruby
X = 1
p(X:) #=> {:X=>1}
```
shugo (Shugo Maeda)
06:13 AM Feature #14579 (Assigned): Hash value omission
matz (Yukihiro Matsumoto) wrote in #note-16:
> I assumed the value should be a local variable. The merged patch calls the method when the local variable is not defined.
> ...
I believe a method should be called when a local variable is...
shugo (Shugo Maeda)
07:55 AM Revision 92ac1721 (git): [ruby/racc] gemspec: Link to https in homepage [ci skip]
https://github.com/ruby/racc/commit/96075f7720 olleolleolle (Olle Jonsson)
07:32 AM Feature #18037: Update Unicode data to Unicode Version 14.0.0
The release of Unicode Version 14.0.0 has officially been announced today, see
https://home.unicode.org/announcing-the-unicode-standard-version-14-0/.
The overall summary of the version is at http://www.unicode.org/versions/Unicode14.0...
duerst (Martin Dürst)
07:20 AM Revision 645acf57 (git): [ruby/racc] Prefer __dir__ over File.dirname(__FILE__)
https://github.com/ruby/racc/commit/c49df40658 Olle Jonsson
07:11 AM Revision fae0f248 (git): Add test cases for constants and keywords
shugo (Shugo Maeda)
05:29 AM Feature #18168 (Open): Add ActiveSupport deep_transform_values to Ruby
I think since transform_values is a part of Ruby, it makes sense to support the nested version of transform values maximus242 (Philip Solobay)
05:16 AM Revision a27c274f (git): [DOC] Fix broken links [ci skip]
* As the "doc/" prefix is specified by the `--page-dir` option,
remove from the rdoc references.
* Refer to the original .rdoc instead of the converted .html.
nobu (Nobuyoshi Nakada)
12:25 AM Revision 63ab2fed (git): include/ruby/atomic.h: add doxygen
Must not be a bad idea to improve documents. [ci skip] shyouhei (Shyouhei Urabe)
12:25 AM Revision 789232f9 (git): template/Doxyfile.tmpl: modernise
applied doxygen -g for Doxygen 1.9.3. shyouhei (Shyouhei Urabe)
 

Also available in: Atom