Project

General

Profile

Activity

From 01/20/2021 to 01/26/2021

01/26/2021

11:05 PM Bug #17582: Build failure with bison-3.7.5
Thanks nobu. I confirmed to build with bison-3.7.5 hsbt (Hiroshi SHIBATA)
12:57 PM Bug #17582 (Closed): Build failure with bison-3.7.5
Applied in changeset commit:git|b091889ed67f278b1652ddde88596e2160d5aef0.
----------
Removed YYUSE [Bug #17582]
Although it was used just to suppress an "unsed argument" warning
in the same manner as other bison-provided functions, it ...
nobu (Nobuyoshi Nakada)
12:22 AM Bug #17582 (Closed): Build failure with bison-3.7.5
I got the following error with bison 3.7.5 provided by homebrew on macOS Catalina.
```
parse.y:13337:5: error: implicit declaration of function 'YYUSE' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
YYUSE(p);
^...
hsbt (Hiroshi SHIBATA)
09:04 PM Feature #15504: Freeze all Range objects
@AlexWayfer
https://github.com/AlexWayfer/gorilla_patch/blob/master/lib/gorilla_patch/cover.rb#L8 -- may be for this particular case it is better to have version guard as an outer check?..
```ruby
if RUBY_VERSION < '2.6'
def co...
zverok (Victor Shepelev)
08:52 PM Feature #15504: Freeze all Range objects
I can't now mock Range objects with RSpec (`gorilla_patch` gem). What should I do? I see no work-around, like `+'foo'` for strings. `Range.new` gives frozen objects too.
I found a work-around: `(5..7).dup`, but it's weird anyway.
AlexWayfer (Alexander Popov)
05:22 PM Revision d7a844cb (git): Fix broken link in RDoc for String (#4123)
Link was correct; its target was incorrect; now fixed. burdettelamar (Burdette Lamar)
05:12 PM Bug #17585: DWARF5 support?
Just FTR, I have reported this initially against GCC:
https://bugzilla.redhat.com/show_bug.cgi?id=1920533
vo.x (Vit Ondruch)
05:11 PM Bug #17585 (Closed): DWARF5 support?
Fedora recently switched from DWARF4 to DWARF5 and since that time, I observe test suite errors on ppc64le:
~~~
1) Failure:
TestBugReporter#test_bug_reporter_add [/builddir/build/BUILD/ruby-3.0.0/test/-ext-/bug_reporter/test_bug_r...
vo.x (Vit Ondruch)
04:18 PM Revision 8a3f8166 (git): Re-enable RGENGC_DEBUG for platforms with HAVE_VA_ARGS_MACRO
after this commit turned it off globally.
888cf28a7e3a07fc0a41688777a40910654005ad
Co-authored-by: peterzhu2118 <peter@peterzhu.ca>
eightbitraptor (Matt V-H)
04:18 PM Revision a554e96a (git): * 2021-01-27 [ci skip]
git[bot]
04:17 PM Revision 479e4d13 (git): Fix RGENGC CHECK MODE >= 4
[A previous commit](b59077eecf912a16efefc0256f6e94a000ce3888) removes some macro definitions that are used when RGENGC_CHECK_MODE >=4 because they were using data stored against objspace, which is not ractor safe
This commit reinstates ...
eightbitraptor (Matt V-H)
03:35 PM Bug #17583: Segfault on large stack(RUBY_THREAD_VM_STACK_SIZE)
Seems `mark_object_ary` broken?
This should be the array of arrays.
```
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10)
frame #0: 0x00000001007698a9 miniruby`lookup_method_table...
nobu (Nobuyoshi Nakada)
08:55 AM Bug #17583 (Closed): Segfault on large stack(RUBY_THREAD_VM_STACK_SIZE)
When I set large stack size like 100MB using RUBY_THREAD_VM_STACK_SIZE,
I get the segmentation fault.
The error looks happens when RUBY_THREAD_VM_STACK_SIZE is larger than around 17MB.
How to reproduce:
```
$ RUBY_THREAD_VM_STACK_...
yoshiokatsuneo (Tsuneo Yoshioka)
01:19 PM Revision ed6dc066 (git): CFLAGS includes ARCH_FLAG
nobu (Nobuyoshi Nakada)
12:57 PM Revision b091889e (git): Removed YYUSE [Bug #17582]
Although it was used just to suppress an "unsed argument" warning
in the same manner as other bison-provided functions, it has been
dropped since Bision 3.7.5. And we always suppress that
warnings.
nobu (Nobuyoshi Nakada)
12:10 PM Bug #17584 (Closed): Segmentation fault with Ruby 3.0
In last week, I update Ruby 3.0 from Ruby 2.6.6 for my application. After that, I got the segmentation fault with following error.
```
[BUG] Segmentation fault at 0x0000000000000046
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86...
hsbt (Hiroshi SHIBATA)
12:05 PM Bug #16926 (Closed): Kernel#require does not load a feature twice when $LOAD_PATH has been modified spec fails only on 2.7
I released RubyGems 3.1.6 https://blog.rubygems.org/2021/01/26/3.1.6-released.html
@nagachika Can you merge https://github.com/ruby/ruby/pull/4122 for Ruby 2.7.3?
hsbt (Hiroshi SHIBATA)
12:03 PM Bug #16904: rubygems: psych: superclass mismatch for class Mark (TypeError)
I released RubyGems 3.1.6 https://blog.rubygems.org/2021/01/26/3.1.6-released.html and create the backport request for this into `ruby_2_7` branch. hsbt (Hiroshi SHIBATA)
08:45 AM Bug #17578: mkmf experimental C++ Support
Thanks for the quick response.
I think that is different. try_cpp calls cpp_command:
``` ruby
def try_cpp(src, opt="", *opts, &b)
try_do(src, cpp_command(CPPOUTFILE, opt), *opts, &b)
...
end
```
And cpp_command...
cfis (Charlie Savage)
12:23 AM Bug #17578 (Assigned): mkmf experimental C++ Support
I guess recent commit:4b6fd8329b46701414aba2eeca10013cf66ec513 has something to do with it. @cfis Can you try the current master? If that fixes your situation I guess we need to backport.
The canonical usage of `MakeMakefile['C++']`...
shyouhei (Shyouhei Urabe)
05:32 AM Bug #17494: ruby is hanged when using activesupport + rspec + rspec-parameterized
This minimum case hangs since https://github.com/ruby/ruby/commit/b9007b6c548f91e88fd3f2ffa23de740431fa969
* Save this minimum case as `rep17494_min.rb`, added some p method to see if it hangs or not.
```ruby
Object.prepend(Module...
yahonda (Yasuo Honda)
12:45 AM Bug #17494: ruby is hanged when using activesupport + rspec + rspec-parameterized
The previous patch failed an assertion.
https://github.com/nobu/ruby/runs/1760739746?check_suite_focus=true#step:15:288
> | Assertion Failed: ../src/vm_method.c:990:search_method:me == NULL || !METHOD_ENTRY_INVALIDATED(me)
Maybe the rea...
nobu (Nobuyoshi Nakada)
01:47 AM Bug #17429: Prohibit include/prepend in refinement modules
@eregon @marcandre Thanks for your feedback.
The remaining issue is the name of the new method.
I came up with the following options:
1. Refinement#import
2. Refinement#mix
3. Refinement#include (different behavior from Module#i...
shugo (Shugo Maeda)
01:30 AM Revision 1e2a8f7c (git): vcs.rb: fix for baseruby 2.2
nobu (Nobuyoshi Nakada)
01:07 AM Revision 33c5e9d1 (git): * 2021-01-26 [ci skip]
git[bot]
01:04 AM Bug #17581: Ruby 3.0 backtrace sometimes returns empty array
This happens for all backtrace frames where there is an `iseq` but no `pc`. That part didn't change in the commit mentioned, so it must have been handled as a side effect of always looking at the entire backtrace, and filtering the resu... jeremyevans0 (Jeremy Evans)
01:04 AM Revision 6963e682 (git): vcs.rb: support `d` command in log-fix
nobu (Nobuyoshi Nakada)
12:58 AM Revision a56760b9 (git): vcs.rb: allow log-fix to insert an empty line
nobu (Nobuyoshi Nakada)

01/25/2021

09:24 PM Bug #17581 (Assigned): Ruby 3.0 backtrace sometimes returns empty array
Agreed, it does look likely to be related to the commit. I'll see if I can debug and fix the issue. jeremyevans0 (Jeremy Evans)
09:11 PM Bug #17581 (Closed): Ruby 3.0 backtrace sometimes returns empty array
```ruby
class Foo
def bar
p caller(1,1)
end
end
[Foo.new].group_by(&:bar)
```
3.0: []
2.7: ["test2.rb:6:in `each'"]
A similar thing happens when asking for a larger part of the backtrace:
```ruby
class Foo
...
HParker (Adam Hess)
05:40 PM Misc #17580 (Closed): Bignum referenced in Time documentation
Since #12005 Bignum has been unified with Fixnum into Integer class, but it is still referenced in Time documentation.
> Since Ruby 1.9.2, Time implementation uses a signed 63 bit integer,
> ...
> nanosecond), Time works slower as wh...
semaperepelitsa (Simon Perepelitsa)
05:35 PM Feature #17548: Need simple way to include symlink directories in Dir.glob
For your specific case, a workaround might be to use a bind mount instead of symlink.
But in general I agree having a `follow_symlink` option would be nice to have, either in `Dir.glob` or in `Find.find`
Dan0042 (Daniel DeLorme)
04:45 PM Feature #16978: Ruby should not use realpath for __FILE__
Dan0042 (Daniel DeLorme) wrote in #note-12:
> I think this is a bug and should be fixed, but IMO the proper fix is to use realpath for `__FILE__`
This is though one thinking about this again, but you are probably right. Maybe the big...
vo.x (Vit Ondruch)
02:35 PM Feature #16978: Ruby should not use realpath for __FILE__
I think this is a bug and should be fixed, but IMO the proper fix is to use realpath for `__FILE__`
So in the example above when you do `require "openssl/digest"`, ruby will find `/usr/local/lib/ruby/3.0.0/openssl/digest.rb` and then ...
Dan0042 (Daniel DeLorme)
04:33 PM Feature #17579: [Proposal] A suggestion for newline-separated shorthand notation, for the creation of Arrays containing strings that may contain ' ' (space) characters
I would also use heredoc for this, maybe just with one tweak:

```ruby
options = <<~EOF.lines(chomp: true)
choice 1
choice 2
choice 3
EOF
#=> ["choice 1", "choice 2", "choice 3"]
```
There's a few things combined here ...
Dan0042 (Daniel DeLorme)
03:11 PM Feature #17579: [Proposal] A suggestion for newline-separated shorthand notation, for the creation of Arrays containing strings that may contain ' ' (space) characters
I'm curious what is your use case. I can't recall needing an array of such strings. If I did, I would probably put these in a YAML file. marcandre (Marc-Andre Lafortune)
01:00 PM Feature #17579: [Proposal] A suggestion for newline-separated shorthand notation, for the creation of Arrays containing strings that may contain ' ' (space) characters
Didn't have time to read it fully but you can escape spaces:
```
2.7.1 :001 > %w(foo\ bar baz)
=> ["foo bar", "baz"]
```
Another option
```ruby
options = <<~EOF.lines.map(&:strip)
choice 1
choice 2
choice 3
choice 4
...
decuplet (Nikita Shilnikov)
11:15 AM Feature #17579 (Open): [Proposal] A suggestion for newline-separated shorthand notation, for the creation of Arrays containing strings that may contain ' ' (space) characters
New year, new proposal! :)
Summary (TL;DR) of the proposal first: It is here proposed that ruby adds functionality to allow ruby users to create arrays, with (string) members inside that array that may contain ' ' (space) characters.
...
shevegen (Robert A. Heiler)
04:32 PM Feature #17570: Move C heap allocations into GC heap for RVALUE object data
nobu (Nobuyoshi Nakada) wrote in #note-2:
> Thank you for the great work.
> ...
Thank you for taking the time to look.
We're definitely aware that the impact to Compaction and incremental marking are major drawbacks. We will address...
eightbitraptor (Matt V-H)
03:54 PM Feature #17330: Object#non
FWIW, +1 from me
At first I thought the only uses were `non(&:zero?)` and `non(&:empty?)` which, while I find very elegant, are not enough to justify adding a method to Kernel. But I think zverok has shown enough other uses to make a ...
Dan0042 (Daniel DeLorme)
09:33 AM Revision 19e6d271 (git): [ruby/rdoc] Support iso-strict format in git-log
https://github.com/ruby/rdoc/commit/2a6c22da63 nobu (Nobuyoshi Nakada)
09:33 AM Revision 7fe22152 (git): [ruby/rdoc] Support other date formats in git-log
https://github.com/ruby/rdoc/commit/ad8cf37d72 nobu (Nobuyoshi Nakada)
08:51 AM Bug #17494: ruby is hanged when using activesupport + rspec + rspec-parameterized
This patch seems to avoid the loop for the time being.
```diff
diff --git i/class.c w/class.c
index a62ae669f84..61f3ece40f4 100644
--- i/class.c
+++ w/class.c
@@ -1369,7 +1369,7 @@ method_entry_i(ID key, VALUE value, void *data)...
nobu (Nobuyoshi Nakada)
12:42 AM Bug #17494: ruby is hanged when using activesupport + rspec + rspec-parameterized
@alpaca-tc Thannk you, I can reproduce that too.
```
zsh % LC_ALL=C gdb --args ./miniruby ~/tmp.rb
GNU gdb (Ubuntu 8.2-0ubuntu1~18.04) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <htt...
shyouhei (Shyouhei Urabe)
06:26 AM Bug #17578 (Assigned): mkmf experimental C++ Support
I've been working on the Rice gem (https://github.com/jasonroelofs/rice) that wraps C++ code for use in Ruby.
I noticed that some c++ support was added to mkmf for Ruby 2.7. However, if I try to use it find a header it fails to work. ...
cfis (Charlie Savage)
03:51 AM Revision 5411fb8c (git): * 2021-01-25 [ci skip]
git[bot]
03:51 AM Revision fd6d5c80 (git): Clear each test own temporary directories
nobu (Nobuyoshi Nakada)

