Activity
From 06/17/2023 to 06/23/2023
06/23/2023
-
11:58 PM Bug #18605: Fails to run on (newer) 32bit Windows with ucrt
- I have created a simple fix which helped to run 32-bit Ruby 2.6.x up to 3.2.x on Windows 11 without getting 'unexpected ucrtbase.dll' anymore.
Available here: https://github.com/oneclick/rubyinstaller2/issues/308#issuecomment-1605125... -
08:06 PM Misc #19679 (Closed): Migrate Wiki from bugs.ruby-lang.org to ruby/ruby GitHub repository
- 07:56 PM Revision 261e3663 (git): [ruby/yarp] Check for eof in yp_regexp_char_is_eof
- https://github.com/ruby/yarp/commit/f3fbc5bf9e
- 07:56 PM Revision 6ee106ff (git): [ruby/yarp] If ? is last char of regexp buffer, don't read beyond it.
- https://github.com/ruby/yarp/commit/1764532572
- 07:56 PM Revision 6dc23149 (git): [ruby/yarp] Don't read past the end of input parsing regex group
- https://github.com/ruby/yarp/commit/03f5a330a9
-
06:46 PM Revision 7ce6bcaf (git): Expose rb_hash_resurrect
- This is for implementing the `duphash` instruction
-
02:37 PM Revision 01507d2f (git): Skip test on Solaris SPARC
- This test fails on Solaris SPARC with the following error and I can't
figure out why:
TestGCCompact#test_moving_hashes_down_size_pools
Expected 499 to be >= 500. -
10:36 AM Feature #19057: Hide implementation of `rb_io_t`.
- byroot (Jean Boussier) wrote in #note-17:
> @ioquatix I'm not sure which change exactly is the cause, but it appears that the recent `rb_io_t` changes broke `raindrops`
I've noticed the same thing while trying to install `kgio` wit... -
10:34 AM Bug #18810: Make `Kernel#p` interruptable.
- It's because the code changed on master, https://github.com/ruby/ruby/commit/fe6b2e20e9f17ed2c2900aa72994e075ffdc7124 had that bug but master doesn't call `inspect` under `rb_uninterruptible()`.
On master:
```c
static VALUE
rb_f_p(in... -
10:26 AM Bug #18810: Make `Kernel#p` interruptable.
- Mmh, but it does work to interrupt `p`:
```
$ ruby -e 'o=Object.new; def o.inspect; loop { Thread.pass }; end; p 1; p o'
1
^C-e:1:in `pass': Interrupt
from -e:1:in `block in inspect'
from -e:1:in `loop'
from -e:1:in `inspect'
... -
10:24 AM Bug #18810: Make `Kernel#p` interruptable.
- `p` being uninterruptible means all of `object.inspect` and potential Fiber scheduler code is run under `Thread.handle_interrupt(Object => :never) { ... }`.
That seems a really bad idea, because e.g. if `inspect` would take a long time ... -
05:54 AM Revision 73529a12 (git): Declare `RHASH_AR_TABLE` and `RHASH_ST_TABLE` return non-null
- 03:52 AM Revision 00c1bd66 (git): Update default gems list at b7375770ef15c7d7b3fdf14bf1964a [ci skip]
-
03:52 AM Revision b7375770 (git): [ruby/timeout] Bump up v0.4.0
- https://github.com/ruby/timeout/commit/413194f8d2
06/22/2023
-
11:27 PM Bug #18810: Make `Kernel#p` interruptable.
- I submitted a pull request to update the Kernel#p documentation: https://github.com/ruby/ruby/pull/7975
-
11:02 PM Bug #18933: Dir.tmpdir implemented in non-Ractor-safe manner
- @nobu submitted a pull request to fix this upstream: https://github.com/ruby/tmpdir/pull/22
-
10:36 PM Bug #19293: The new Time.new(String) API is nice... but we still need a stricter version of this
- mame (Yusuke Endoh) wrote in #note-4:
> BTW Ruby 3.2.0 accidentally allows `Time.new("2023-01")`, `Time.new("2023-01-01")`, and `Time.new(" \n\n 2023-01-01 00:00:00 \n\n ")`. All of these are considered a bug, so will be prohibited ... -
06:24 PM Revision e8c93851 (git): [ruby/timeout] Raise exception instead of throw/catch for timeouts
- (https://github.com/ruby/timeout/pull/30)
throw/catch is used for non-local control flow, not for exceptional situations.
For exceptional situations, raise should be used instead. A timeout is an
exceptional situation, so it should use... -
06:21 PM Misc #19740: Block taking methods can't differentiate between a non-local return and a throw
- I'm not sure it's good to be able to differentiate, because then it could be a mess if different gems consider return/throw/break differently, e.g. if Rails wants to commit on `return` but some other library only wants to commit on "natu...
-
06:15 PM Revision b9349760 (git): Prefer `0` over `NULL` as function pointers
- SunC warns use of `NULL`, pointer to data as function pointers.
-
06:08 PM Revision 52f8de4f (git): Remove dead code in hash.c
- RHASH_TABLE_NULL_P and ar_alloc_table are no longer needed since
all Hash will have AR tables. -
05:49 PM Bug #11064: #singleton_methods for objects with special singleton_class returns an empty array
- I discussed this with @headius at RubyKaigi, and agree that it would be best to make `singleton_method` consistent with `singleton_methods`. As @matz indicated, NilClass/TrueClass/FalseClass instance methods should be considered as norm...
-
05:07 PM Revision 218a8d8e (git): [ruby/reline] Remove unused method
- (https://github.com/ruby/reline/pull/557)
`get_mbchar_byte_size_by_first_char` isn't used in Reline.
Also, this method implements the same functionality as `String#bytesize` and is unnecessary. -
04:40 PM Bug #19479 (Closed): Support IPv4-mapped IPv6 addresses in IPAddr#private?
- Applied in changeset commit:git|de51a4a13eab2c4c5917de923edde33dfed6f22f.
----------
[ruby/ipaddr] Consider IPv4-mapped IPv6 addresses private if IPv4 address is private
Fixes [Bug #19479]
https://github.com/ruby/ipaddr/commit/7faa0768d3 -
04:17 PM Bug #19479: Support IPv4-mapped IPv6 addresses in IPAddr#private?
- I submitted an upstream pull request to fix this: https://github.com/ruby/ipaddr/pull/57
-
04:40 PM Revision de51a4a1 (git): [ruby/ipaddr] Consider IPv4-mapped IPv6 addresses private if IPv4 address is private
- Fixes [Bug #19479]
https://github.com/ruby/ipaddr/commit/7faa0768d3 -
04:23 PM Revision 711cabec (git): Sync ruby/yarp to https://github.com/ruby/yarp/commit/89a00203af803032383338c943836da6bafca7d9
-
04:20 PM Revision e8fb8426 (git): [ruby/yarp] Allow for block statements after elsif and else
- https://github.com/ruby/yarp/commit/4560cab235
-
04:19 PM Revision 7fad7d34 (git): [ruby/yarp] Do not leak file descriptors
- https://github.com/ruby/yarp/commit/83c2c45b28
-
04:19 PM Revision b879528e (git): [ruby/yarp] Do not leak memory from lex modes
- https://github.com/ruby/yarp/commit/df6661740c
-
03:59 PM Revision edd48810 (git): Sync ruby/yarp with sync_default_gems
-
02:21 PM Bug #19743 (Closed): Ruby's parser seems to ignoring DOT at the end of file just after digits
- Applied in changeset commit:git|1344de56219cf83ca146c5346783f8483af534f9.
----------
[Bug #19743] All but EOF can be read again after push-back -
10:52 AM Bug #19743: Ruby's parser seems to ignoring DOT at the end of file just after digits
- Seems since 2.5.
I tried bisecting 2.5 branch, but `configure` generated with recent autoconf doesn't work. -
11:10 AM Revision 1344de56 (git): [Bug #19743] All but EOF can be read again after push-back
-
10:41 AM Feature #19742: Introduce `Module#anonymous?`
- Eregon (Benoit Daloze) wrote in #note-27:
> Regarding `Module#anonymous?`, I think it should be true for `Module.new::C = Module.new #=> #<Module:0x00007f92d6c66770>::C` (note, the `.name` of that is `"#<Module:0x00007f92d6c66770>::C"`,... -
10:38 AM Feature #19742: Introduce `Module#anonymous?`
- > I want to use this proposal to discuss this issue and whether there is anything we should do about such behaviour (or even if it's desirable).
I think it would be great to reflect it in the Module#name if a Module is no longer reachab... -
09:29 AM Feature #19742: Introduce `Module#anonymous?`
- @ioquatix oh wait, we might have two questions in our minds.
I am like: Can a module whose `name` is not `nil` be `anonymous?`. Answer is, if we want to agree with the current docs, it cannot be, because `Module#name` has to return `nil... -
08:17 AM Feature #19742: Introduce `Module#anonymous?`
- > I don't think Rails should monkey patch Module in this way either.
This may be a problem with some of rails idioms, e. g. how HashWithIndifferentAccess
arose, to give one example. While one may understand the use case (not having t... -
08:10 AM Feature #19742: Introduce `Module#anonymous?`
- > There is no semantics for anonymous? because it does not exist in Ruby yet.
I used the word "semantics" because the docs use the English word "anonymous", which is not formal, but would be surprising that `anonymous?` does not behave ... -
07:43 AM Feature #19742: Introduce `Module#anonymous?`
- > The first one is that Ruby docs (today) agree with my definition: If a module is anonymous, then its name is `nil`. If `mod.anonymous?` returned true and `mod.name` was not `nil`, we'd violate existing Ruby semantics.
There is no se... -
07:30 AM Feature #19742: Introduce `Module#anonymous?`
- @janosch-x agreed, in Zeitwerk I do my best at [reaching the original `Module#name`](https://github.com/fxn/zeitwerk/blob/main/lib/zeitwerk/real_mod_name.rb) because of that.
@ioquatix yeah, I understand your point of view. However, w... -
07:09 AM Feature #19742: Introduce `Module#anonymous?`
- fxn (Xavier Noria) wrote in #note-17:
> def self.name [...] I think overriding such a core method for an attribute that is out of reach, managed internally by Ruby, is questionable [...] Can people override `Array#size` to return 7? Yes... -
07:04 AM Feature #19742: Introduce `Module#anonymous?`
- I'm not that different, except
Anonymous to me means you don't have a name [that resolves to self]. If the module has a name that resolves to itself, it is not anonymous.
I would say a lot of the rails code should be rewritten just to ... -
06:23 AM Feature #19742: Introduce `Module#anonymous?`
- Yeah, we do not see it the same way.
Anonymous to me means you don't have a name. If the module has a name, done, it is not anonymous.
If you have a _temporary_ name, in particular you have a name.
To be honest, I would leave modules ... -
01:09 AM Feature #19742: Introduce `Module#anonymous?`
- Should setting a temporary name make a module not anonymous?
I found the following use cases in Rails:
```ruby
unless controller_class.anonymous?
controller_class.name.delete_suffix("Controller").under... -
12:42 AM Feature #19742: Introduce `Module#anonymous?`
- Oh, I thought you meant that the module has a name and had not been assigned to a constant.
If the module has a name, then not being considered to be anonymous is the least surprising definition to me.
You could also have
```rub... -
12:14 AM Feature #19742: Introduce `Module#anonymous?`
- I don't understand, is this correct or not?
```ruby
class Module
# Implementation from Rails:
def anonymous?
name == '' || name.nil?
end
end
Module.new.anonymous?
# => true
my_module = Module.new do
def self.name
"Hell... -
12:00 AM Feature #19742: Introduce `Module#anonymous?`
- Agree, but that method is not `Module#name`.
-
10:38 AM Misc #19722: DevMeeting-2023-07-13
- * [Feature #19729] Store object age in a bitmap (eightbitraptor)
* Allows more control of generational GC (number of generations, when are objects old).
* Adds a bitmap to each heap page (`heap_page->age_bits`).
* Frees up one o... -
09:44 AM Revision 8142728b (git): [rubygems/rubygems] Prefer `assert_include` over mere `assert`
- https://github.com/rubygems/rubygems/commit/140405cee6
-
09:44 AM Revision a651903a (git): [rubygems/rubygems] Prefer `assert_predicate` over mere `assert`
- https://github.com/rubygems/rubygems/commit/0d10063824
-
09:44 AM Revision 67ab8b43 (git): [rubygems/rubygems] Fix argument order of `assert_equal`
- https://github.com/rubygems/rubygems/commit/a7c015f82b
-
04:21 AM Revision ddb431c9 (git): Fix leaked FD for an empty file
-
12:42 AM Feature #19708: Support `attr_reader :foo?`
- Hey Jean & Benoit, thanks for finding those prior discussions. I tried searching for them before posting, but the question mark makes it really hard to find anything relevant, haha
I think the use case is clear: defining reader method...
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? -
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...
-
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 ... -
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...
-
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 ...
-
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... -
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... -
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... -
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 ...
-
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... -
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... -
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... -
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... -
10:05 PM Revision 010b8a29 (git): [ruby/yarp] Set default external encoding for parse tests
- https://github.com/ruby/yarp/commit/e757fde3ed
-
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
-
09:28 PM Revision 39a40af1 (git): [ruby/yarp] Truly fix snapshot testing on Ruby CI
- https://github.com/ruby/yarp/commit/c4e835711e
-
09:23 PM Revision 51ff9cd7 (git): [ruby/yarp] Actually fix snapshot tests
- https://github.com/ruby/yarp/commit/ba9e5b447e
-
08:56 PM Revision 06ed9fcd (git): Stop asking YJIT team to review dependabot changes
-
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. -
08:30 PM Revision 23e1c697 (git): [ruby/yarp] Fix snapshot checking
- https://github.com/ruby/yarp/commit/05a60a0774
-
08:02 PM Revision 4be594a5 (git): Don't report neutral results of Cirrus CI
-
07:55 PM Revision 585dbccb (git): [ruby/yarp] Use binary for normalizing printed ASTs
- https://github.com/ruby/yarp/commit/814326de34
-
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... -
06:40 PM Revision b0a3a6ad (git): [ruby/yarp] Fix invalid unescape sequence error for lower w
- https://github.com/ruby/yarp/commit/5a2c78367a
-
06:35 PM Revision fcf2f5a5 (git): Let yarp use main branch instead
-
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... -
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...
-
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... -
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 -
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. -
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... -
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...
-
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 `-...
-
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 '.... -
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... -
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... -
03:46 PM Bug #19731 (Closed): Can’t call an instance method inside an Endless method definition
-
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
-
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?
-
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... -
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
-
08:36 AM Bug #19739 (Closed): String coderange not cleared by String#slice!
-
08:16 AM Bug #19739: String coderange not cleared by String#slice!
- @byroot `ruby_3_1` is handled by @usa now.
-
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?
-
08:09 AM Bug #19739: String coderange not cleared by String#slice!
- OK fix is here: https://github.com/ruby/ruby/pull/7965
-
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... -
07:53 AM Feature #19717: `ConditionVariable#signal` is not fair when the wakeup is consistently spurious.
- I like this idea.
- 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.
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. -
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... -
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.
-
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] ... -
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... -
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.... - 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 -
01:28 PM Revision 932dd9f1 (git): [DOC] Regexp doc (#7923)
-
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 -
11:10 AM Revision 6be402e1 (git): [Bug #19736] Recover after unterminated interpolation
-
11:09 AM Revision 49b83b73 (git): Adjust indent [ci skip]
-
05:02 AM Revision 9ac070d0 (git): Copy instance variables to regexp from marshaled data
- `rb_ivar_foreach` disallows `ST_DELETE`.
-
04:57 AM Revision 2dfbe91c (git): Stop `rb_ivar_foreach` when callback returned `ST_STOP`
-
04:35 AM Revision 1edbaa85 (git): Merge rubygems/rubygems HEAD
- Pick from https://github.com/rubygems/rubygems/commit/880dd95996c93adc1e032399816931b243c5fe17
-
04:34 AM Revision 44ad176f (git): Update Racc entries on documents
-
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
``` -
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... - 01:48 AM Revision 504f37af (git): more fix
- 01:32 AM Revision 48b00c4d (git): Fix previous commit
-
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...
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... -
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).
... -
04:30 PM Feature #19737: Add `IO::Buffer#cat` for concat `IO::Buffer` instances
- Opend here <https://github.com/ruby/ruby/pull/7960>
-
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... -
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... -
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...
-
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... -
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... -
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?
-
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... -
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... - 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... -
05:24 PM Revision 11ee4f2b (git): [rubygems/rubygems] Suppress Content-Type warnings
- https://github.com/rubygems/rubygems/commit/97dbe4cabd
-
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. - 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.... -
11:28 AM Bug #19323: Integer overflow in `Integer#<<`
- backported into `ruby_3_1` at 344249674f7a7835445a44695664897fa4b83f00
- 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(-) -
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 -
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... -
09:28 AM Revision 2a80bac9 (git): Remove `--jobserver-auth` option which varies for each run
-
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] -
02:24 AM Revision e7440dca (git): [rubygems/rubygems] RemoteFetcher tests don't work with path including `+`
- https://github.com/rubygems/rubygems/commit/657d57621e
-
02:24 AM Revision 10e4a9a5 (git): [rubygems/rubygems] Escape regexp metachacters or use `assert_include`
- https://github.com/rubygems/rubygems/commit/6d445a85d7
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 ... -
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.
-
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.... -
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... -
12:10 PM Feature #19521: Support for `Module#name=` and `Class#name=`.
- Accepted. Thank you.
Matz.
-
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]
... -
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 - 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... -
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... - 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... - 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 - 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:... -
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 - 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... -
02:51 PM Bug #18686 (Closed): Regexp supporting unexpected age properties in Ruby < 3.2
-
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... -
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... -
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... -
05:39 AM Revision 1740482d (git): Fix rb_compile_option_t comments [ci skip]
-
02:15 AM Revision 7adab819 (git): Fix the format of NODE_EVSTR rendered by dump_node
-
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.
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. ...
-
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... -
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... -
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... -
07:41 AM Revision 19c62b40 (git): Replace parser & node compile_option from Hash to bit field
- This commit reduces dependency to CRuby object.
- 06:59 AM Revision e5ae7a16 (git): Update bundled gems list at 2023-06-17
-
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. -
06:48 AM Revision b943e9c7 (git): Fixes [Bug #19732]. Add missing stdint.h header to event.h.
-
04:24 AM Revision ba0bcc52 (git): Use ruby functions if `RUBY` is defined
-
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`. -
03:32 AM Revision 725739d6 (git): Remove no longer used variable
-
03:29 AM Revision 7b3a531f (git): Split the bmethod proc test to avoid redefinition
-
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
-
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...