Project

General

Profile

Activity

From 06/15/2023 to 06/21/2023

06/21/2023

11:59 PM Feature #19742: Introduce `Module#anonymous?`
Anyone can do the following:
```ruby
my_module = Module.new do
def self.name
"Hello World"
end
end
```
Is that module anonymous or not?
ioquatix (Samuel Williams)
11:30 PM Feature #19742: Introduce `Module#anonymous?`
Let me add for context that Active Support has had `Module#anonymous?` for many years, I wrote it myself ([commit](https://github.com/rails/rails/commit/b8bb54af7ff6652327d99f6a7cf5c96a3f3f876d)) when anonymous modules had an empty strin... fxn (Xavier Noria)
11:26 PM Feature #19742: Introduce `Module#anonymous?`
The documentation for `Module#name` says:
> Returns the name of the module mod. Returns nil for anonymous modules.
So, _if_ the module is anonymous, _then_ the name is `nil`. Logically, that does not rule out as a possibility that ...
fxn (Xavier Noria)
11:10 PM Feature #19742: Introduce `Module#anonymous?`
I'll add my observation that Marshal states it cannot handle anonymous modules, but I say, it cannot handle ANY non-permanent (temporary) modules (assuming `permanent?` as defined above). The difference is subtle but demonstrated by this... ioquatix (Samuel Williams)
10:53 PM Feature #19742: Introduce `Module#anonymous?`
Just because `name == nil` implies it's anonymous, does not mean that anonymous implies that `name == nil`. In fact, we don't have any `anonymous?` implementation yet to define this behaviour. I don't know if the documentation clarifies ... ioquatix (Samuel Williams)
10:42 PM Feature #19742: Introduce `Module#anonymous?`
I thought "permanent" was mostly internal jargon, where is in the documentation mentioned?
In the public API you have that a `nil` name means the module is anonymous. If the name is not `nil`, the module is not anonymous (and that, by...
fxn (Xavier Noria)
10:33 PM Feature #19742: Introduce `Module#anonymous?`
The concepts are discussed in the code, but they shouldn't be assumed as canonical, IMHO.
```c
/**
* Returns +classpath+ of _klass_, if it is named, or +nil+ for
* anonymous +class+/+module+. A named +classpath+ may contain
* a...
ioquatix (Samuel Williams)
10:15 PM Feature #19742: Introduce `Module#anonymous?`
Let me clarify the vocabulary as I see it:
An _anonymous_ module has `nil` as name: `anonymous?` makes sense.
```ruby
Module.new.name # => nil
```
A module may have a _temporary_ name if it was never assigned to a constant that belong...
fxn (Xavier Noria)
09:54 PM Feature #19742: Introduce `Module#anonymous?`
Permanent is already a word used in the Ruby documentation and implementation. I agree it might not be clear, but it's already established when talking about "class paths" and names. if we introduce a new word/taxonomy, we should have a ... ioquatix (Samuel Williams)
08:12 PM Feature #19742: Introduce `Module#anonymous?`
`#permanent?` is not very descriptive IMO. If I hadn't seen the code above, or the C code with that vocabulary, I would have a hard time guessing what its about. I'd probably guess it has to do with GC or so.
As seen in Xavier Noria's...
janosch-x (Janosch Müller)
11:20 AM Feature #19742: Introduce `Module#anonymous?`
There is another formulation of the opposite of "anonymous" which could be the following:
```ruby
class Module
def permanent?
Object.const_get(self.name).equal?(self)
end
end
```
This would be true if the object is reachable by...
ioquatix (Samuel Williams)
11:07 AM Feature #19742: Introduce `Module#anonymous?`
❤️ for `anonymous?`.
Regarding the broader topic, the fundamental thing to discuss is whether permanent class names and constants should have any more coupling after initial constant assignment (when the name becomes permanent). Because...
fxn (Xavier Noria)
10:47 AM Feature #19742 (Open): Introduce `Module#anonymous?`
As a follow-on <from https://bugs.ruby-lang.org/issues/19521>, I'd like propose we introduce `Module#anonymous?`.
In some situations, like logging/formatting, serialisation/deserialization, debugging or meta-programming, we might like...
ioquatix (Samuel Williams)
10:05 PM Revision 010b8a29 (git): [ruby/yarp] Set default external encoding for parse tests
https://github.com/ruby/yarp/commit/e757fde3ed kddnewton (Kevin Newton)
09:31 PM Revision 2beb1450 (git): Handle non-enum values to fix -Wreturn-type
http://ci.rvm.jp/results/trunk-random1@ruby-sp2-docker/4612360 k0kubun (Takashi Kokubun)
09:28 PM Revision 39a40af1 (git): [ruby/yarp] Truly fix snapshot testing on Ruby CI
https://github.com/ruby/yarp/commit/c4e835711e kddnewton (Kevin Newton)
09:23 PM Revision 51ff9cd7 (git): [ruby/yarp] Actually fix snapshot tests
https://github.com/ruby/yarp/commit/ba9e5b447e kddnewton (Kevin Newton)
08:56 PM Revision 06ed9fcd (git): Stop asking YJIT team to review dependabot changes
k0kubun (Takashi Kokubun)
08:51 PM Revision 2acb27ca (git): Fix -Wold-style-definition
http://ci.rvm.jp/results/trunk-yjit@ruby-sp2-docker/4612329
Also, I changed the position of `{` to be consistent with the rest of
the codebase.
k0kubun (Takashi Kokubun)
08:30 PM Revision 23e1c697 (git): [ruby/yarp] Fix snapshot checking
https://github.com/ruby/yarp/commit/05a60a0774 kddnewton (Kevin Newton)
08:02 PM Revision 4be594a5 (git): Don't report neutral results of Cirrus CI
k0kubun (Takashi Kokubun)
07:55 PM Revision 585dbccb (git): [ruby/yarp] Use binary for normalizing printed ASTs
https://github.com/ruby/yarp/commit/814326de34 kddnewton (Kevin Newton)
07:12 PM Bug #19743 (Closed): Ruby's parser seems to ignoring DOT at the end of file just after digits
I expect all to be syntax error
~~~ruby
eval "puts 1." #=> 1
eval "puts 1. " #=> syntax error
eval "puts 1.\n" #=> syntax error
~~~
For ripper, period token is missing
~~~ruby
Ripper.tokenize("1.") #=> ["1"]
Ripper.tokenize("1...
tompng (tomoya ishida)
06:40 PM Revision b0a3a6ad (git): [ruby/yarp] Fix invalid unescape sequence error for lower w
https://github.com/ruby/yarp/commit/5a2c78367a jemmai (Jemma Issroff)
06:35 PM Revision fcf2f5a5 (git): Let yarp use main branch instead
k0kubun (Takashi Kokubun)
06:25 PM Feature #19741 (Closed): Mirror YARP to Ruby
Applied in changeset commit:git|03f1a6c4c57c469e8fb5858cf9676b6479f4610d.
----------
[Feature #19741] Add yarp to `tool/sync_default_gems.rb` sync script
The default gems sync script now includes YARP, found in the
ruby/yarp repo. This...
jemmai (Jemma Issroff)
12:25 AM Feature #19741 (Closed): Mirror YARP to Ruby
At the [May Ruby Kaigi Dev Meeting](https://github.com/ruby/dev-meeting-log/blob/master/2023/DevMeeting-2023-05-10.md#kevin-newton--jemma-issroff), Matz approved mirroring YARP into ruby/ruby. @jemmai and I are creating this redmine issu... kddnewton (Kevin Newton)
06:25 PM Revision cc7f765f (git): [Feature #19741] Sync all files in yarp
This commit is the initial sync of all files from ruby/yarp
into ruby/ruby. Notably, it does the following:
* Sync all ruby/yarp/lib/ files to ruby/ruby/lib/yarp
* Sync all ruby/yarp/src/ files to ruby/ruby/yarp/
* Sync all ruby/yarp/te...
jemmai (Jemma Issroff)
06:25 PM Revision 08478fef (git): [Feature #19741] Added Init_YARP() to load from the yarp C extension
Init_YARP is called from inits.c, and it loads the YARP C extension
correctly
jemmai (Jemma Issroff)
06:25 PM Revision d53e1f42 (git): [Feature #19741] Add yarp to builds
Add yarp to common.mk and windows builds to enable us to run yarp
correctly with CI.
jemmai (Jemma Issroff)
06:25 PM Revision 03f1a6c4 (git): [Feature #19741] Add yarp to `tool/sync_default_gems.rb` sync script
The default gems sync script now includes YARP, found in the
ruby/yarp repo. This script primarily syncs over the src, test, lib
directories. It also migrates all encoding files to be prefixed
with `yp_` in order to deconflict from exist...
jemmai (Jemma Issroff)
05:26 PM Bug #19569: #map on Enumerator::Lazy block arguments seem to differ from regular #map
This is because Enumerator::Lazy#zip marks the enumerator as packed when it shouldn't (introduced with the optimization in commit:54acb3dd52a5fe75c32c3e36a6984d3ec4314a72). I've submitted a pull request to fix this: https://github.com/r... jeremyevans0 (Jeremy Evans)
03:52 PM Bug #19726: Script loaded twice when requiring self
A similar case that I have found surprising is if e.g. I use a file for a quick test called like a stdlib, say `openssl.rb`, then `require 'openssl'` in that file would not require the stdlib but load the main script a second time, if `-... Eregon (Benoit Daloze)
03:44 PM Bug #19726: Script loaded twice when requiring self
Making this change would not be backwards compatible:
```ruby
# a.rb
if __FILE__ == $0
# $LOADED_FEATURES << File.expand_path(__FILE__) # would break things
require './b'
else
def a
1
end
end
# b.rb
require '....
jeremyevans0 (Jeremy Evans)
03:49 PM Feature #19315: Lazy substrings in CRuby
Dan0042 (Daniel DeLorme) wrote in #note-13:
> I realize that `RSTRING_PTR` is used everywhere, but would it be in the realm of possibility to deprecate it and replace it by something like `RSTRING_CSTR` and `RSTRING_START`.
I think t...
Eregon (Benoit Daloze)
12:45 PM Feature #19315: Lazy substrings in CRuby
duerst (Martin Dürst) wrote in #note-12:
> Pat Shaughnessy in his blog describes exactly the same thing as Benoit Daloze above: Ruby shares string data as long as the ends of the strings align.
On first skimming the blog I actually didn...
Dan0042 (Daniel DeLorme)
03:46 PM Bug #19731 (Closed): Can’t call an instance method inside an Endless method definition
jeremyevans0 (Jeremy Evans)
02:13 PM Bug #19246: Rebuilding the loaded feature index much slower in Ruby 3.1
Could this get backported to 3.1 & 3.2?
See:
https://github.com/ruby/ruby/pull/7699
https://github.com/ruby/ruby/commit/61b974629e3571
MSP-Greg (Greg L)
12:43 PM Feature #19521: Support for `Module#name=` and `Class#name=`.
Given that we have `const_set`, the name for this feature should be `temporary_name_set`, not `set_temporary_name`. Don't you think so? sawa (Tsuyoshi Sawada)
07:52 AM Feature #19521 (Closed): Support for `Module#name=` and `Class#name=`.
Thanks everyone for your input.
To start with, we adopted the limitation of only allowing non-constant names.
I think this is a reasonable limitation but it prevents some usage for existing cases.
If it becomes a problem, we can...
ioquatix (Samuel Williams)
09:09 AM Bug #19739: String coderange not cleared by String#slice!
The commit to backport would be: https://github.com/Shopify/ruby/commit/3b351ee62d4206bb72301c2e98dcb173f1e35be7 byroot (Jean Boussier)
08:36 AM Bug #19739 (Closed): String coderange not cleared by String#slice!
hsbt (Hiroshi SHIBATA)
08:16 AM Bug #19739: String coderange not cleared by String#slice!
@byroot `ruby_3_1` is handled by @usa now. hsbt (Hiroshi SHIBATA)
08:12 AM Bug #19739: String coderange not cleared by String#slice!
cc @nagachika is a PR targeting `ruby_3_1` OK? Or should I submit the patch differently? byroot (Jean Boussier)
08:09 AM Bug #19739: String coderange not cleared by String#slice!
OK fix is here: https://github.com/ruby/ruby/pull/7965 byroot (Jean Boussier)
07:58 AM Bug #19739: String coderange not cleared by String#slice!
Ok, so after bisecting it appears that what fixed it was: https://github.com/ruby/ruby/commit/b0b9f7201acab05c2a3ad92c3043a1f01df3e17f
This won't be easy to backport though, as it was a performance patch. Especially since it had to be...
byroot (Jean Boussier)
07:53 AM Feature #19717: `ConditionVariable#signal` is not fair when the wakeup is consistently spurious.
I like this idea. ioquatix (Samuel Williams)
07:49 AM Revision a87bce86 (git): Allow setting the name of a class or module. (#7483)
Introduce `Module#set_temporary_name` for setting identifiers for otherwise
anonymous modules/classes.
Samuel Williams

06/20/2023

05:09 PM Misc #19599: DevMeeting-2023-05-10 @ Matsumoto, Japan
> Is a log going to be posted?
I've just posted it at https://github.com/ruby/dev-meeting-log/blob/master/2023/DevMeeting-2023-05-10.md.
k0kubun (Takashi Kokubun)
03:13 PM Revision e25403d0 (git): [ruby/irb] Improve indentation: bugfix, heredoc, embdoc, strings
(https://github.com/ruby/irb/pull/515)
* Implement heredoc embdoc and string indentation with bugfix
* Fix test_ruby_lex's indentation value
* Add embdoc indent test
* Add workaround for lines==[nil] passed to auto_indent when exit I...
tompng (tomoya ishida)
03:06 PM Bug #19739: String coderange not cleared by String#slice!
I suspect https://github.com/ruby/ruby/pull/5867 is what fixed it, but don't have time to confirm just yet. byroot (Jean Boussier)
02:55 PM Bug #19739: String coderange not cleared by String#slice!
That is very interesting.
The two strings are identical (aside from one being frozen):
```ruby
require "objspace"
hash = {}
key = "ABC OÜ"
p key.hash
key.slice!(/ oü$/i)
p key.hash
puts ObjectSpace.dump(key)
hash[key] ...
byroot (Jean Boussier)
02:07 PM Bug #19739 (Closed): String coderange not cleared by String#slice!
Hello,
Key cannot be found in a Hash when slice! method is applied to the key. I cannot reproduce this behaviour with sub! or gsub! methods:
``` ruby
hash = {}
key = "ABC OÜ"
key.slice!(/ oü$/i)
# key.sub!(/ oü$/i, '')
# key.gs...
ilya.andreyuk (Ilya Andreyuk)
02:19 PM Misc #19740 (Closed): Block taking methods can't differentiate between a non-local return and a throw
Opening this as Misc, as at this stage I don't have a fully formed feature request.
Ref: https://github.com/ruby/ruby/commit/1a3bcf103c582b20e9ea70dfed0ee68b24243f55
Ref: https://github.com/ruby/timeout/pull/30
Ref: https://github....
byroot (Jean Boussier)
02:02 PM Revision 9ce6e096 (git): [ruby/reline] Omit constant under Struct
(https://github.com/ruby/reline/pull/554)
https://github.com/ruby/reline/commit/8761a11fa5
Yuta Kusuno
01:28 PM Revision 932dd9f1 (git): [DOC] Regexp doc (#7923)
burdettelamar (Burdette Lamar)
12:24 PM Bug #19736 (Closed): Ripper.tokenize ignores token after heredoc_beg when embexpr inside heredoc is unclosed
Applied in changeset commit:git|6be402e172a537000de58a28af389cb55dd62ec8.
----------
[Bug #19736] Recover after unterminated interpolation
nobu (Nobuyoshi Nakada)
11:10 AM Revision 6be402e1 (git): [Bug #19736] Recover after unterminated interpolation
nobu (Nobuyoshi Nakada)
11:09 AM Revision 49b83b73 (git): Adjust indent [ci skip]
nobu (Nobuyoshi Nakada)
05:02 AM Revision 9ac070d0 (git): Copy instance variables to regexp from marshaled data
`rb_ivar_foreach` disallows `ST_DELETE`. nobu (Nobuyoshi Nakada)
04:57 AM Revision 2dfbe91c (git): Stop `rb_ivar_foreach` when callback returned `ST_STOP`
nobu (Nobuyoshi Nakada)
04:35 AM Revision 1edbaa85 (git): Merge rubygems/rubygems HEAD
Pick from https://github.com/rubygems/rubygems/commit/880dd95996c93adc1e032399816931b243c5fe17 hsbt (Hiroshi SHIBATA)
04:34 AM Revision 44ad176f (git): Update Racc entries on documents
hsbt (Hiroshi SHIBATA)
02:29 AM Bug #19738: `ObjectSpace.each_object.to_a` crashes in `make runirb`.
In order to get the assertion failure, you must compile with RUBY_DEBUG=1:
```
./configure -C --disable-install-doc --prefix=/Users/samuel/.rubies/ruby-head cppflags=-DRUBY_DEBUG=1
```
ioquatix (Samuel Williams)
02:22 AM Bug #19738 (Closed): `ObjectSpace.each_object.to_a` crashes in `make runirb`.
```
> make runirb
RUBY_ON_BUG='gdb -x ./.gdbinit -p' ./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems -r irb -e 'IRB.start("make runirb")'
irb(main):001:0> ObjectSpace.each_object.to_a
Assert...
ioquatix (Samuel Williams)
01:48 AM Revision 504f37af (git): more fix
U.Nakamura
01:32 AM Revision 48b00c4d (git): Fix previous commit
U.Nakamura
12:49 AM Feature #19737: Add `IO::Buffer#cat` for concat `IO::Buffer` instances
My use case is this: concat given two buffers, then modify (copy, slice, xor) it.
(More concretely, I want to apply/remove header protection in the QUIC protocol.)
I understood that using copy method is a better way than concat buffe...
unasuke (Yusuke Nakamura)

06/19/2023

11:08 PM Feature #19737: Add `IO::Buffer#cat` for concat `IO::Buffer` instances
Thanks for working on this.
So, in short, I'm against the name (even if it is cute), but I'm okay with considering the functionality.
I'd like to know more the use case.
We shouldn't encourage users to create lots of temporary b...
ioquatix (Samuel Williams)
07:48 PM Feature #19737: Add `IO::Buffer#cat` for concat `IO::Buffer` instances
Could you include your actual concrete use case?
See https://github.com/ruby/ruby/wiki/How-To-Request-Features
Regarding naming, `cat` or `concat` feels wrong, `+` seems a much better match for the proposed semantics (no mutation).
...
Eregon (Benoit Daloze)
04:30 PM Feature #19737: Add `IO::Buffer#cat` for concat `IO::Buffer` instances
Opend here <https://github.com/ruby/ruby/pull/7960> unasuke (Yusuke Nakamura)
04:29 PM Feature #19737 (Rejected): Add `IO::Buffer#cat` for concat `IO::Buffer` instances
## motivation
In my use case, I want to concat two IO::Buffer instances. But current implementation doesn't have that way.
Then I created a patch. Opend here: TBD
## concern
I have two concerns about it.
### 1. Should we provide...
unasuke (Yusuke Nakamura)
07:26 PM Feature #19521: Support for `Module#name=` and `Class#name=`.
Dan0042 (Daniel DeLorme) wrote in #note-32:
> Ah interesting, I didn't realize it was already used that way. Since the ruby main repo already demonstrates how to "lie" about the class name in a sensible and useful way, I believe this is...
Eregon (Benoit Daloze)
05:46 PM Feature #19521: Support for `Module#name=` and `Class#name=`.
> However, this will prevent `labeled_class`/`labeled_module` from using `set_temporary_name`, at least until those labels are updated to be "not a constant name" or we remove this restriction. When I did this change, ~35 tests failed. I... Dan0042 (Daniel DeLorme)
04:03 PM Feature #19521: Support for `Module#name=` and `Class#name=`.
I am okay with restricting names to be not-constant-names, e.g.
```c
if (rb_is_const_name(name)) {
rb_raise(rb_eArgError, "name must not be valid constant name");
}
```
However, this will prevent `la...
ioquatix (Samuel Williams)
03:34 PM Feature #19521: Support for `Module#name=` and `Class#name=`.
ioquatix (Samuel Williams) wrote in #note-25:
> And in any case, your example is already trivially possible without this PR/change:
> ...
There is a big difference with what's possible today and what would be possible after this change...
ufuk (Ufuk Kayserilioglu)
01:39 PM Feature #19521: Support for `Module#name=` and `Class#name=`.
@ioquatix, how would you feel about raising an error if the temporary name is a valid constant name? Dan0042 (Daniel DeLorme)
01:16 PM Feature #19521: Support for `Module#name=` and `Class#name=`.
ioquatix (Samuel Williams) wrote in #note-25:
> @Eregon I understand your point, but why would anyone do that? Isn't that kind of shooting yourself in the foot?
Well, even the docs and specs you added in that PR do that, it's inviting p...
Eregon (Benoit Daloze)
07:19 PM Revision 9ff4399d (git): CI: work around vcpkg openssl issue with OpenSSL providers
Currently, the openssl package from vcpkg uses an incorrect, hard-coded
default location for OpenSSL providers under C:\vcpkg\packages, which
is supposed to be a temporary directory.
Override it with the OPENSSL_MODULES environment vari...
rhenium (Kazuki Yamaguchi)
06:16 PM Revision 179f0e53 (git): [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.78 to 0.9.79.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.78...v0.9.79)
---
updated-depende...
dependabot[bot]
05:24 PM Revision 11ee4f2b (git): [rubygems/rubygems] Suppress Content-Type warnings
https://github.com/rubygems/rubygems/commit/97dbe4cabd nobu (Nobuyoshi Nakada)
03:29 PM Revision 512cac32 (git): Remove taint and untrusted flags (#7958)
* Make TAINT and UNTRUSTED flags zero
These flags do nothing already, and should break nothing.
* Remove TAINT and UNTRUSTED macros same as functions
These macros had been defined to use with `#ifdef`, but should not be
used anymore.
nobu (Nobuyoshi Nakada)
11:49 AM Revision 6302bf2e (git): merge revision(s) d2520b7b76759118071a16e6bca22726a5de9fb4: [Backport #19439]
Marshal.load: restore instance variables on Regexp
[Bug #19439]
The instance variables were restore on the Regexp source,
not the regexp itself.
Unfortunately we have a bit of a chicken and egg problem....
U.Nakamura
11:28 AM Bug #19323: Integer overflow in `Integer#<<`
backported into `ruby_3_1` at 344249674f7a7835445a44695664897fa4b83f00 usa (Usaku NAKAMURA)
11:21 AM Revision 34424967 (git): merge revision(s) 1cdf8ab07b24ebd16e93621957196e8b1d67f2ba: [Backport #19323]
[Bug #19323] Raise `RangeError` instead of integer overflow
---
bignum.c | 5 ++++-
test/ruby/test_integer.rb | 18 ++++++++----------
2 files changed, 12 insertions(+), 11 deletions(-)
U.Nakamura
10:38 AM Revision b8cd79c8 (git): [ruby/irb] Add missing token that ignored by ripper
(https://github.com/ruby/irb/pull/608)
https://github.com/ruby/irb/commit/1cd3b45402
tompng (tomoya ishida)
10:27 AM Bug #19736 (Closed): Ripper.tokenize ignores token after heredoc_beg when embexpr inside heredoc is unclosed
I expect Ripper.tokenize(code) to tokenize `+1+2+3\n` part.
```ruby
code = <<'RUBY'
<<A+1+2+3
#{4
RUBY
Ripper.tokenize code
# => ["<<A", "\#{", "4", "\n"]
```
It will be easy for IRB's internal code to handle indent and othe...
tompng (tomoya ishida)
09:28 AM Revision 2a80bac9 (git): Remove `--jobserver-auth` option which varies for each run
nobu (Nobuyoshi Nakada)
08:45 AM Revision e9f62fa5 (git): [ruby/openssl] add OpenSSL Provider support
https://github.com/ruby/openssl/commit/189c167e40
[rhe: tool/update-deps --fix to update ext/openssl/depend]
qwyng (Hiroaki Osawa)
02:24 AM Revision e7440dca (git): [rubygems/rubygems] RemoteFetcher tests don't work with path including `+`
https://github.com/rubygems/rubygems/commit/657d57621e nobu (Nobuyoshi Nakada)
02:24 AM Revision 10e4a9a5 (git): [rubygems/rubygems] Escape regexp metachacters or use `assert_include`
https://github.com/rubygems/rubygems/commit/6d445a85d7 nobu (Nobuyoshi Nakada)

06/18/2023

11:37 PM Feature #19521: Support for `Module#name=` and `Class#name=`.
My understanding is, because it's not strictly an assignment, it shouldn't look like that of the user. Also, it's more convenient to use:
```ruby
my_class = Class.new do
set_temporary_name "my_class"
end
```
Using `name=` or ...
ioquatix (Samuel Williams)
03:01 PM Feature #19521: Support for `Module#name=` and `Class#name=`.
Aside from the feature itself, I must say I'm very surprised by the `set_` prefix of that method, it's quite rare in Ruby. byroot (Jean Boussier)
02:03 PM Feature #19521: Support for `Module#name=` and `Class#name=`.
@Eregon I understand your point, but why would anyone do that? Isn't that kind of shooting yourself in the foot?
And in any case, your example is already trivially possible without this PR/change:
```
c = Class.new
String = c
c....
ioquatix (Samuel Williams)
12:45 PM Feature #19521: Support for `Module#name=` and `Class#name=`.
@matz Are you really OK with things like:
```ruby
c = Class.new
c.set_temporary_name "String"
c.new.foo # => undefined method 'foo' for #<String:0x00007efc38711fc0> (NoMethodError)
c = Class.new
c.set_temporary_name "Object"
c.n...
Eregon (Benoit Daloze)
12:10 PM Feature #19521: Support for `Module#name=` and `Class#name=`.
Accepted. Thank you.
Matz.
matz (Yukihiro Matsumoto)
04:57 PM Revision af66b9b7 (git): [ruby/openssl] pkey: use unsigned type for bit fields
clang generates a warning:
../../../../ext/openssl/ossl_pkey.c:326:22: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
...
rhenium (Kazuki Yamaguchi)
04:57 PM Revision 397ebbc6 (git): [ruby/openssl] Drop support for Ruby 2.6
Ruby 2.6 has reached EOL on 2022-03. Requiring Ruby 2.7 allows us to
use C99 syntax.
https://github.com/ruby/openssl/commit/f6ba75e51e
rhenium (Kazuki Yamaguchi)
04:57 PM Revision bc0539a9 (git): [ruby/openssl] Fix modular square root test with LibreSSL >= 3.8
If x is a modular square root of a (mod p) then so is (p - x). Both
answers are valid. In particular, both 2 and 3 are valid square roots
of 4 (mod 5). Do not assume that a particular square root is chosen by
the algorithm. Indeed, the a...
Theo Buehler
04:57 PM Revision 1d0a087d (git): [ruby/openssl] extconf.rb: apply RUBY_OPENSSL_EXT{C,LD}FLAGS after checking features
RUBY_OPENSSL_EXTCFLAGS and RUBY_OPENSSL_EXTLDFLAGS have been added for
the primary purpose of appending custom warning flags during
development and CI.
Since checking programs generated by mkmf may not be completely
warning-free, we don...
rhenium (Kazuki Yamaguchi)
04:57 PM Revision 366d8005 (git): [ruby/openssl] CI: Add the test/openssl/test_pkey.rb on the FIPS mode case.
It's to test the `OpenSSL::PKey.read` in the `test/openssl/test_pkey.rb`.
I added the pending status to the following tests failing on the FIPS mode
case in the `test/openssl/test_pkey.rb`.
* `test_ed25519`
* `test_x25519`
* `test_comp...
Jun Aruga
04:57 PM Revision 920bc712 (git): [ruby/openssl] Drop a common logic disabling the FIPS mode in the tests.
We want to run the unit tests in the FIPS mode too.
https://github.com/ruby/openssl/commit/ab92baff34
Jun Aruga
04:57 PM Revision 2a483405 (git): [ruby/openssl] Workaround: Fix OpenSSL::PKey.read that cannot parse PKey in the FIPS mode.
This commit is a workaround to avoid the error below that the
`OpenSSL::PKey.read` fails with the OpenSSL 3.0 FIPS mode.
```
$ openssl genrsa -out key.pem 4096
$ ruby -e "require 'openssl'; OpenSSL::PKey.read(File.read('key.pem'))"
-e:...
Jun Aruga
04:57 PM Revision 1965c09e (git): [ruby/openssl] Implement Write Barrier for all OpenSSL types
The vast majority have no reference so it's just a matter of setting the flags.
For the couple exception, they have very little references so it's
easy.
https://github.com/ruby/openssl/commit/2c7c6de69e
byroot (Jean Boussier)
04:57 PM Revision 0a84bd6b (git): [ruby/openssl] Append flags from environment variables.
According to the `mkmf.rb#init_mkmf`, there are command line options below.
* `--with-cflags` to set the `cflags`
* `--with-ldflags` to set the `ldflags`
For example the following command compiles with the specified flags. Note that
`M...
Jun Aruga
02:51 PM Bug #18686 (Closed): Regexp supporting unexpected age properties in Ruby < 3.2
jeremyevans0 (Jeremy Evans)
12:38 PM Bug #18686: Regexp supporting unexpected age properties in Ruby < 3.2
this no longer occurs in ruby 3.2 or 3.3 so IMO this bug can be closed @duerst @jeremyevans0
```ruby
RUBY_DESCRIPTION
# => "ruby 3.3.0preview1 (2023-05-12 master a1b01e7701) [arm64-darwin22]"
[*0..1000].product([*0..100]).each_wi...
janosch-x (Janosch Müller)
09:07 AM Feature #19734 (Rejected): Let `Dir` methods be available to `File`
I am negative for several reasons.
* IO (File) and Dir have different role and implementation in Unix, which Ruby design based on
* In Ruby, we cannot have multiple class parents, case for your proposal, File's super class must be ei...
matz (Yukihiro Matsumoto)
06:55 AM Bug #19701: The rb_classext_t::classpath field is not marked for T_ICLASS
jeremyevans0 (Jeremy Evans) wrote in #note-2:
> There is a third option, set "FrozenCore" as an fstring that doesn't get garbage collected (via `rb_gc_register_address` or something). That reduces the cost to 1 object marking per major...
wks (Kunshan Wang)
05:39 AM Revision 1740482d (git): Fix rb_compile_option_t comments [ci skip]
yui-knk (Kaneko Yuichiro)
02:15 AM Revision 7adab819 (git): Fix the format of NODE_EVSTR rendered by dump_node
yui-knk (Kaneko Yuichiro)
01:10 AM Revision 4f79c83a (git): Remove coverage_enabled from parser_params
`yyparse` never changes the value of `coverage_enabled`.
`coverage_enabled` depends on only return value of `e_option_supplied`.
Therefore `parser_params` doesn't need to have `coverage_enabled.
yui-knk (Kaneko Yuichiro)

06/17/2023

05:18 PM Feature #19735: Add support for UUID version 7
I edited the description: the draft RFC URL previously pointed to the 6th revision of draft-ietf-uuidrev-rfc4122bis (https://www.ietf.org/archive/id/draft-ietf-uuidrev-rfc4122bis-06.html). But the 7th revision has already been posted. ... nevans (Nicholas Evans)
05:11 PM Feature #19735 (Closed): Add support for UUID version 7
Although the specification for UUIDv7 is still in draft, the UUIDv7 algorithm has been stable as the RFC progresses to completion.
Version 7 UUIDs can be very useful, because they are lexographically sortable, which can improve e.g: d...
nevans (Nicholas Evans)
02:53 PM Feature #19734 (Rejected): Let `Dir` methods be available to `File`
I propose to let `Dir` singleton methods be available to `File` in some way. Motivations are as follows.
When we want to do something with a file (for example `File.read` or `File.write`), we quite often want to achieve the home direc...
sawa (Tsuyoshi Sawada)
01:02 PM Revision d444f1b1 (git): Specify int bitfield as signed int bitfield
sunc treats int bitfield as unsigned int.
This commit will fix build failure on sunc.
* http://rubyci.s3.amazonaws.com/solaris10-sunc/ruby-master/log/20230617T100003Z.fail.html.gz
* http://rubyci.s3.amazonaws.com/solaris11-sunc/ruby-mas...
yui-knk (Kaneko Yuichiro)
07:41 AM Revision 19c62b40 (git): Replace parser & node compile_option from Hash to bit field
This commit reduces dependency to CRuby object. yui-knk (Kaneko Yuichiro)
06:59 AM Revision e5ae7a16 (git): Update bundled gems list at 2023-06-17
git[bot]
06:48 AM Bug #19732 (Closed): Possible missing header (stdint.h) in event.h
Applied in changeset commit:git|b943e9c7b9d9cc8ba4bbf043414ab1ed4e1a8b5f.
----------
Fixes [Bug #19732]. Add missing stdint.h header to event.h.
itarato (Peter Arato)
06:48 AM Revision b943e9c7 (git): Fixes [Bug #19732]. Add missing stdint.h header to event.h.
itarato (Peter Arato)
04:24 AM Revision ba0bcc52 (git): Use ruby functions if `RUBY` is defined
nobu (Nobuyoshi Nakada)
04:24 AM Revision 9001d547 (git): Expand `#ifdef RUBY` region
Include the functions which are only used for
`rb_hash_bulk_insert_into_st_table`.
nobu (Nobuyoshi Nakada)
03:32 AM Revision 725739d6 (git): Remove no longer used variable
nobu (Nobuyoshi Nakada)
03:29 AM Revision 7b3a531f (git): Split the bmethod proc test to avoid redefinition
nobu (Nobuyoshi Nakada)
02:26 AM Feature #19521: Support for `Module#name=` and `Class#name=`.
I've updated the PR with documentation and tests: https://github.com/ruby/ruby/pull/7483 ioquatix (Samuel Williams)
12:53 AM Feature #19521: Support for `Module#name=` and `Class#name=`.
Based on the discussion with Matz, here is the updated proposal:
```ruby
c = Class.new
# => #<Class:0x00000001031b99d8>
c.set_temporary_name("Hello")
# => Hello
C = c
# => C
C.set_temporary_name("Hello")
# `set_temporary_name': can't c...
ioquatix (Samuel Williams)

06/16/2023

01:32 PM Revision 1ff20944 (git): Copy `nonempty_memcpy` without ruby implementation
nobu (Nobuyoshi Nakada)
01:32 PM Revision 60cf48ca (git): Suppress redefined macro warnings
nobu (Nobuyoshi Nakada)
12:55 PM Bug #19732: Possible missing header (stdint.h) in event.h
Thanks for pointing that out. Updated the PR (https://github.com/ruby/ruby/pull/7945) with those adjustments. itarato (Peter Arato)
04:43 AM Bug #19732: Possible missing header (stdint.h) in event.h
Sorry, I got wrongly if it were about to add it to debug.h.
The file is correct, but just the `include` should be after the other `include`s with `HAVE_STDINT_H` check.
nobu (Nobuyoshi Nakada)
04:24 AM Bug #19732 (Open): Possible missing header (stdint.h) in event.h
Although I don't think it is a big issue as we don't assume or guarantee all our headers can be usable individually, welcome the improvement.
It seems ruby/internal/event.h is which really needs `uint32_t`.
```shell-session
$ clan...
nobu (Nobuyoshi Nakada)
08:54 AM Revision 80dfe2bc (git): [ruby/rdoc] Fix missing closing colon for `:notnew:`
https://github.com/ruby/rdoc/commit/1e550b7d02 zzak (zzak _)
04:10 AM Revision 5bc1b56c (git): [rubygems/rubygems] Auto-correct Performance/FlatMap
https://github.com/rubygems/rubygems/commit/b696edcd73 hsbt (Hiroshi SHIBATA)
12:27 AM Bug #15428: Refactor Proc#>> and #<<
Maybe it was already obvious to everyone, but I feel that something important has not been mentioned in this discussion: `(a >> b).call(x)` is equivalent to `b.call(a.call(x))` but **neither a nor b needs to be a Proc**. Either could be ... Dan0042 (Daniel DeLorme)

06/15/2023

08:24 PM Bug #19732: Possible missing header (stdint.h) in event.h
While preparing that diff I realized what happened. I'm using `clang-format` which sorts includes and ordered https://github.com/banister/debug_inspector/blob/5424c4094df30adfecd961a4e77d95f1fea9bc48/ext/debug_inspector/debug_inspector.c... itarato (Peter Arato)
06:37 AM Bug #19732 (Feedback): Possible missing header (stdint.h) in event.h
Could you share the code to reproduce?
Is it https://github.com/banister/debug_inspector/tree/master/ext/debug_inspector/debug_inspector.c?
nobu (Nobuyoshi Nakada)
05:38 PM Revision 598ad56a (git): * 2023-06-15 [ci skip]
git[bot]
05:38 PM Revision 78d118dc (git): Fix test-bundled-gems for Ruby 3.0 (#7936)
* pry is not needed for test-bundled-gems
* Run test-unit test without rake task to avoid yard dependency
* Use power_assert-1.2.1 to avoid pry dependency
hsbt (Hiroshi SHIBATA)
05:36 PM Revision e031f2b4 (git): * 2023-06-15 [ci skip]
git[bot]
05:35 PM Revision f6491773 (git): Fix test-bundled-gems for Ruby 3.1 (#7935)
* pry is not needed for test-bundled-gems
* Run test-unit test without rake task to avoid yard dependency
* Try to skip Prime_test.rb
hsbt (Hiroshi SHIBATA)
03:39 PM Revision 364a6d56 (git): [ruby/irb] Rewrite RubyLex to fix some bugs and make it possible to
add new features easily
(https://github.com/ruby/irb/pull/500)
* Add nesting level parser for multiple use (indent, prompt, termination check)
* Rewrite RubyLex using NestingParser
* Add nesting parser tests, fix some existing tests
...
tompng (tomoya ishida)
01:12 PM Bug #19733: Kernel#Rational does not accept prefix 0
@mame It seems that you were not aware of the fact that the documentation is wrong. And I hope you share with me the idea that we want the documentation to be correct. I think the reason why there was a mistake in the documentation, and ... sawa (Tsuyoshi Sawada)
01:16 AM Bug #19733: Kernel#Rational does not accept prefix 0
mame (Yusuke Endoh) wrote in #note-2:
> "Confusing" is not necessarily a bug. What Kernel#Rational accepts is clearly stated in the documentation in BNF style.
> ...
I had read that documentation, and thought that perhaps someone is goin...
sawa (Tsuyoshi Sawada)
12:57 AM Bug #19733 (Feedback): Kernel#Rational does not accept prefix 0
"Confusing" is not necessarily a bug. What Kernel#Rational accepts is clearly stated in the documentation in BNF style.
https://docs.ruby-lang.org/en/master/Kernel.html#method-i-Rational
There may be room for discussion to make `Kernel...
mame (Yusuke Endoh)
12:44 AM Bug #19733 (Feedback): Kernel#Rational does not accept prefix 0
`Integer` and `Rational` literals accept prefix `0`. There is no difference in this respect.
```ruby
0b10 # => 2
0b10r # => (2/1)
```
However, when it comes to `Kernel#Integer` and `Kernel#Rational`, the former accepts prefix `0...
sawa (Tsuyoshi Sawada)
08:06 AM Feature #19315: Lazy substrings in CRuby
Hanmac (Hans Mackowiak) wrote in #note-11:
> it confused me too, i thought Copy On Write was default for shared strings
> ...
Pat Shaughnessy in his blog describes exactly the same thing as Benoit Daloze above: Ruby shares string data ...
duerst (Martin Dürst)
07:38 AM Feature #19315: Lazy substrings in CRuby
it confused me too, i thought Copy On Write was default for shared strings
https://patshaughnessy.net/2012/1/18/seeing-double-how-ruby-shares-string-values
Hanmac (Hans Mackowiak)
05:26 AM Revision c1c92621 (git): [Cirrus] Run only if nightly [ci skip]
Recently Cirrus-CI does not start over 10 hours. Maybe we have too
many runs.
nobu (Nobuyoshi Nakada)
05:24 AM Revision 1cdae888 (git): [Cirrus] Auto cancelation for non-yjit task [ci skip]
nobu (Nobuyoshi Nakada)
03:39 AM Revision 1e55ac49 (git): Bump ruby/setup-ruby from 1.151.0 to 1.152.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.151.0 to 1.152.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Commits](https://github.com/ruby/setup-ruby/compare/bc1dd263b68cb5626dbb55d5c89777d793...
dependabot[bot]
 

Also available in: Atom