01/24/2021

10:52 PM Bug #17527: rb_io_wait_readable/writable with scheduler don't check errno
I checked the PR, I understand, thanks for the clear bug report.
I will review it in more detail, but it seems like a reasonable approach.
ioquatix (Samuel Williams)
07:58 PM Feature #17576: Partial Functions (procs, lambdas)
Kinda reminded me of Elixir's [guards] (https://hexdocs.pm/elixir/guards.html). matheusrich (Matheus Richard)
07:03 PM Bug #17577 (Closed): Segfault when sending some Exceptions to a Ractor
The following segfaults:
```ruby
r = Ractor.new { receive }
begin
foo # => raises a NoMethodError
rescue Exception => e
r.send(e)
end
p r.take
```
Note that some exceptions are ok:
```ruby
raise # => ok
raise NoMeth...
marcandre (Marc-Andre Lafortune)
02:26 PM Revision 30f11e73 (git): Revert "Remove temporary directory properly"
This reverts commit 80bad36989bbc4ad6167fe9670327f95b78089ce,
because a few CI machines fail continuously.
nobu (Nobuyoshi Nakada)
10:30 AM Revision 80bad369 (git): Remove temporary directory properly
For each `make check`, rubygems test makes "tmp" directory and
some "gem_generate_index..." directories remain there.
* Do not create a (fixed name) directory in the current working
directory
* Should remove its own temporary directory
nobu (Nobuyoshi Nakada)
09:34 AM Revision db80be3d (git): * 2021-01-24 [ci skip]
git[bot]
09:33 AM Revision 9aea4387 (git): Add 3.0 top sepc guards
* Needs WEBrick nobu (Nobuyoshi Nakada)
09:33 AM Revision 21340303 (git): Fix compile error of sockssocket
The patch is provided by PhobosK (Phobos Kappa).
This should be backported to Ruby 3.0.
[Feature #17187]
Glass_saga (Masaki Matsushita)
09:33 AM Revision 1ce4e90d (git): Remove check branch from ruby_3_0
naruse (Yui NARUSE)
09:31 AM Feature #17330: Object#non
@nobu
> This seems readable enough and more flexible.
```ruby
return Faraday.get(url).then {_1.body if _1.successful?}
```
I argue that the idiom (return something/continue with something, conditionally) is so frequent, that i...
zverok (Victor Shepelev)
02:42 AM Feature #17330: Object#non
zverok (Victor Shepelev) wrote in #note-8:
> ```ruby
> ...
This seems readable enough and more flexible.
```ruby
return Faraday.get(url).then {_1.body if _1.successful?}
```
Or, make `successful?` to return `self` or `nil`, the...
nobu (Nobuyoshi Nakada)
07:46 AM Revision 52ebaf71 (git): [ruby/rdoc] Skip non-date logs by git-log
`RDoc::Parser::ChangeLog` mis-parses ChangeLog generated by
git-log, because of too heuristic `Time.parse`.
For instance, "commit 8187228de0142d3ac7950b7d977c2849e934c637"
results in "8187-08-16", that is, day 228 in the year 8187.
htt...
nobu (Nobuyoshi Nakada)
07:46 AM Revision d5d1c417 (git): [ruby/rdoc] Sort by CommitDate if available
https://github.com/ruby/rdoc/commit/455715e930 nobu (Nobuyoshi Nakada)
07:46 AM Revision fa048a0f (git): [ruby/rdoc] Add links to the commits
https://github.com/ruby/rdoc/commit/1821628076 nobu (Nobuyoshi Nakada)
07:46 AM Revision f3f1a666 (git): [ruby/rdoc] Shorten commit hashes
https://github.com/ruby/rdoc/commit/5d3e153963 nobu (Nobuyoshi Nakada)
07:46 AM Revision 127f735c (git): [ruby/rdoc] Tweak log entry markdown
* add 3 levels to headings
* prefix commit log to labels to make unique IDs
https://github.com/ruby/rdoc/commit/5074c13209
nobu (Nobuyoshi Nakada)
07:46 AM Revision b88d1e6b (git): [ruby/rdoc] Make each commit entries h3
https://github.com/ruby/rdoc/commit/11eefb2ae9 nobu (Nobuyoshi Nakada)
07:46 AM Revision bb570ce6 (git): [ruby/rdoc] Support ChangeLog generated by `git log`
https://github.com/ruby/rdoc/commit/5e0a123ca1 nobu (Nobuyoshi Nakada)
07:46 AM Revision 68e7dc53 (git): [ruby/rdoc] Fix failing test by adding gettext as a development dependency
The failing test was:
========================================================================================
rdoc/test/rdoc/test_rdoc_i18n_locale.rb:35:in `rescue in test_load_existent_po'
Omission: gettext gem is not found [test_load...
Dorian Marié
07:12 AM Feature #13750: Improve String#casecmp? and Symbol#casecmp? performance with ASCII string
When you avoid that case, you have a option around coderange: coderange is a cached information whether the string contains (1) only ASCII 7 bit characters (2) also has 8 bit characters (3) broken byte sequence (4) unknown. Some strings ... naruse (Yui NARUSE)
06:57 AM Revision 1bd27a78 (git): Add test for String#casecmp?
String#casecmp? also normalize upper case characters in legacy encodings. naruse (Yui NARUSE)
05:59 AM Revision d6e43e47 (git): Moved --verbose, --verbose and --help options to last [ci skip]
nobu (Nobuyoshi Nakada)
05:35 AM Revision 38816887 (git): * 2021-01-24 [ci skip]
git[bot]
05:35 AM Revision 743c44ee (git): [ruby/irb] Indent correctly with method calling with receiver
https://github.com/ruby/irb/commit/e7c68e74a0 aycabta (aycabta .)
05:35 AM Revision fc54af8a (git): [ruby/irb] Indent correctly with keyword "for" and "in"
https://github.com/ruby/irb/commit/47c83ea724 aycabta (aycabta .)

01/23/2021

04:41 PM Feature #17330: Object#non
@matz Thinking a bit more about it, what I frequently lack is a "singular reject": "drop this value if it doesn't match expectations".
```ruby
# HTTP-get something, don't return result unless successful:
response = Faraday.get(url)
...
zverok (Victor Shepelev)
04:15 PM Feature #16978: Ruby should not use realpath for __FILE__
Eregon (Benoit Daloze) wrote in #note-10:
> vo.x (Vit Ondruch) wrote in #note-7:
> ...
This is how it is constructed. Here is where the OpenSSL structure is created in traditional gem directories:
https://src.fedoraproject.org/rpms/ruby...
vo.x (Vit Ondruch)
10:31 AM Feature #16978: Ruby should not use realpath for __FILE__
vo.x (Vit Ondruch) wrote in #note-7:
> In Fedora, to avoid duplication, we have openssl gem extracted into independent package, which links back to the StdLib to keep the Ruby functionality.
What does it look like on the filesystem?
...
Eregon (Benoit Daloze)
02:38 AM Feature #16978: Ruby should not use realpath for __FILE__
Interestingly, ruby does _not_ use realpath for `__FILE__`, only for `__dir__` and `require_relative`
```
$ cat test.rb
p __dir__ => __FILE__
require_relative "b"
$ cat a/b.rb
p __dir__ => __FILE__
require_relative "c"
$ ln...
Dan0042 (Daniel DeLorme)
02:52 PM Feature #17576: Partial Functions (procs, lambdas)
Is there any real-world use-case? I don't see any of them.
Besides that, proposed syntax does not work well with normal blocks.
Matz.
matz (Yukihiro Matsumoto)
11:23 AM Feature #17576 (Open): Partial Functions (procs, lambdas)
We already have pattern matching and functions. Let's combine them and introduce a "partial procs" as first-class citizens.
What are partial procs? This is a function that works on a subset of arguments. The partial proc's main advan...
temabolshakov (Tema Bolshakov)
12:31 PM Bug #17534 (Closed): Pattern-matching is broken with find pattern
@palkan:
Thanks to fix!
@naruse:
Could you backport 1b89b99941548fdb65305dd9a412082e7fdba45a to 3.0?
ktsj (Kazuki Tsujimoto)
12:06 PM Revision 8cb999dd (git): Update power_assert to 2.0.0
ktsj (Kazuki Tsujimoto)
11:56 AM Revision 4de228b6 (git): Sort autogenerated dependencies [ci skip]
nobu (Nobuyoshi Nakada)
11:54 AM Feature #17472: HashWithIndifferentAccess like Hash extension
hcatlin (Hampton Catlin) wrote in #note-15:
> Would anyone here think the code below was acceptable?
Mixing symbol keys and string keys together like that would no doubt be very confusing, but why would you choose to do that instead ...
timcraft (Tim Craft)
11:03 AM Bug #17575 (Closed): deprecated style `respond_to?` warning with `-W:no-deprecated`
Applied in changeset commit:git|8dfae85adb96cf3da84bf38f2103969d4a7aed3f.
----------
Warn the defined location as deprecation as well as the main message
[Bug #17575]
nobu (Nobuyoshi Nakada)
10:56 AM Bug #17575 (Closed): deprecated style `respond_to?` warning with `-W:no-deprecated`
When `respond_to?` is defined in deprecated style, arity == 1, is warned and the defined location is also reported.
But if deprecation warning is disabled, the main message is disabled but the next line is still shown.
```
$ ruby -...
nobu (Nobuyoshi Nakada)
10:58 AM Revision 8dfae85a (git): Warn the defined location as deprecation as well as the main message
[Bug #17575] nobu (Nobuyoshi Nakada)
10:42 AM Misc #17569: `uri` lib maintainership
Would using an `@ivar` on the URI module work?
https://github.com/ruby/uri/pull/15#discussion_r563082346
Eregon (Benoit Daloze)
03:15 AM Misc #17569: `uri` lib maintainership
I don't know of another approach that is as easy and performant than to store a mostly fixed config like this. What did you have in mind? marcandre (Marc-Andre Lafortune)
09:56 AM Revision 62283f7a (git): coroutine/emscripten/: Experimentally support emscripten fiber API
mame (Yusuke Endoh)
08:38 AM Bug #17574: Hash#inspect segfault
It very much look like a duplicate of https://bugs.ruby-lang.org/issues/16689
@01wsmith you should try Ruby 2.7.2, this bug as been fixed in 2.7.1.
byroot (Jean Boussier)
07:59 AM Bug #17574: Hash#inspect segfault
```
02:58:45|00|1~ irb
irb(main):001:0> x = {1 => {2 => 5}, 3 => {4 => 6}}
irb(main):002:0> y = x[1]
irb(main):003:0> y[11] = 3
irb(main):004:0> x.transform_values!(&:clone)
=> {1=>{2=>5, 11=>3}, 3=>{4=>6}}
irb(main):005:0> y[11] ...
01wsmith (w smith)
06:44 AM Bug #17574 (Feedback): Hash#inspect segfault
I failed to reproduce this. Could you report your entire command logs and SEGV output to see a backtrace?
```
$ RUBYOPT=-v irb
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]
irb(main):001:0> IRB::VERSION
=> "1.2.1"
irb(mai...
k0kubun (Takashi Kokubun)
12:12 AM Bug #17574 (Closed): Hash#inspect segfault
While working in irb, I encountered an issue:
``` ruby
x = {1 => {2 => 5}, 3 => {4 => 6}}
y = x[1]
y[11] = 3
x.transform_values!(&:clone)
y[11] = nil
x
```
`x.inspect` causes irb to segfault.
I was not able to test this on ...
01wsmith (w smith)
07:07 AM Revision f12c33b6 (git): configure.ac: Add some compiler options for emscripten
"-lc" and "-s ALLOW_MEMORY_GROWTH=1" are needed mame (Yusuke Endoh)
07:05 AM Revision dd65aa95 (git): bignum.c: Make sure the argument of LONG2FIX is long
... because BDIGIT_DBL may be long long. POSFIXABLE and NEGFIXABLE
ensures that the value is representable as long, but it failed to build
on emscripten with -Werror -Wshorten-64-to-32.
mame (Yusuke Endoh)
04:24 AM Revision 05f89dd1 (git): thread_pthread.c: pthread_kill is not available on emscripten
mame (Yusuke Endoh)
04:24 AM Revision 33fb87cc (git): io.c: popen is not available on emscripten
mame (Yusuke Endoh)
02:36 AM Bug #17564: Source command in irb exits after reading and evaluating the file
I could reproduce the situation and I made a pull-request to fix this: https://github.com/ruby/irb/pull/177
Unexpectedly, there are many changes, but most of the measures are to pass existing tests and prevent file leaks.
no6v (Nobuhiro IMAI)
02:13 AM Revision 9efd590a (git): Rationalize floats in coerce [Bug #17572]
nobu (Nobuyoshi Nakada)
01:52 AM Revision 9de68a52 (git): Fix a warning
```
.../ruby/test/net/http/test_httpresponse.rb:81: warning: constant RubyVM::MJIT is deprecated
```
znz (Kazuhiro NISHIYAMA)
01:32 AM Bug #17572 (Closed): coerceで作成した(0.0/1)を計算に用いるとコアダンプする
Applied in changeset commit:git|a55eb9a2af7950d180d9d31ffde2bce66710f44f.
----------
Make reciprocal properly of non-integral rational [Bug #17572]
nobu (Nobuyoshi Nakada)
12:01 AM Bug #17572 (Closed): coerceで作成した(0.0/1)を計算に用いるとコアダンプする
coerceで`(0.0/1)`等の値を作成することができ、こちらを計算に使用するとコアダンプして落ちます(出力は添付参照)
再現コード
``` ruby
1/0r.coerce(0.0+0i)[0]
```
よろしくおねがいします
freedom (free dom)
01:30 AM Revision a55eb9a2 (git): Make reciprocal properly of non-integral rational [Bug #17572]
nobu (Nobuyoshi Nakada)
01:20 AM Revision 37258b64 (git): [ruby/net-http] Replace "iff" with "if and only if"
iff means if and only if, but readers without that knowledge might
assume this to be a spelling mistake. To me, this seems like
exclusionary language that is unnecessary. Simply using "if and only if"
instead should suffice.
https://git...
gmcgibbon (Gannon McGibbon)
01:11 AM Revision 47d6c557 (git): gc.c: stop overflow check on emscripten build
mame (Yusuke Endoh)
01:11 AM Revision 1dfddac3 (git): configure.ac: Stop -fstack-protector on emscripten build
mame (Yusuke Endoh)
01:07 AM Revision 6ef761a5 (git): vcs.rb: continue just with warning if failed to fetch notes
nobu (Nobuyoshi Nakada)
01:07 AM Revision ccd7b7ab (git): vcs.rb: include commit info in ChangeLog
nobu (Nobuyoshi Nakada)
12:50 AM Revision 1def8a60 (git): [rubygems/rubygems] Replace "iff" with "whether" and "if and only if"
iff means if and only if, but readers without that knowledge might
assume this to be a spelling mistake. To me, this seems like
exclusionary language that is unnecessary. Simply using "if and only if"
or "whether" should suffice.
https:...
gmcgibbon (Gannon McGibbon)
12:08 AM Bug #17573 (Closed): Crashes in profiling tools when signals arrive in non-Ruby threads
Stackprof (and likely similar tools) works by setting up a timer to sends it a unix signal on an interval. From that signal handler it does a small amount of internal bookkeeping and calls `rb_postponed_job_register_one`.
This is a pr...
jhawthorn (John Hawthorn)

01/22/2021

11:49 PM Bug #17571 (Closed): prependしたArray#[] が反映されない
Arrayクラスにprependを使い`[]`メソッドを差し込んでもprependした`[]`を呼び出しません
また、Hashを継承したクラス(以下HashB)のインスタンスでHash#[]を既に呼び出している場合
prependして差し込んだ`[]`を通らずにHash#[]が呼び出されているようです
HashBのインスタンス呼び出しがprependより後の場合は期待通り動きました
再現コード(Array)
``` ruby
module Tes...
freedom (free dom)
11:34 PM Misc #17569: `uri` lib maintainership
Yes, replacing the constant. nobu (Nobuyoshi Nakada)
11:17 PM Misc #17569: `uri` lib maintainership
@nobu which strategy is that? Do you mean the `register_scheme` API? marcandre (Marc-Andre Lafortune)
10:56 PM Misc #17569: `uri` lib maintainership
That strategy doesn’t feel nice to me. nobu (Nobuyoshi Nakada)
03:48 PM Misc #17569 (Closed): `uri` lib maintainership
I’d like to merge https://github.com/ruby/uri/pull/15 but it is an API change. I would release v1.0.0. @akr is the official maintainer of `uri`… Is he still interested in this role? Otherwise we could put “Ruby core team” in the listing… marcandre (Marc-Andre Lafortune)
11:32 PM Feature #17570: Move C heap allocations into GC heap for RVALUE object data
Thank you for the great work.
It is interesting idea.
At first glance, “GC Compaction” and “Incremental marking” seem major drawbacks, I’ll see the patch more.
nobu (Nobuyoshi Nakada)
04:10 PM Feature #17570 (Closed): Move C heap allocations into GC heap for RVALUE object data
## Feature
Move C heap allocations into GC heap.
## Pull Request:
[4107](https://github.com/ruby/ruby/pull/4107)
## Feature description
`RVALUE` is fixed width (40 bytes), some of which is used for accounting information and the...
eightbitraptor (Matt V-H)
10:23 PM Feature #16978: Ruby should not use realpath for __FILE__
Why not put some special handling in to `require_relative` such that it checks both the pre-`realpath` and `realpath` versions (perhaps behind a `#define` flow so that Fedora and other systems integrators can do this without impacting an... austin (Austin Ziegler)
09:28 PM Feature #16978: Ruby should not use realpath for __FILE__
I have problem with double loading because of symlinks resolving into real path. If there was ensured that `require "foo"` load file just once, then double loading can't happen.
In Fedora, to avoid duplication, we have openssl gem ext...
vo.x (Vit Ondruch)
09:11 PM Feature #16978: Ruby should not use realpath for __FILE__
+1 for keeping the current behavior.
I remember in 1.8 we had so many problems with double-loading code because a file could be require'd with different paths. I have no wish to go back to that mess.
Dan0042 (Daniel DeLorme)
06:20 PM Feature #16978: Ruby should not use realpath for __FILE__
I think we should use realpath.
The location of actual file is more robust.
Also, ELF dynamic linker has a feature, $ORIGIN, to refer a shared library using a relative path.
It also resolves symlinks.
https://refspecs.linuxbase.org...
akr (Akira Tanaka)
04:46 PM Feature #16978: Ruby should not use realpath for __FILE__
Can this be resolved please? This is another scenario, which should work IMO, but it does not work:
~~~
$ mkdir a/
$ echo "require_relative 'b'" > a/test.rb
$ touch b.rb
$ ll
total 4
drwxrwxr-x. 1 vondruch vondruch 14 Jan 22 1...
vo.x (Vit Ondruch)
09:01 PM Revision db7d0b89 (git): * 2021-01-23 [ci skip]
git[bot]
09:01 PM Revision 6e44de75 (git): What's Here for String RDoc (#4093)
* What's Here for String RDoc burdettelamar (Burdette Lamar)
06:30 PM Bug #17429: Prohibit include/prepend in refinement modules
I like @shugo's approach too.
For anyone interested, I released the `refine_export` gem that makes @jeremyevans' nice hack easy to use:
https://github.com/marcandre/refine_export#usage
marcandre (Marc-Andre Lafortune)
06:00 PM Bug #17543: Ractor isolation broken by `self` in shareable proc
I think conceptually sharing the self would be cleaner/simpler/consistent-with-captures-vars, but I agree in practice that's rarely wanted.
So changing the receiver to something like `Ractor::DETACHED_SELF` is probably the most convenien...
Eregon (Benoit Daloze)
05:17 PM Bug #17543: Ractor isolation broken by `self` in shareable proc
MaxLap (Maxime Lapointe) wrote in #note-7:
> It's also quite possible that the Ractor on the other side would use the block in an `instance_eval`, to change the `self`.
Yes, or `define_method`. My solution has the advantage of not ha...
marcandre (Marc-Andre Lafortune)
04:23 PM Bug #17543: Ractor isolation broken by `self` in shareable proc
Warning: The following code examples can be ugly. This is low level stuff meant to build nicer blocks on top. Viewer discretion is advised.
As codebases using Ractors grow, I expect people would want to put the logic elsewhere, in cla...
MaxLap (Maxime Lapointe)
04:32 PM Bug #17494: ruby is hanged when using activesupport + rspec + rspec-parameterized
I investigated this issue deeply based on yhonda's example code. Then I succeeded to create tiny reproduction code.
```ruby
Object.prepend(Module.new)
using(Module.new {
refine Object do
def hello; end
end
})
Object...
alpaca-tc (Hiroyuki Ishii)
05:41 AM Bug #17494: ruby is hanged when using activesupport + rspec + rspec-parameterized
# Workaround
`require` only minimal files.
In this case, stop to require "active_support/all"
e.g.
``` ruby
# require "active_support/all"
require "active_support/core_ext/time/zones"
require "active_support/core_ext/array...
sue445 (Go Sueyoshi)
02:41 PM Revision 07b4b1b1 (git): Support coroutine on universal binary
nobu (Nobuyoshi Nakada)
02:40 PM Revision e34eb58a (git): Keep ARCH_OPTION for arm64
nobu (Nobuyoshi Nakada)
02:21 PM Revision f1c36f2e (git): Added include guards to coroutine headers
nobu (Nobuyoshi Nakada)
01:29 PM Revision c3244a35 (git): Do not set target_alias if unset
nobu (Nobuyoshi Nakada)
09:37 AM Revision c8121b2e (git): Adjust CPU name as arm64-darwin
config.sub replaces arm64 with aarch64. nobu (Nobuyoshi Nakada)
09:37 AM Revision 899b9506 (git): Remove common output directory
nobu (Nobuyoshi Nakada)
09:15 AM Revision e586345b (git): check is_incremental_marking() again
is_incremental_marking() can be changed after checking the
flag without locking, especially on `GC.stress = true`.
ko1 (Koichi Sasada)
05:07 AM Revision a1bb110b (git): [ruby/bigdecimal] [Doc] Fix the comment of BigDecimal_div2 [ci skip]
https://github.com/ruby/bigdecimal/commit/a109d0984f Kenta Murata
04:59 AM Revision 887a1bfb (git): [ruby/bigdecimal] Stop using GetVpValue in rb_big_convert_to_BigDecimal
https://github.com/ruby/bigdecimal/commit/034fd2b25e Kenta Murata
03:16 AM Revision fff1edf2 (git): fix Ractor.yield(obj, move: true)
Ractor.yield(obj, move: true) and
Ractor.select(..., yield_value: obj, move: true) tried to yield a
value with move semantices, but if the trial is faild, the obj
should not become a moved object.
To keep this rule, `wait_moving` wait s...
ko1 (Koichi Sasada)
03:16 AM Revision d0d6227a (git): alen should be actions number on ractor_select()
alen was number of rs, but it should be actions number
(taking ractors + receiving + yielding).
ko1 (Koichi Sasada)

01/21/2021

11:15 PM Revision fb33ec01 (git): [ruby/irb] Delete a doodle-level memo comment...
https://github.com/ruby/irb/commit/fc3e1d9e0c aycabta (aycabta .)
08:52 PM Misc #17565: Prefer use of access(2) in rb_file_load_ok() to check for existence of require'd files
> I wonder how to reconcile such a caching with the other problem of Docker (which is often that you don't get reliable filesystem events to clear a cache with)
Bootsnap doesn't rely on FS events.
> ...
In newer setup using Zeitwe...
byroot (Jean Boussier)
05:23 PM Misc #17565: Prefer use of access(2) in rb_file_load_ok() to check for existence of require'd files
> Which system was this measured on? Is this only a Docker thing?
Yes, recent macbook pros, couple of different configurations, all with SSDs; Docker with grpcfuse, the new driver they use for macOS and Windows sync to the "invisible" V...
leehambley (Lee Hambley)
11:13 AM Misc #17565: Prefer use of access(2) in rb_file_load_ok() to check for existence of require'd files
> open(2) with a mean cost of 130µsec per call, where a call to access(2) has a cost around 5× lower (something around 28µsec)
Which system was this measured on? Is this only a Docker thing?
Also was it 5x faster on missing files or on...
byroot (Jean Boussier)
07:48 PM Bug #17568 (Rejected): Thread.handle_interrupt is per-Thread but should probably be per-Fiber
`Thread.handle_interrupt` and the pending interrupts is currently kept as state on the thread (`rb_thread_t`).
However, that seems potentially confusing when `Fiber`s are used.
For instance, this innocent-looking `Fiber` will forever...
Eregon (Benoit Daloze)
07:19 PM Revision 32b7dcfb (git): Fix more assumptions about the read barrier
This is a continuation of 0130e17a410d60a10e7041ce98748b8de6946971. We
need to always use the read barrier
tenderlovemaking (Aaron Patterson)
06:22 PM Revision 871b4612 (git): [ruby/matrix] Replace "iff" with "whether" [doc]
iff means if and only if, but readers without that knowledge might
assume this to be a spelling mistake. To me, this seems like
exclusionary language that is unnecessary. Simply using "whether"
when describing return values should suffice.
gmcgibbon (Gannon McGibbon)
06:22 PM Revision e34f51fe (git): [ruby/matrix] Add `Matrix#rotate_entries` [#19]
Co-authored-by: Marc-André Lafortune <github@marc-andre.ca> felix.wolfsteller (Felix Wolfsteller)
05:55 PM Revision 0130e17a (git): Always enabled read barrier even on GC.compact
Some objects can survive the GC before compaction, but get collected in
the second compaction. This means we could have objects reference
T_MOVED during "free" in the second, compacting GC. If that is the
case, we need to invalidate th...
tenderlovemaking (Aaron Patterson)
05:49 PM Revision a3efbda7 (git): * 2021-01-22 [ci skip]
git[bot]
05:48 PM Revision 03d1850b (git): use ractor_wakeup()
Use ractor_wakeup() for same code. ko1 (Koichi Sasada)
03:35 PM Bug #17567 (Closed): backport Apple Silicon patch
jeremyevans0 (Jeremy Evans)
12:52 PM Bug #17567 (Closed): backport Apple Silicon patch
Please backport https://github.com/ruby/ruby/pull/3272 to the 2.6 branch. Filed here per https://github.com/ruby/ruby/pull/4102
Exact commit: https://github.com/ruby/ruby/commit/7cb8904a12c850ee30dcd67817fa2f9dc3fee813
dtrodrigues (Dustin Rodrigues)
11:50 AM Revision d961f14d (git): [ruby/net-http] RubyVM::MJIT is deprecated, prefer RubyVM::JIT now
https://github.com/ruby/net-http/commit/abc6ea1877 nobu (Nobuyoshi Nakada)
06:29 AM Revision 724c289b (git): [ruby/erb] Version 2.2.2
https://github.com/ruby/erb/commit/3d84ea83bc k0kubun (Takashi Kokubun)
06:26 AM Revision b12bd451 (git): [ruby/erb] Let ERB.version just return a version
and deprecate ERB::Revision.
`'$Date:: $'` has not been working since Git
migration from SVN. I'm sorry.
Because it has been already broken, I'd like to take this opportunity to
make `ERB.version` compatible w...
k0kubun (Takashi Kokubun)
06:02 AM Revision f766ba54 (git): Update NEWS.md about deprecation
k0kubun (Takashi Kokubun)
05:52 AM Revision e0d92d5e (git): [ruby/erb] Version 2.2.1
https://github.com/ruby/erb/commit/c8aa019c26 k0kubun (Takashi Kokubun)
05:45 AM Revision 3e8ca51b (git): Fix the relative path for Ruby core
k0kubun (Takashi Kokubun)
05:43 AM Revision 5f7df72b (git): [ruby/erb] Unify ERB version definitions
https://github.com/ruby/erb/commit/5df06b8473 k0kubun (Takashi Kokubun)
05:36 AM Revision 084662dc (git): [ruby/erb] Make styles consistent throught the project
https://github.com/ruby/erb/commit/c68c9470b0 k0kubun (Takashi Kokubun)
05:36 AM Revision c721998a (git): * 2021-01-21 [ci skip]
git[bot]
05:35 AM Revision 151e469a (git): Merge RubyGems 3.2.6 and Bundler 2.2.6 (#4103)
hsbt (Hiroshi SHIBATA)
04:52 AM Revision 922989fa (git): [ruby/erb] Warn safe_level and later args even without -w
because, when Ruby 3.1 is released, Ruby 2.5, the last version with the
old method signature, will have been EOL. Therefore we can safely warn
the old interface from Ruby 3.1.
https://github.com/ruby/erb/commit/c3a753f49f
k0kubun (Takashi Kokubun)
04:12 AM Revision 47b43807 (git): [ruby/erb] Make sure erb.rb in this repository is tested
https://github.com/ruby/erb/commit/012faba2e5 k0kubun (Takashi Kokubun)

01/20/2021

08:25 PM Feature #17566 (Open): Tune thread QoS / efficiency on macOS
Hi, new Apple M1 processors have "performance" and "efficiency" cores. Apple provides a QoS API so threads can tune which cores they should execute on. Some threads should be executed as high-priority, some should be treated as low-prior... mperham (Mike Perham)
08:12 PM Misc #17565: Prefer use of access(2) in rb_file_load_ok() to check for existence of require'd files
There is also `eaccess` conditionally defined depending on the platform, which does a suite more tests, probably that should be considered in preference to `access` directly, those checks are probably important in some environments. leehambley (Lee Hambley)
08:05 PM Misc #17565 (Open): Prefer use of access(2) in rb_file_load_ok() to check for existence of require'd files
When using Ruby in Docker (2.5 in our case, but the code is unchanged in 15 years across all versions) with a large $LOAD_PATH some millions of calls are made to `open(2)` with a mean cost of 130µsec per call, where a call to `access(2)`... leehambley (Lee Hambley)
06:50 PM Bug #17552 (Closed): [PATCH] Fix a NULL pointer crash in ObjectSpace.dump_all
This is fixed in 6ca3d1af3302f722aed530764d07c1cc83e95ecf tenderlovemaking (Aaron Patterson)
06:48 PM Revision 6ca3d1af (git): objspace_dump.c: Handle allocation path and line missing
byroot (Jean Boussier)
05:33 PM Revision 383685b5 (git): Explicit references to Enumerable
burdettelamar (Burdette Lamar)
04:03 PM Bug #17563 (Closed): FrozenError raised from Module#const_set when receiver is not frozen
Applied in changeset commit:git|565aeb81e0886c835888a425e5d05ed99fb03238.
----------
Skip freezing check on setting temporary class path [Bug #17563]
Co-authored-by: ryannevell (Ryan Nevell) <ryan.nevell@gmail.com>
nobu (Nobuyoshi Nakada)
04:03 PM Revision 709bed2a (git): * 2021-01-21 [ci skip]
git[bot]
04:03 PM Revision 3b631d0f (git): Support `i` command in log-fix
nobu (Nobuyoshi Nakada)
10:45 AM Bug #17429: Prohibit include/prepend in refinement modules
Having a Module subclass for Refinements seems nice and useful :+1: Eregon (Benoit Daloze)
07:43 AM Bug #17429: Prohibit include/prepend in refinement modules
Dan0042 (Daniel DeLorme) wrote in #note-12:
> shugo (Shugo Maeda) wrote in #note-11:
> ...
It's enough to changing the class of a module created by refine to the following subclass of Module, isn't it?
```ruby
class Refinement < Mo...
shugo (Shugo Maeda)
10:24 AM Revision 565aeb81 (git): Skip freezing check on setting temporary class path [Bug #17563]
Co-authored-by: ryannevell (Ryan Nevell) <ryan.nevell@gmail.com> nobu (Nobuyoshi Nakada)
09:10 AM Revision f4a556f4 (git): [ruby/irb] Remove pp-specific stub from TestColor
because it was for TestColorPrinter
https://github.com/ruby/irb/commit/7569206fd4
k0kubun (Takashi Kokubun)
09:07 AM Revision cea6814c (git): [ruby/irb] Undefine unused constants
https://github.com/ruby/irb/commit/eea9c16804 k0kubun (Takashi Kokubun)
09:03 AM Revision 328df007 (git): [ruby/irb] Split test files for IRB::Color and IRB::ColorPrinter
https://github.com/ruby/irb/commit/d95e8daab3 k0kubun (Takashi Kokubun)
08:46 AM Revision 10d12afa (git): [ruby/erb] Prefer __dir__ to reduce ../
https://github.com/ruby/erb/commit/cb59f11ec8 k0kubun (Takashi Kokubun)
08:21 AM Revision 718890aa (git): Pend erb command tests for Ruby 2.5 for now
k0kubun (Takashi Kokubun)
12:06 AM Bug #17564 (Assigned): Source command in irb exits after reading and evaluating the file
mame (Yusuke Endoh)
 

Also available in: Atom