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
-
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... -
02:58 PM Revision 6e1507f8 (git): Explicit the target of do-install-all as the same as dont-install-all
-
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).... -
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`.
-
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"... -
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 "... -
02:28 PM Revision c94718e3 (git): [ruby/irb] Check if Gem::Specification is defined
- https://github.com/ruby/irb/commit/005ade74dd
-
02:28 PM Revision 4576cdca (git): [ruby/irb] Fix argument order
- https://github.com/ruby/irb/commit/05c65858a0
-
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.
-
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,... -
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.
09/20/2021
-
11:19 PM Revision 046f1bf4 (git): Enhanced RDoc for Enumerable#inject (#4876)
-
06:41 PM Revision 736eb30e (git): Enhanced RDoc for Range (#4870)
- Introductory material revised.
- 06:41 PM Revision 53bee753 (git): * 2021-09-21 [ci skip]
-
06:40 PM Revision 2a9876a8 (git): Enhance documentation on GC.stat (#4843)
-
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 ... -
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]... -
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!
-
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. -
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... - 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... -
12:52 PM Misc #18175: Propose Jean Boussier (@byroot) as a core committer
- Congrats Jean!
Petrik - 11:16 AM Revision b61064b8 (git): Add gvl and fiber assertions to scheduler interface to catch invalid usage.
- 10:07 AM Revision cb843456 (git): Add alternative optional hook for `scheduler_close` to allow public usage of close.
- 10:07 AM Revision 4730a1e0 (git): Don't describe C function that does not exist in prior versions.
-
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...
-
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/... - 06:30 AM Revision 649c87bd (git): Add C interface spec.
- 06:30 AM Revision 88ba5fe5 (git): Expose `rb_fiber_raise` and tidy up the internal implementation.
-
06:23 AM Revision 2e3d43e5 (git): Allow to include uninitialized modules [Bug #18177]
- The module that is about to be included is considered initialized.
09/19/2021
- 03:15 PM Revision d2d54903 (git): * 2021-09-20 [ci skip]
- 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... - 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... - 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... -
03:15 PM Revision e32fe3ce (git): MINGW: _WIN64 is not defined on i386-mingw32 + ucrt.
-
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".
-
03:15 PM Revision 8bda5128 (git): MINGW: set rb_cv_msvcrt=ucrt and RT_VER=140 when UCRT is used
-
03:15 PM Revision 4705ebd9 (git): MINGW: Fix build error on Windows UCRT
-
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)
``` -
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... -
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... -
01:39 PM Revision c0a892a7 (git): Fix a typo [Bug #17048]
-
10:51 AM Bug #18161: [BACKPORT] b8386f7f7f6d7a7d76481e02d389d0f5211f0f2c
- backported into ruby_2_7 at ac7c2754c004cdb3618738e315d2e2cb5f68a3a8
- 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. -
08:17 AM Revision d531f12e (git): Enable shallow clone on appveyor
- https://www.appveyor.com/docs/how-to/repository-shallow-clone/
-
07:27 AM Revision 70624ae4 (git): Extract hook macro for attributes
-
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.
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.
-
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 ... - 04:05 PM Revision f9fd04ff (git): * 2021-09-19 [ci skip]
-
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. ... -
02:21 PM Misc #18175: Propose Jean Boussier (@byroot) as a core committer
- Accepted.
Matz.
-
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. -
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. -
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] -
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-... -
12:52 PM Revision 1b300789 (git): ast.c: AST.of against C method should return nil (as Ruby 2.6--3.0)
-
12:28 PM Revision ed9d9cee (git): ast.c: AST.of checks if a given method object is defined in C
- [Bug #18178]
-
12:27 PM Revision 1c07c982 (git): Enhanced RDoc for Range (#4847)
- Treated:
#to_s
#inspect
#===
#include?
#cover?
#count - 09:04 AM Revision 593cc4ca (git): * 2021-09-18 [ci skip]
-
09:03 AM Revision ec4ecb6d (git): Include the invalid value in invalid_utc_offset error
-
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.
-
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.
-
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.
-
07:51 AM Bug #17735: `Hash#transform_keys!` drops non evaluated keys
- Additionally backported bb84c75001f1bf13b4b2a12db8f4420e76a3ea03 into ruby_3_0 at 98ac62de5cb03efec0fb32684c61c0d4df692e5a.
-
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(-) -
07:15 AM Bug #18161: [BACKPORT] b8386f7f7f6d7a7d76481e02d389d0f5211f0f2c
- b8386f7f7f6d7a7d76481e02d389d0f5211f0f2c was already backported into ruby_3_0 branch at 80c180df769016d58663218de2687613841864f3.
-
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... -
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... -
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(-) -
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... -
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... -
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...
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... -
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... -
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... -
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
-
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. -
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... -
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... -
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)... - 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 -
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] -
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 ::... -
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... -
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... -
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? -
07:14 AM Misc #18175: Propose Jean Boussier (@byroot) as a core committer
- +2
-
03:17 AM Misc #18175: Propose Jean Boussier (@byroot) as a core committer
- +1
-
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
```
```
... -
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.
... -
02:14 AM Revision fd918d1a (git): Removed Module.allocate [Bug #17048]
-
02:14 AM Revision 178ee1e8 (git): Already initialized modules cannot be replaced [Bug #17048]
-
01:27 AM Revision 8f41c791 (git): Add spec for MatchData#match and MatchData#match_length [Feature #18172]
-
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. -
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`.
09/16/2021
-
11:54 PM Revision 34d6720f (git): Prohibit test method redefinition
- 11:39 PM Revision 8450b6a9 (git): * 2021-09-17 [ci skip]
-
11:38 PM Revision 475a4651 (git): [Feature #18172] Fix duplicate test name
-
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) {... -
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 ... -
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? -
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 ... -
04:28 PM Bug #17568 (Feedback): Thread.handle_interrupt is per-Thread but should probably be per-Fiber
-
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... -
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... -
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(... -
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. -
01:36 PM Feature #18172: MatchData#sublen to return the length of a substring
- @nobu, isn't your `MatchData#match` the same as `MatchData#[]` ?
-
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. -
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.
-
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... -
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... -
03:25 PM Misc #18122 (Closed): DevelopersMeeting20210916Japan
-
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... -
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... -
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... -
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.
-
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...
-
02:49 PM Revision cbbda3e6 (git): Adjust indent in string.c [ci skip]
-
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... -
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... -
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) }
``` -
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... -
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... -
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.
-
04:29 AM Feature #18136: take_while_after
- This behavior of `take_upto` feels to me like `drop_after`. 🤔
-
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... -
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. -
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? -
05:14 AM Feature #18148: Marshal.load freeze option
- Seems reasonable. Accepted.
@nobu might have concerns regarding `Hash#compare_by_identity`.
Matz.
-
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?
-
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`.
-
10:55 AM Revision aa3d8388 (git): NEWS for [Feature #18172] [ci skip]
-
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. -
10:55 AM Revision 09d724e6 (git): [Feature #18172] Add MatchData#match
- The method to return the single matched substring corresponding to
the given argument. -
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... -
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... -
10:16 AM Bug #18170: Exception#inspect should not include newlines
- Thanks @mame.
-
08:42 AM Bug #18170 (Assigned): Exception#inspect should not include newlines
- Matz said "give it a try". I'll create a PR
-
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-... -
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 ... -
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` ...
-
06:10 AM Feature #14579 (Closed): Hash value omission
- Matz accepted the current behavior at [DevelopersMeeting20210916Japan](https://bugs.ruby-lang.org/issues/18122)
-
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... -
08:31 AM Revision 5f1385be (git): Add a newline [ci skip]
-
08:29 AM Revision 81fd91ab (git): Add details of Hash value ommission [ci skip]
-
07:21 AM Feature #18127: Ractor-local version of Singleton
- OK, accepted.
Matz.
-
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.
-
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"}
``` -
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.
-
04:21 AM Revision 68bd5626 (git): Remove unneeded ruby_reset_leap_second_info function declaration (#4824)
-
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...
09/15/2021
-
11:01 PM Bug #18169 (Assigned): Local copies of gemified libraries are being released out of sync with their gems
-
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...
-
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... -
08:51 PM Revision 745287d4 (git): Enhanced RDoc for Range#minmax (#4846)
-
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 ... -
07:48 PM Revision e967740d (git): Enhanced RDoc for Range#max (#4844)
-
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... - 06:37 PM Revision 67e3727d (git): * 2021-09-16 [ci skip]
-
06:37 PM Revision 97374c7e (git): Enhanced RDoc for Range#min (#4842)
-
06:22 PM Feature #10982 (Closed): Clarify location of NoMethod error
-
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
- 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. - 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. - 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). -
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... -
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... -
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. -
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... -
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... -
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... -
06:20 AM Feature #14579: Hash value omission
- Note that constants are also allowed:
```ruby
X = 1
p(X:) #=> {:X=>1}
``` -
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... -
07:55 AM Revision 92ac1721 (git): [ruby/racc] gemspec: Link to https in homepage [ci skip]
- https://github.com/ruby/racc/commit/96075f7720
-
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... - 07:20 AM Revision 645acf57 (git): [ruby/racc] Prefer __dir__ over File.dirname(__FILE__)
- https://github.com/ruby/racc/commit/c49df40658
-
07:11 AM Revision fae0f248 (git): Add test cases for constants and keywords
-
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
-
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. -
12:25 AM Revision 63ab2fed (git): include/ruby/atomic.h: add doxygen
- Must not be a bad idea to improve documents. [ci skip]
-
12:25 AM Revision 789232f9 (git): template/Doxyfile.tmpl: modernise
- applied doxygen -g for Doxygen 1.9.3.