Activity
From 07/24/2024 to 07/30/2024
07/30/2024
-
08:31 PM Revision d2b8fd0f (git): [DOC] Tweaks to Array.try_convert (#11260)
-
04:29 PM Bug #20659 (Closed): Speed regression of `parse.y` parser after numeric nodes were introduced
- The [`mail` benchmark from yjit-bench][1] is about 20% slower on `master` compared to commit:98eeadc9 ("Development of 3.4.0 started.") as the baseline, comparing running time of the Ruby process running the benchmark for a single iterat...
-
04:05 PM Revision f85c7dea (git): Update RubyGems 3.5.16 and Bundler 2.5.16 for Ruby 3.3 (#11252)
- * Merge RubyGems-3.5.12 and Bundler-2.5.12
* Merge RubyGems-3.5.13 and Bundler-2.5.13
* Merge RubyGems-3.5.14 and Bundler-2.5.14
* Merge RubyGems-3.5.15 and Bundler-2.5.15
* Merge RubyGems-3.5.16 and Bundler-2.5.16 -
04:05 PM Revision 0922afa9 (git): [Bug #20654] Fix floor and ceil when ndigits is large (#11277)
- * Fix floor when ndigits is large
[Bug #20654]
This commit fixes Integer#floor and Float#floor when the number is
negative and ndigits is large such that 10**ndigits is a bignum.
Previously, it would return 0 in such cases. However, t... -
03:32 PM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- > I'd be surprised if it was accepted.
Same here. Although perhaps I should clarify that `$~` would be accessible in eval if also present as a literal in the method.
-
03:21 PM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- Right, so it's not as simple as marking the ISeq as not needing the backref because it doesn't use `getspecial`.
I think we could only realistically do it in MRI if we accepted that `$~` and such wouldn't be accessible from `eval`. Co... -
11:37 AM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- @byroot It depends in which situation but generally yes it's able to avoid the allocation.
If there is no block around, partial escape analysis avoids the allocation of the Ruby MatchData object as long as it's not leaked/stored globall... -
05:25 AM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- > is there something in the semantic that make it impossible to predict?
Answering to myself:
```ruby
def match
"foo" =~ /f(o)o/
eval("$1")
end
p match
```
-
05:18 AM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- ko1 (Koichi Sasada) wrote in #note-16:
> No. It is not user visible behavior so no incompatiblity.
Sorry my wrong. Please ignore about it. -
02:58 PM Feature #20563: Drop support for old Windows
- jeremyevans0 (Jeremy Evans) wrote in #note-3:
> Windows Server 2016 is not yet EOL, the EOL date is January 12, 2027: https://learn.microsoft.com/en-us/lifecycle/products/windows-server-2016
It looks like "Extended Security Update" o... -
02:39 PM Feature #20563: Drop support for old Windows
- It seems that the import library in VisualStudio 2015 is missing the symbol that was introduced in Windows Server 2016.
```
win32.obj : error LNK2019: unresolved external symbol __imp_SetThreadDescription referenced in function rb_w3... -
02:16 PM Feature #20563: Drop support for old Windows
- hsbt (Hiroshi SHIBATA) wrote in #note-2:
> @usa said "Windows Server 2016 is already EOL, we can drop them".
> ...
Windows Server 2016 is not yet EOL, the EOL date is January 12, 2027: https://learn.microsoft.com/en-us/lifecycle/produc... -
06:38 AM Feature #20563 (Closed): Drop support for old Windows
- @usa said "Windows Server 2016 is already EOL, we can drop them".
I also agreed to drop Windows Server 2008, 2012 and 2016 -
02:32 PM Misc #20658 (Closed): Dropping the Arm Neoverse (Ubuntu) server on RubyCI
- ## Context
On July 26 2024, 4 days ago, the person at Arm sponsoring a SSH-accessing Arm server via Works on Arm program told me that they could no longer sponsor the server **after 10th August 2024**. We have been using Equinix's Arm... -
02:29 PM Bug #20571 (Closed): Compile error on for loop
-
12:49 AM Bug #20571: Compile error on for loop
- After some additional work, I think this is an optimizer issue. With `--dump=i,-opt`, both parse.y and prism generate the exact same instructions. However, with `--dump=i`, prism does not raise an error, but parse.y does. I'm not sure...
-
02:28 PM Bug #20651 (Closed): `false && (1 in 1)` produces argument stack underflow (-1)
-
02:09 PM Revision 91bb6afa (git): [DOC] Tweaks for Array.new (#11259)
-
02:06 PM Revision b44a1549 (git): [DOC] Tweaks for Array#&
-
02:04 PM Feature #20657: Allow Enumerable#map(&:method) and #each accept additional parameters for method
- Oo, the ampersand is not language syntax, as I think before, but simple operator, converting Symbol to Proc. It is fine trix, but cannot accept additional arguments.
I'm disappointed.
Thank you for the clarification. -
01:53 PM Feature #20657: Allow Enumerable#map(&:method) and #each accept additional parameters for method
- As @bkuhlmann mentioned, there's room for the language enhancement here to provide arguments to the method for a block. But not this way.
Because the arguments belong to the method, not the method call (each or map in the example).
M... -
01:04 PM Feature #20657: Allow Enumerable#map(&:method) and #each accept additional parameters for method
- [Method Parameters And Arguments](https://alchemists.io/articles/ruby_method_parameters_and_arguments) are already complex (_powerful_ but complex). Historically, the block parameter has always been at the last position and optional by d...
-
12:30 PM Feature #20657 (Feedback): Allow Enumerable#map(&:method) and #each accept additional parameters for method
- I can use `#map` (or `#each`) with short method name, for example:
``` ruby
a = ["a1", "b1", "c1"]
b = a.map(&:length)
# or
a.each(&:some_method)
```
But with additional arguments I must use yield:
```ruby
c = a.map { |i... -
02:02 PM Revision 0dda30d9 (git): [rubygems/rubygems] Print a better debug message when lockfile does not include the current platform
- https://github.com/rubygems/rubygems/commit/afb7a6d754
-
02:02 PM Revision 997642cf (git): [rubygems/rubygems] The `simulate_platform` helper can take a string
- https://github.com/rubygems/rubygems/commit/680bafac1a
-
02:02 PM Revision cf6efd1b (git): [rubygems/rubygems] Simplify logic to add current platform a bit
- https://github.com/rubygems/rubygems/commit/e102516e27
-
02:01 PM Revision 1164b6a7 (git): [rubygems/rubygems] Fix `gem list` regression when a regular gem shadows a default one
- Previously, if you have bundler installed both as a regular gem and a
default gem, the default gem would be displayed by `gem list`.
https://github.com/rubygems/rubygems/commit/10a6b1736e -
02:01 PM Revision 3d248b2e (git): [rubygems/rubygems] Always leave default gem executables around
- https://github.com/rubygems/rubygems/commit/775c35e197
-
01:54 PM Revision ec13ccdf (git): [rubygems/rubygems] Allow smoother breaking changes in test env
- https://github.com/rubygems/rubygems/commit/0fc3feae19
-
01:17 PM Bug #20654: Floor and ceil have unexpected behaviour when ndigits is large
- I opened backport PRs.
3.3: https://github.com/ruby/ruby/pull/11277
3.2: https://github.com/ruby/ruby/pull/11278 -
12:49 PM Bug #20654 (Closed): Floor and ceil have unexpected behaviour when ndigits is large
- Applied in changeset commit:git|3af2a7fbe12e11bac7b26bd991d3d02349f47295.
----------
Fix floor when ndigits is large
[Bug #20654]
This commit fixes Integer#floor and Float#floor when the number is
negative and ndigits is large such th... -
01:02 PM Revision b37ffb93 (git): Move incorrectly placed tests
- The tests for Integer#ceil was accidentally placed in test_truncate.
-
12:56 PM Feature #20612: Introduce new Epsilon (no-op) GC
- "Epsilon" is the term used by the JVM's no-op garbage collector: https://openjdk.org/jeps/318
I don't have a strong opinion on naming, I think either "no-op" or "epsilon" is ok. -
06:04 AM Feature #20612: Introduce new Epsilon (no-op) GC
- Another question is about naming, "Epsilon" is common term for users?
-
12:36 PM Feature #20594: A new String method to append bytes while preserving encoding
- duerst (Martin Dürst) wrote in #note-17:
> This may need a completely separate issue, but when I introduced `String#force_encoding`, I was imagining adding a block to it so that the forced encoding would only apply inside the block.
... -
08:03 AM Feature #20594: A new String method to append bytes while preserving encoding
- Eregon (Benoit Daloze) wrote in #note-9:
> My understanding of `byte*` methods is they treat the String as a byte array, which implies indices are just byte indices but also that the encoding is ignored (it seems clear when one does `... -
12:21 PM Revision a7167d0c (git): Fix ceil when ndigits is large
- [Bug #20654]
This commit fixes Integer#ceil and Float#ceil when the number is
negative and ndigits is large such that 10**ndigits is a bignum.
Previously, it would return 0 in such cases. However, this would cause
unexpected behaviour ... -
12:21 PM Revision 3af2a7fb (git): Fix floor when ndigits is large
- [Bug #20654]
This commit fixes Integer#floor and Float#floor when the number is
negative and ndigits is large such that 10**ndigits is a bignum.
Previously, it would return 0 in such cases. However, this would cause
unexpected behaviou... -
07:22 AM Feature #20525: Percent string literal with indentation support or String#dedent
- It conflicts with an existing syntax.
`%` plus a punctuation starts a string literal that ends with the punctuation. -
07:18 AM Bug #20514 (Feedback): Open3#capture3 does not receive correct exit code from Heroku but Kernel#system does
- Some process may behave differently with `Open3.capture3` and `system`, for example, a process that changes its behavior depending on whether stdio is tty or not.
As far as I know, there is no difference in the interpretetion of command... -
06:37 AM Bug #20501 (Assigned): ruby SEGV
-
06:31 AM Revision 1870505f (git): Fix wrong unreachable chunk remove when jump destination label is unremovable
-
06:31 AM Bug #20655 (Closed): Calling continuation triggers ensure function of rb_ensure
- Applied in changeset commit:git|c884db0b5b4f5296e5eacd27357b730b42f27b3a.
----------
[BUG #20655] Add tests to use rb_ensure and call cont.call -
06:31 AM Revision 77f8107e (git): Delete the rjit definition already deleted in C
-
06:31 AM Revision 6c5c30b5 (git): Use tmpdir for various environments (including Windows)
-
06:31 AM Revision 50a0552b (git): Fix test code and extension to avoid using gvars and Kernel methods
-
06:31 AM Revision ac5ac48a (git): Revert 28a1c4f33e3349a98c04b8e068d9c674eb936064
- 28a1c4f33e3349a98c04b8e068d9c674eb936064 seems to call an improper
ensure clause. [Bug #20655]
Than fixing it properly, I bet it would be much better to simply revert
that commit. It reduces the unneeded complexity. Jumping into a block
... -
06:31 AM Revision c884db0b (git): [BUG #20655] Add tests to use rb_ensure and call cont.call
-
05:14 AM Bug #20631: Build failure with Xcode 16 beta and macOS 15 (Sequoia) Beta
- Xcode 16 beta 4 fixed the following issue.
>This line is broken with Xcode 16 beta.
> ...
The detailed version is here:
```
$ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
ve... -
03:58 AM Feature #20646 (Closed): Improve Socket.tcp - Applied in changeset commit:git|b3baa11ee90c3fc0a3c43f1ac3293558fbfe76cb.
----------
Improve Socket.tcp (#11187)
[Feature #20646]Improve Socket.tcp
This is a proposed improvement to `Socket.tcp`, which has implemented Happy Eyeballs v... - 03:58 AM Revision b3baa11e (git): Improve Socket.tcp (#11187)
- [Feature #20646]Improve Socket.tcp
This is a proposed improvement to `Socket.tcp`, which has implemented Happy Eyeballs version 2 (RFC8305) in PR9374.
1. Background
I implemented Happy Eyeballs version 2 (HEv2) for Socket.tcp in PR9374... -
03:48 AM Revision 7ea678b2 (git): Add array test cases for `TestParse#test_define_singleton_error`
-
12:45 AM Revision ce565cd4 (git): [Bug #20653] Fix memory leak in String#start_with? when regexp times out (#11255)
- Fix memory leak in String#start_with? when regexp times out
[Bug #20653]
This commit refactors how Onigmo handles timeout. Instead of raising a
timeout error, onig_search will return a ONIGERR_TIMEOUT which the
caller can free memory, ...
07/29/2024
-
11:54 PM Bug #20571: Compile error on for loop
- I looked into this and was able to determine the underlying cause (currently on line 7844 of `compile.c`):
```c
ADD_INSN(cond_seq, line_node, pop); /* discard cached #deconstruct value */
```
Commenting that out fixes the exampl... - 11:37 PM Revision cdda284c (git): Bump ossf/scorecard-action from 2.3.3 to 2.4.0
- Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.3 to 2.4.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md... -
11:33 PM Revision 30f57637 (git): Wait for server threads to finish
- 11:24 PM Revision 0afbc73b (git): [rubygems/rubygems] Bump rb-sys
- Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.98 to 0.9.99.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.98...v0.9.99)
---
updated-depende... -
09:29 PM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- > I'd be happier to see something like:
@Eregon given how good TruffleRuby is at escape analysis and such, before I dive into why it wasn't done before, is TruffleRuby able to not create the MatchData when it's not accessed, or is the... -
07:40 PM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- Dan0042 (Daniel DeLorme) wrote in #note-19:
> After reading over https://github.com/ruby/ruby/pull/4734/files it seems there's two parts to it.
> ...
I'm not sure it is thread-safe. This would modify a shared backref in code paths whe... -
07:19 PM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- After reading over https://github.com/ruby/ruby/pull/4734/files it seems there's two parts to it.
1. use a `set_match` pointer to return the match (this fixes the race condition)
2. always allocate a MatchData, never using `rb_backref_ge... -
05:39 PM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- byroot (Jean Boussier) wrote in #note-4:
> Maybe we could add a new Regexp flag to turn off this behavior?
My first reaction was "Yes! This is exactly was we need!" but after thinking more it feels un-rubyish. We shouldn't have to wr... -
09:18 PM Revision 2c165531 (git): Revert moving things to Ruby
- This is slowing down benchmarks on x86, so lets revert it for now.
- 08:26 PM Revision acbb8d4f (git): Expand opt_newarray_send to support Array#pack with buffer keyword arg
- Use an enum for the method arg instead of needing to add an id
that doesn't map to an actual method name.
$ ruby --dump=insns -e 'b = "x"; [v].pack("E*", buffer: b)'
before:
```
== disasm: #<ISeq:<main>@-e:1 (1,0)-(1,34)>
local table ... -
06:29 PM Bug #20651: `false && (1 in 1)` produces argument stack underflow (-1)
- https://github.com/ruby/ruby/pull/11267
I think this issue is same as https://bugs.ruby-lang.org/issues/20571
~~~ruby
for _ in (true or 1 in 1)
end
~~~ -
03:07 PM Revision 86a762ce (git): [ruby/reline] Fix memory leak in setupterm
- (https://github.com/ruby/reline/pull/733)
The allocated Fiddle::Pointer never gets freed because it doesn't have a
free function defined for when it gets garbage collected. This commit
changes it to use the default free function.
https... -
01:16 PM Revision 63bdf2d7 (git): [ruby/rdoc] [DOC] Mods about markup formats
- (https://github.com/ruby/rdoc/pull/1143)
https://github.com/ruby/rdoc/commit/011de3f2fd -
01:15 PM Revision df1cc043 (git): Add remark about call-seq
-
01:11 PM Revision 477f6725 (git): [DOC] rb_ary_s_create (#11256)
- 03:31 AM Revision d2184e8d (git): Bump github/codeql-action from 3.25.14 to 3.25.15
- Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.14 to 3.25.15.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.... - 03:31 AM Revision 14eb3860 (git): Bump ruby/setup-ruby from 1.188.0 to 1.190.0
- Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.188.0 to 1.190.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](http... -
03:02 AM Bug #20088: Ruby 3.3.0 does not cross-complie on arm64-darwin
- Thanks, I cherry-picked the revision to `ruby_3_3`.
Since this ticket wasn't flagged as a backport request, I also added @mdalessio and @stanhu to the "Ruby master" project as "Contributor" so that you can update the "Backport" field ... -
02:56 AM Bug #20088: Ruby 3.3.0 does not cross-complie on arm64-darwin
- ruby_3_3 commit:6d744837abc3f7f71a1f10c7ca399201f6f05e43.
-
02:56 AM Bug #20088 (Closed): Ruby 3.3.0 does not cross-complie on arm64-darwin
- Applied in changeset commit:git|6d744837abc3f7f71a1f10c7ca399201f6f05e43.
----------
[Bug #20088] Fix ARCH_FLAG for cross compiling -
02:55 AM Revision 6d744837 (git): [Bug #20088] Fix ARCH_FLAG for cross compiling
07/28/2024
-
11:01 PM Revision 3f40ceba (git): Specify `LAST_NODE` for `NODE_DEFINED`
- For example:
```
defined?(1)
```
Before:
```
# @ NODE_SCOPE (id: 2, line: 1, location: (1,0)-(1,11))
# +- nd_tbl: (empty)
# +- nd_args:
# | (null node)
# +- nd_body:
# @ NODE_DEFINED (id: 1, line: 1, location: (1,0)-(1,11))*
# ... -
04:07 PM Bug #20088: Ruby 3.3.0 does not cross-complie on arm64-darwin
- @k0kubun Can I ask for 2a4a8466 to be backported to 3.3?
-
11:57 AM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- > I'm thinking cases of Regexps being stored in constants and potentially composed of other regexps/strings, like https://github.com/ruby/uri/blob/master/lib/uri/rfc3986_parser.rb does it for example.
Sure, there are cases where it wo... -
08:34 AM Bug #20655: Calling continuation triggers ensure function of rb_ensure
- I guess https://github.com/ruby/ruby/pull/11264 will solve your issue. Could you give it a try with your patch?
-
07:19 AM Feature #20656 (Feedback): Import Hash#except! from Active Support
- willianveiga (Willian Veiga) wrote:
> For some unknown reason, Hash#except! was not imported on #8499. We have Hash#except, but we don't have the bang version (Hash#except!).
The reason is stated there.
Its behavior does not match w...
07/27/2024
-
11:03 PM Bug #20079: alexandria testsuite began to segfault recently
- vo.x (Vit Ondruch) wrote in #note-13:
> This does not help testing with Ruby 3.3.2
Hmmm that's a bit surprising. Thanks for taking the time to try that.
Ok, let's go a bit more conservative, could you please test again with my [... -
10:14 PM Feature #20656 (Feedback): Import Hash#except! from Active Support
- For some unknown reason, Hash#except! was not imported on #8499. We have Hash#except, but we don't have the bang version (Hash#except!).
This feature request was created to address that.
The new method except! should work exactly as de... -
10:04 PM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- Eregon (Benoit Daloze) wrote in #note-14:
> ko1 (Koichi Sasada) wrote in #note-11:
> ...
No. It is not user visible behavior so no incompatiblity.
(don't change `$~`) -
11:05 AM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- byroot (Jean Boussier) wrote in #note-9:
> I see what you mean, but such flag would only really be worth using in places where saving that allocation is worth it, where right now you usually use a literal anyway, so I don't think duplica... -
10:58 AM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- ko1 (Koichi Sasada) wrote in #note-8:
> what does it happen when creating a thread just after storing `$~`?
It's simply not set in the new thread, and that seems already the same behavior on CRuby:
```
$ ruby -ve '"a" =~ /a/; p $~;... -
07:09 AM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- Interestingly the NO_MATCH regexp options was suggested in the ticket that led to `Regexp#match?` [Feature #8110]
-
07:00 AM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- I don't follow, how can it be re-used in your example? :
```ruby
def foo
if /foo/ =~ "foo" # generate MatchData1
bar()
p $~ # #<MatchData "all">
end
end
def bar
m = "all".match(/all/) # reuse MatchData1
p $~... -
06:19 AM Bug #20655 (Closed): Calling continuation triggers ensure function of rb_ensure
- The bug is reproduced when:
* `rb_ensure(func1, arg1, func2, arg2)` is called with arguments:
* func1: eventually calls `rb_f_require()` (or `Kernel#require` via rb_funcall)
* func2: any C func
* the required ruby script requir...
07/26/2024
-
08:23 PM Bug #20635: Can't build fat binaries on Darwin (Mac OS X)
- If you run `make V=1`, you can get the command which causes the SIGBUS. With that, you can run it under a debugger (not sure whether it was LLDB or GDB in OS X) and get a backtrace. `--with-coroutine` is probably the way to go for vintag...
-
04:08 AM Bug #20635: Can't build fat binaries on Darwin (Mac OS X)
- Apologies for the delay in responding. The two-factor authentication had me locked out of this site.
Regarding the request for verbatim error messages:
Well, there are several thousand initial lines of compiler warnings which permute ... -
07:19 PM Feature #20625: Object#chain_of
- @zverok do you think `Enumerator#chain_of?` would be useful as an specialization of `produce().take_while {!_1.nil?}`?
-
05:20 PM Revision e798f45c (git): Error when --with-shared-gc doesn't specify a directory
-
05:07 PM Revision a65c205a (git): [ruby/prism] Add explicit check for PRISM_HAS_NO_FILESYSTEM
- https://github.com/ruby/prism/commit/89c22f0e6c
-
05:07 PM Revision 1992bd31 (git): [ruby/prism] Fallback to pm_string_file_init on platforms without memory-mapped files
- > ..., and on other POSIX systems we'll use `read`.
As `pm_string_mapped_init`'s doc comment says, it should fall back to
`read(2)`-based implementation on platforms without memory-mapped files
like WASI, but it didn't. This commit fixe... -
05:04 PM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- I found an idea that each thread points to unescaped MatchData rather than `$~` and reuse it.
In other words, all generated MatchData will be cached by `th->last_matchdata` (or similar) and use it across scopes.
```ruby
def foo
if /..... -
01:54 PM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- byroot (Jean Boussier) wrote in #note-9:
> > I don't really like a Regexp flag for this because a Regexp might be used in different contexts and some usages might want $~ and some might not (which could lead to a bunch of duplication).
... -
12:09 PM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- > I don't really like a Regexp flag for this because a Regexp might be used in different contexts and some usages might want $~ and some might not (which could lead to a bunch of duplication).
I see what you mean, but such flag would ... -
12:05 PM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- Eregon (Benoit Daloze) wrote in #note-7:
> FWIW, what TruffleRuby does for this is to store `$~` as a frame-local thread-local variable, but thread-local only if more than 1 thread has been seen, otherwise it's stored directly in the fr... -
11:09 AM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- FWIW, what TruffleRuby does for this is to store `$~` as a frame-local thread-local variable, but thread-local only if more than 1 thread has been seen, otherwise it's stored directly in the frame:
https://github.com/oracle/truffleruby/b... -
09:23 AM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- > it could be better if we had a gsub variant that doesn't touch $~.
Right, but the problem is beyond `gsub`, e.g.:
```ruby
> ...
=> "bb"
>> $~
=> #<MatchData "bb" 1:"bb">
```
So introducing `gsub( backref: false)` or `gsub_... -
07:19 AM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- I agree this is counter-intuitive. The #17507 problem was that
```ruby
i = lambda { ...(touches $~)... }
many.times { Thread.start { many.times { i.call } } }
```
would break. This is because `$~` is `i`'s local variable. `... -
06:15 AM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- > If anyone can come up with an approach that fixes #17507 without causing an increase in memory usage
I guess I'm a bit surprised by that because I wouldn't have thought the backref is only accessible by the same fiber, but maybe I'... -
04:33 PM Misc #20628: DevMeeting-2024-08-01
- * [Bug #20620] singleton_method undefined for module using "extend self" (jeremyevans0)
* I believe this is expected behavior and the bug can be rejected, is that correct?
* I think it is unfortunate that the `all` argument to `sin... -
03:55 PM Misc #20628: DevMeeting-2024-08-01
- * [Feature #18368] Range#step semantics for non-Numeric ranges (zverok)
* The feature was approved a year ago by @matz but the PR doesn’t receive any review/comments/answers. Not sure what I should do to move forward, so submitting it... -
03:13 PM Misc #20628: DevMeeting-2024-08-01
- * [Feature #20590] Ensure `fork` isn't called when `raddrinfo`'s background thread is in `getaddrinfo` (byroot)
* Full rationale in the ticket, too large to copy here.
* I understand that this solution is quite unorthodox, but I th... - 03:44 PM Revision cb5c4605 (git): * expand tabs. [ci skip]
- Please consider using misc/expand_tabs.rb as a pre-commit hook.
-
03:44 PM Revision 158177e3 (git): Improve allocation throughput by outlining cache miss code path
- Previously, GCC 11 on x86-64 inlined the heavy weight logic for
potentially triggering GC into newobj_alloc(). This slowed down
the hotter code path where the ractor cache hits, causing a degradation
to allocation throughput.
Outline th... -
03:44 PM Revision a06cfa7e (git): Fix a -Wmaybe-uninitialized
- With the body of functions available, GCC noticed that lev is
uninitialized in rb_gc_vm_lock_no_barrier() in single ractor
mode. -
03:44 PM Revision 0ada02ab (git): Put the default GC implementation back into gc.o
- We discovered that having gc.o and gc_impl.o in separate translation
units diminishes codegen quality with GCC 11 on x86-64. This commit
solves that problem by including default/gc.c into gc.c, letting the
optimizer have visibility into ... -
03:44 PM Revision cef959df (git): Delete unused rb_gc_impl_get_finalizers() not in gc_impl.h
-
03:22 PM Revision aaa542d8 (git): Doc for some #ceil and #floor
-
03:22 PM Revision 78f1b835 (git): Doc for some #ceil and #floor
-
03:20 PM Feature #19993 (Closed): Optionally Free all memory at exit
-
03:19 PM Bug #20654 (Closed): Floor and ceil have unexpected behaviour when ndigits is large
- GitHub PR: https://github.com/ruby/ruby/pull/11257
There is unexpected behaviour in Integer#floor, Float#floor, Integer#ceil, Float#ceil when ndigits is large such that 10**ndigits is a bignum.
Previously, it would return 0 in such... -
01:43 PM Bug #20653: Memory leak in String#start_with? when regexp times out
- Ruby 3.3 backport PR: https://github.com/ruby/ruby/pull/11255
-
12:42 PM Bug #20653 (Closed): Memory leak in String#start_with? when regexp times out
- Applied in changeset commit:git|7464514ca5e825ada31522b63a33e02d62a0a248.
----------
Fix memory leak in String#start_with? when regexp times out
[Bug #20653]
This commit refactors how Onigmo handles timeout. Instead of raising a
timeo... -
01:37 PM Revision 0cc98ae3 (git): skip bundled gem rss test for a while.
-
12:42 PM Revision 7464514c (git): Fix memory leak in String#start_with? when regexp times out
- [Bug #20653]
This commit refactors how Onigmo handles timeout. Instead of raising a
timeout error, onig_search will return a ONIGERR_TIMEOUT which the
caller can free memory, and then raise a timeout error.
This fixes a memory leak in ... -
12:16 PM Revision 67e1ea00 (git): [rubygems/rubygems] Remove inconsistent whitespace from CLI flags
- RuboCop sometimes accepts extra spaces for alignment, but in this case I
don't see any consistent alignment.
https://github.com/rubygems/rubygems/commit/a8c767e14b -
11:54 AM Revision 31d0f1a2 (git): bump patchlevel.
-
11:53 AM Revision 367ad505 (git): Revert "merge revision(s) 9f708d48f6df37ee9600db9d51b57a156609a13b,0301473fb523c71d8cdc4966971f31f502001185,7f0e26b7f99bf76408569892ce20318501f74729: [Backport #20516]"
- This reverts commit 56c311aa0b20dee13ab43309ae3386f57f8cb797.
-
09:41 AM Revision ae9a4351 (git): bump teeny
-
08:05 AM Revision bfaccd64 (git): [rubygems/rubygems] Make all tests still pass when switching from truffleruby to cruby
- https://github.com/rubygems/rubygems/commit/4f3d9fa3bf
-
08:05 AM Revision 7feccb12 (git): [rubygems/rubygems] Make test env resilient to ruby version changes
- We use pre-existence of `rake_path` to decide whether we need to
regenerate dummy test gems in `tmp`. When changing rubies, the previous
implementation will believe that the correct `rake_path` exists
and avoids regenerating dummy gems, ... -
07:56 AM Revision 71dec15a (git): [rubygems/rubygems] Fix bundle check exit code when git gem is missing
- Make `bundle check` exit with code 1 when gem git source is not yet
checked out.
https://github.com/rubygems/rubygems/commit/93162bf5af -
06:20 AM Feature #20594: A new String method to append bytes while preserving encoding
- Ok, so after thinking about this for a bit, I think a good name would be:
- `String#append_bytes(String) => self`
- `String#append_byte(Integer) => self`
It's still mentioning bytes, but it's not using the same `byte*` prefix ... - 02:57 AM Revision 3542ad52 (git): Bump github/codeql-action from 3.25.13 to 3.25.14
- Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.13 to 3.25.14.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.... -
02:24 AM Revision 5f1eb0dc (git): Fix wrong conversion in disasm dump
- `LINK_ELEMENT::type` is an `enum` not a `VALUE`, `FIX2LONG` doesn't
make sense. -
01:58 AM Misc #20639: Request to host C API docs on docs.ruby-lang.org
- I added <https://docs.ruby-lang.org/capi/en/master/> and link from <https://docs.ruby-lang.org/> to it.
-
01:45 AM Revision 83a99bdb (git): [ruby/net-http] Removed needless NullWriter class
- https://github.com/ruby/net-http/commit/ddb2a81aed
-
01:29 AM Revision 2c76bb7e (git): Remove `struct RNode_VALUES`
- This was removed by a5cc6341c0688c346f70098652b2375c03df40aa.
07/25/2024
-
10:29 PM Revision f2728c33 (git): Change RESBODY Node structure
- Extracrt exception variable into `nd_exc_var` field
to keep the original grammar structure.
For example:
```
begin
rescue Error => e1
end
```
Before:
```
@ NODE_RESBODY (id: 8, line: 2, location: (2,0)-(2,18))
+- nd_args:
| @ NODE_... - 07:50 PM Revision a4563be0 (git): [rubygems/rubygems] bundle-gem learns to find Gemfile template correctly
- Removes the symlink for gems.rb.tt and instead uses the singular
template file. Only the destination filename for the gemfile reads from
the `init_gems_rb` setting.
https://github.com/rubygems/rubygems/commit/43ce0e1666 -
07:34 PM Bug #20653 (Closed): Memory leak in String#start_with? when regexp times out
- GitHub PR: https://github.com/ruby/ruby/pull/11247
This commit refactors how Onigmo handles timeout. Instead of raising a timeout error, onig_search will return a ONIGERR_TIMEOUT which the caller can free memory, and then raise a time... -
07:25 PM Revision 54ff3d69 (git): Fix test_kwarg_eval_memory_leak
- Hash.new no longer takes keyword arguments except for capacity, so we
should just use a method that takes keyword arguments instead. -
06:59 PM Revision 24770c30 (git): [ruby/prism] Sync from ruby/ruby
- https://github.com/ruby/prism/commit/280517c325
-
04:46 PM Revision 83b0cedf (git): Add branch prediction annotations for object allocation
- I get a slight boost from these with GCC 11 on Intel Skylake.
Part of a larger story to fix an allocation throughput regression
compared to 98eeadc ("Development of 3.4.0 started.") as the baseline. -
04:14 PM Revision 7571ad42 (git): [Bug #20650] Fix memory leak in Regexp capture group when timeout (#11244)
- Fix memory leak in Regexp capture group when timeout
[Bug #20650]
The capture group allocates memory that is leaked when it times out.
For example:
re = Regexp.new("^#{"(a*)" * 10_000}x$", timeout: 0.000001)
str = "a" * 10000... -
02:18 PM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- It's expected that fixing #17507 caused memory usage to increase. If anyone can come up with an approach that fixes #17507 without causing an increase in memory usage, please submit a pull request for it.
-
11:13 AM Misc #20652: Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- @jeremyevans0 What do you think?
-
10:11 AM Misc #20652 (Closed): Memory allocation for gsub has increased from Ruby 2.7 to 3.3
- I recently upgraded from ruby 2.7.7 to 3.3.1 and noticed that the GC load increased.
When I used the allocation profiler to investigate, I found that memory allocation from gsub had increased.
The problem was code like this:
```ruby... -
01:54 PM Bug #20650: Memory leak in Regexp capture group when timeout
- I opened a Ruby 3.3 backport here: https://github.com/ruby/ruby/pull/11244
-
01:23 PM Bug #20650 (Closed): Memory leak in Regexp capture group when timeout
- Applied in changeset commit:git|10574857ce167869524b97ee862b610928f6272f.
----------
Fix memory leak in Regexp capture group when timeout
[Bug #20650]
The capture group allocates memory that is leaked when it times out.
For example:
... -
01:23 PM Revision 10574857 (git): Fix memory leak in Regexp capture group when timeout
- [Bug #20650]
The capture group allocates memory that is leaked when it times out.
For example:
re = Regexp.new("^#{"(a*)" * 10_000}x$", timeout: 0.000001)
str = "a" * 1000000 + "x"
10.times do
100.times do
r... -
11:39 AM Revision 53f0d3b1 (git): [ruby/prism] Do not serialize common flags when PRISM_SERIALIZE_ONLY_SEMANTICS_FIELDS is set
- * Note that we could shift the flags by 2 on serialize & deserialize
but it does not seems worth it as it does not save serialized size
in any significant amount, i.e. average was 0.799 before #2924.
* $ bundle exec rake serialized_s... -
11:39 AM Revision 9cc2747e (git): [ruby/prism] Do not serialize node_id when PRISM_SERIALIZE_ONLY_SEMANTICS_FIELDS is set
- * $ bundle exec rake serialized_size:topgems
Before:
Total sizes for top 100 gems:
total source size: 90207647
total serialized size: 86284647
total serialized/total source: 0.957
Stats of ratio serialized/source per file:
average... -
07:46 AM Bug #20651 (Closed): `false && (1 in 1)` produces argument stack underflow (-1)
- `false && (1 in 1)` and `true || (1 in 1)` produces argument stack underflow since ruby 3.0
~~~
# ruby -v
ruby 3.4.0dev (2024-07-24T19:55:04Z master 30eba40f9c) [x86_64-linux]
# ruby -e "false && (1 in 1)"
-- raw disasm--------
... -
05:43 AM Revision 22ad6b24 (git): Extend RUBY_TEST_TIMEOUT_SCALE on macos-14 and --repeat-count=2
-
04:47 AM Revision 5f6a1c2e (git): Omit TestFile#test_stat when the machine is stupidly slow
- GitHub Actions macos-14 machine is stupid.
https://app.launchableinc.com/organizations/ruby/workspaces/ruby/data/test-paths/file%3Dtest%2Fruby%2Ftest_file.rb%23%23%23class%3DTestFile%23%23%23testcase%3Dtest_stat?organizationId=ruby&work... -
04:23 AM Revision 357ae357 (git): Dump forwarding field of `struct rb_args_info` and `struct RNode_BLOCK_PASS`
07/24/2024
-
07:55 PM Revision 30eba40f (git): [rubygems/rubygems] Remove `to_yaml_properties`
- This is an old syck thing, no longer used anywhere.
https://github.com/rubygems/rubygems/commit/6f72d02bac -
07:19 PM Bug #20650 (Closed): Memory leak in Regexp capture group when timeout
- GitHub PR: https://github.com/ruby/ruby/pull/11238
The capture group allocates memory that is leaked when it times out.
For example:
```ruby
re = Regexp.new("^#{"(a*)" * 10_000}x$", timeout: 0.000001)
str = "a" * 1000000 + "x"... -
07:00 PM Bug #20433: Hash.inspect for some hash returns syntax invalid representation
- matz (Yukihiro Matsumoto) wrote in #note-10:
> IMO, this is a good chance to upgrade Hash#inspect format to adopt current Hash usage.
> ...
I wish we stayed with the hash rockets, sigh -
04:51 PM Revision 0d3ce312 (git): [ruby/openssl] Set time directly on the x509 store
- (https://github.com/ruby/openssl/pull/770)
Instead of an ivar, so other ossl functions that take a store will use the correct time when verifying
https://github.com/ruby/openssl/commit/21aadc66ae -
04:50 PM Revision 1388945f (git): [ruby/openssl] asn1: make ossl_asn1_get_asn1type() private
- The function is not used anywhere outside of ossl_asn1.c.
https://github.com/ruby/openssl/commit/5392b79941 -
04:50 PM Revision a1cf39bd (git): [ruby/openssl] x509attr: avoid using OpenSSL::ASN1 internals in #value=
- OpenSSL::ASN1 is being rewritten in Ruby. To make it easier, let's
remove dependency to the instance variables and the internal-use
function ossl_asn1_get_asn1type() outside OpenSSL::ASN1.
This also fixes the insufficient validation of ... -
04:24 PM Revision 575fe63e (git): [ruby/prism] Inherit ractor state for child scopes
- https://github.com/ruby/prism/commit/4576cb1d96
-
04:20 PM Revision d08e5514 (git): Make Integer#round spec work regardless of pointer size
- The spec is actually testing a behaviour stemming from NUM2INT(), and
since `sizeof(long)>=sizeof(int)`, `min_long-1` always makes NUM2INT()
raise `RangeError`. -
04:20 PM Revision 28382505 (git): Get fixnum_{min,max} from RbConfig::LIMITS when available
- It's better than guessing based on the pointer size if the
implementation provides it directly. -
04:20 PM Revision fbb981b9 (git): Stop depending on Integer#size to return `sizeof(long)`
- There is no guarantee that Integer#size will continue to return
`sizeof(long)` for small integers.
Use the `l!` specifier for Array#pack instead. It is a public
interface that has a direct relationship with the `long` type. -
04:20 PM Revision 12e6cf77 (git): Add "c_long_size" guard, supplanting "wordsize" and stop using Integer#size
- What a "word" is when talking about sizes is confusing because it's a
highly overloaded term. Intel, Microsoft, and GDB are just a few vendors
that have their own definition of what a "word" is. Specs that used the
"wordsize" guard actua... -
04:02 PM Revision 1a18b03e (git): [PRISM] Add anon_* flags for iseqs with anonymous * and **
-
01:45 PM Bug #20649 (Closed): Ripper fails to tokenize `def f; (x)::A =`
- Applied in changeset commit:git|97449338d6cb42d9dd7c9ca61550616e7e6b6ef6.
----------
[Bug #20649] Allow `nil` as 2nd argument of `assign_error`
Fallback to the last token element in that case, for the backward
compatibilities. -
12:32 PM Bug #20649: Ripper fails to tokenize `def f; (x)::A =`
- https://github.com/ruby/ruby/pull/11235
-
07:06 AM Bug #20649 (Closed): Ripper fails to tokenize `def f; (x)::A =`
- Ripper fails to tokenize some dynamic constant assignment syntax error code.
`''::A=` `(x)::A=` `(x).y::Z=` `[]::A=` `{}::A=` ``` ``::A=``` `//::A=` `%()::A=` in method body seems to fail.
Same for `for ''::A in` and `rescue => ''::A;`... -
01:44 PM Revision 0a9f771e (git): Don't check live slot count when multi-Ractor
-
01:18 PM Revision 97449338 (git): [Bug #20649] Allow `nil` as 2nd argument of `assign_error`
- Fallback to the last token element in that case, for the backward
compatibilities. -
12:36 PM Revision f69ba571 (git): Move RUBY_FREE_AT_EXIT check earlier
- Things that exit early, like `ruby -v`, could not use RUBY_FREE_AT_EXIT
because the check for RUBY_FREE_AT_EXIT was not executed. -
08:54 AM Feature #20621: Check libruby.so hardening by annocheck
- > BTW the question is if all *.so files or even all *.o files should be covered.
I agree on covering all the *.so files. I am not sure if we cover the "*.o" files. However, I think that can be after the PR https://github.com/ruby/ruby... - 08:16 AM Revision 993bb55d (git): Bump ruby/setup-ruby from 1.187.0 to 1.188.0
- Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.187.0 to 1.188.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](http... -
06:31 AM Bug #20647 (Closed): Invalid return in class/module body from within singleton class
- Applied in changeset commit:git|e642ddf7ae86e306674559ae745823fdbf56ea10.
----------
[Bug #20647] Disallow `return` directly within a singleton class -
02:48 AM Bug #20647: Invalid return in class/module body from within singleton class
- https://github.com/ruby/ruby/pull/11234
-
06:21 AM Feature #19979: Allow methods to declare that they don't accept a block via `&nil`
- This proposal is suspended due to the Syntax Moratorium. Since this might cause "no block policing" in the community, let me think while (at least til 3.5).
Matz.
-
05:44 AM Revision e642ddf7 (git): [Bug #20647] Disallow `return` directly within a singleton class
-
05:04 AM Revision f2f9d6ce (git): Fix test failure of e7610582ad8fd05655221b183257ed358c903ac8
-
01:45 AM Revision b4a02502 (git): [PRISM] Fix block param instructions when it has a recevier
- In the following code:
```ruby
def foo(&blk)
blk.call
end
```
Prism was using the `getblockparam` instruction but it should be
`getblockparamproxy`. In this case we have a receiver, if it's a local
variable read node, then it needs t... -
01:45 AM Revision 70d4dcb7 (git): [Prism] Use `putnil` for nil kwargs, not `putobject {}`
- This addresses one of the issues in the `test_kw_splat_nil` failure, but
doesn't make the test pass because of other changes that need to be made
to Prism directly.
One issue was when we have the following code Prism was using
`putobjec... -
12:02 AM Feature #14919 (Closed): Add String#byteinsert