Activity
From 01/11/2023 to 01/17/2023
01/17/2023
-
11:36 PM Bug #19297: Don't download content from internet to execute Ruby test suite
- We can add the option of skipping `test-syntax-suggest` to `make check`.
And Fedora can use `make test test-tool test-all test-spec` instead of `make check` for past behavior. -
07:48 PM Bug #19297: Don't download content from internet to execute Ruby test suite
- How about adding `make test-offline` and that only runs test suites which don't need any internet connection?
I think that's a better fix, those who want to test offline must accept they only test a subset, I'm confident Bundler will no... -
06:14 PM Bug #19297: Don't download content from internet to execute Ruby test suite
- For a fix on our side. We could:
## Switch to test-unit
Update `syntax_suggest` to use test unit instead of rspec (since it seems that works fine on other libraries).
This would be straight-forward, though tedious.
## Res... -
10:13 PM Feature #19333: Setting (Fiber Local|Thread Local|Fiber Storage) to nil should delete value in order to avoid memory leaks.
- Thanks for the code search link.
Regarding the usage, wouldn't it only matter if the variable was checked with `thread_variable?` or equivalent? Because `thread_variable_get(:x)` is `nil` regardless of whether it's set (to `nil`) or not... -
11:41 AM Feature #19333: Setting (Fiber Local|Thread Local|Fiber Storage) to nil should delete value in order to avoid memory leaks.
- There are some, yes, see https://github.com/search?q=%22Thread.current%5B%22+%22%5D+%3D+nil%22+language%3ARuby&type=code&l=Ruby
A better search with a Regexp: https://github.com/search?q=%2FThread.current%5C%5B.*%5C%5D+%3D+nil%2F+languag... -
06:40 AM Feature #19333: Setting (Fiber Local|Thread Local|Fiber Storage) to nil should delete value in order to avoid memory leaks.
- > The user might use nil as a "valid value"
Have you seen any examples of this? -
09:37 PM Bug #11230: Should rb_struct_s_members() be public API?
- I submitted a pull request to remove the prototype from the public header files: https://github.com/ruby/ruby/pull/7141
`rb_struct_s_members` is still an exported symbol as it is used internally by `marshal.c`.
One of reasons state... -
09:21 PM Revision a9bcc058 (git): Update yjit.md
-
07:58 PM Misc #19304: Kernel vs Object documentation
- Thanks for voicing that, @zverok! I always found this confusing (i.e., some methods being defined in Kernel, not in Object), and I'd love to see the docs reflect that in some form. (1) feels like the right thing to do, so what are the ro...
-
06:36 PM Feature #8827 (Closed): A method that flips the receiver and the first argument
-
06:32 PM Feature #8827: A method that flips the receiver and the first argument
- Since `then` has been introduced, I think using that is more straightforward. I withdraw this feature. Please close it.
-
06:07 PM Bug #19349: Kernel.Integer silently discards base argument that does not have a #to_int
- And likely related: in case the output of the call to `to_int` returns something that is not an integer, it gets discarded as well
```
Kernel.Integer('10', Object.new.tap { |x| x.define_singleton_method(:to_int) { '8' } })
=> 10
``` -
05:59 PM Bug #19349 (Closed): Kernel.Integer silently discards base argument that does not have a #to_int
- The method `Kernel.Integer` has an optional argument `base`, which is the base to convert the input to:
```
irb(main):001:0> Kernel.Integer('10', 8)
=> 8
```
If the base argument is not an integer, it is converted using `#to_int`
`... -
05:32 PM Bug #19334: Defining many instance variables and accessing them is slow in Ruby 3.2.0
- > An extra map/Hash per Shape to know which ivars it contains could work
Yeah that's more what I had in mind.
> ...
What about one every X shapes? This way you'd have to walk at most X shapes, and then to one hash lookup. X could b... -
03:53 PM Bug #19334: Defining many instance variables and accessing them is slow in Ruby 3.2.0
- byroot (Jean Boussier) wrote in #note-5:
> IIRC Aaron mentioned that V8 use a hash table after a certain number of edges (20?).
That's the complexity I'm talking about above which IMO is not worth it (that JS completely changes its o... -
02:32 PM Bug #19334: Defining many instance variables and accessing them is slow in Ruby 3.2.0
- > I suppose this could be dramatically improved by storing the iv_index inside each shape, at the expense of using a bit more memory.
Actually, nevermind, the iv_index is already in the shape. The reason it's particularly slow here is... -
02:26 PM Bug #19334: Defining many instance variables and accessing them is slow in Ruby 3.2.0
- Out of curiosity I profiled this script. 99% of the time is spent in `rb_shape_get_iv_index()`, which makes sense given that it walk back up the shape tree on every access, so the deeper the tree the longer it takes.
I suppose this co... -
04:46 PM Bug #19348 (Closed): GVL being released earlier than expected when loading iseqs - Applied in changeset commit:git|df6b72b8ff7af16a56fa48f3b4abb1d8850f4d1c.
----------
Avoid checking interrupt when loading iseq
The interrupt check will unintentionally release the VM lock when loading an iseq.
And this will cause issu... -
11:30 AM Bug #19348 (Closed): GVL being released earlier than expected when loading iseqs
- When using the `debug` gem in a Rails app with Ruby 3.2, I noticed that if the VS Code editor connects to the debugger during the app boot, this error could occur:
```
DEBUGGER: ReaderThreadError: uninitialized InstructionSequence
... - 01:01 PM Revision df6b72b8 (git): Avoid checking interrupt when loading iseq
- The interrupt check will unintentionally release the VM lock when loading an iseq.
And this will cause issues with the `debug` gem's
[`ObjectSpace.each_iseq` method](https://github.com/ruby/debug/blob/0fcfc28acae33ec1c08068fb7c33703cfa68... -
12:04 PM Bug #19293: The new Time.new(String) API is nice... but we still need a stricter version of this
- I think a new method is cleaner. Or maybe reusing `Time.iso8601`.
It feels a hack for Time.new two wildly different things based on the number of arguments and as shown here it's ambiguous.
I had the same concerns when Time.new start... -
11:55 AM Feature #19315: Lazy substrings in CRuby
- mame (Yusuke Endoh) wrote in #note-7:
> I don't disagree this proposal, but it would be nice if we could evaluate the effectiveness of this optimization.
https://github.com/ruby/net-protocol/pull/14 shows gains between 2% and 27%, an... -
03:53 AM Feature #19315: Lazy substrings in CRuby
- I heard that Java stopped the shared substring technique 10 years ago (https://www.infoq.com/news/2013/12/Oracle-Tunes-Java-String/) because of the potential for memory leaks
I don't disagree this proposal, but it would be nice if we ... -
09:57 AM Bug #19339 (Closed): Defining ivar on special constants with @ syntax causes segv
- Applied in changeset commit:git|ed6fbb79e19bf401db0e85447fee955fd10a25c7.
----------
Fix crash when defining ivars on special constants
[Bug #19339] - 09:57 AM Revision 9399352a (git): [rubygems/rubygems] Bump rb-sys in /test/rubygems/test_gem_ext_cargo_builder/custom_name
- Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.54 to 0.9.56.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.54...v0.9.56)
---
updated-depende... -
09:51 AM Revision ed6fbb79 (git): Fix crash when defining ivars on special constants
- [Bug #19339]
- 08:47 AM Revision f8249eb4 (git): Update default gems list at 492d37fbbd3613b7fb180eec529860 [ci skip]
-
08:46 AM Revision 492d37fb (git): [ruby/psych] Bump up 5.0.2.pre1 for testing
- https://github.com/ruby/psych/commit/67ec299c68
-
08:26 AM Revision dd510da8 (git): [ruby/psych] configure of libyaml couldn't detect "arm64-apple-darwin22" for build host.
- checking whether make sets $(MAKE)... (cached) yes
checking build system type... arm-apple-darwin21.6.0
checking host system type... Invalid configuration `arm64-apple-darwin21': machine `arm64-apple' not recognized
configure: erro... -
07:56 AM Revision 01e28afd (git): test-syntax-suggest is now part of make check
-
07:50 AM Revision aad1563c (git): Added make exam to help message
-
07:48 AM Revision da7818e6 (git): Added test-syntax-suggest to help message
- 07:19 AM Revision d7af0f60 (git): [rubygems/rubygems] Bump rb-sys
- Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.54 to 0.9.56.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.54...v0.9.56)
---
updated-depende... -
05:31 AM Revision ff3c1d9e (git): SimpleCov is hosted under simplecov-ruby org now
-
02:21 AM Revision 89cd6189 (git): merge revision(s) 542e984d82fa25098eb15398d716d907acc52b93: [Backport #19292]
- [Bug #19292] Re-initialize tm when wday or yday is not set
---
test/ruby/test_time.rb | 3 ++-
time.c | 31 ++++++++++++++++++++++---------
2 files changed, 24 insertions(+), 10 deletion... -
02:20 AM Revision 49cf0896 (git): merge revision(s) 90a80eb076429978e720e11fb17a3cbb96de3454: [Backport #19284]
- Fix integer underflow when using HEAP_INIT_SLOTS
There is an integer underflow when the environment variable
RUBY_GC_HEAP_INIT_SLOTS is less than the number of slots currently
in the Ruby heap.
[Bug #192... -
02:17 AM Feature #19346: Add Ractor escape hatch Ractor.disable_isolation_checks! { }
- Hi, thank you for replying. Rubygems is thread-safe but it doesn't work calling `require` inside a non-main ractor because the rubygems internal logic doesn't follow strict isolation protocol.
01/16/2023
-
11:04 PM Feature #19347: Add Dir.fchdir
- Having actually read the title of this issue, I see it's for implementing `fchdir`, not `openat` - but the point is the same, directory file descriptors are important to avoid some race conditions and Ruby doesn't really have a way to us...
-
11:01 PM Feature #19347: Add Dir.fchdir
- I have definitely wanted this before FWIW. The main use-case I've had for this feature is writing code to look at things in the `/proc` filesystem on Linux. If a process exits, its pid can be re-used, and so the same path in `/proc` can ...
-
10:51 PM Feature #19347 (Closed): Add Dir.fchdir
- Recently, I was working on a program that passes file descriptors over UNIX sockets (using `send_io`/`recv_io`). For file/socket/device descriptors, this works fine using `File#reopen`. However, I found that while Ruby supports `Dir#fi...
-
10:52 PM Misc #19240: DevMeeting-2023-01-19
- * [Feature #19347] Add Dir.fchdir (jeremyevans0)
* This method is useful when passing directory file descriptors through UNIX sockets or to child processes to avoid TOCTOU vulnerabilities.
* We already have Dir#fileno, but nothing ... -
10:32 PM Revision 14fe7a08 (git): YJIT: Use ThinLTO for Rust parts in release mode
- This reduces the code size of libyjit.a by a lot. On darwin it went from
23 MiB to 12 MiB for me. I chose ThinLTO over fat LTO for the relatively
fast build time; in case we need to debug release-build-only problems
it won't be painful. -
08:45 PM Revision b5725959 (git): addr2line.c: Silence GCC 11 false -Wmaybe-uninitialized warning
- No warnings from GCC 12.
-
07:25 PM Revision e22a1fbe (git): addr2line.c: Don't special-case DWARF 5 parsing with GCC
- While trying to fix YJIT's symbol hygiene issue over at GH-7115, I found
that addr2line.c's DWARF 5 parsing is half-disabled when building with
GCC. Rust's output contains some DW_AT_rnglists_base records, which the
disabled code reads. ... -
06:21 PM Feature #19346 (Rejected): Add Ractor escape hatch Ractor.disable_isolation_checks! { }
- This kind of escape hatch can break the Ractor's assumptions so it is not accepted.
For example, we are working on making ractor-local GC and in this case an object can not be reached from other ractors without special sharing logic.
... -
03:55 PM Feature #19346 (Rejected): Add Ractor escape hatch Ractor.disable_isolation_checks! { }
- It would be nice to be able to autoload constants inside Ractors. I'm not sure why this is disabled right now because if autoloading is working properly inside threads
then my initial thought is that the autoload implementation should w... -
05:09 PM Bug #19266: URI::Generic should use URI::RFC3986_PARSER instead of URI::DEFAULT_PARSER
- After a couple of weeks with no reply I wanted to ask if I could get at least one comment on this issue?
A quick summary of the issue:
* In 2014, `URI` was updated to use a new RFC3986-compliant parser by default instead of the pre... -
05:02 PM Revision 30bd2a32 (git): [DOC] Correction to RDoc for Regexp.new (#7130)
- Correction to RDoc for Regexp.new
-
03:37 PM Bug #19345: Class variable access from top-level inappropriate error
- Thanks for the explanation :) class_eval with string also works to change scope, apparently.
-
01:26 PM Bug #19345 (Closed): Class variable access from top-level inappropriate error
- Class variables work similar to constants in terms of lookup, they only use the scopes opened by `class Name/module Name/class << expr`.
`module_{eval,exec}/class_{eval,exec}` do not change that scope.
So this is expected, `EnvUtil.lab... -
04:50 AM Bug #19345: Class variable access from top-level inappropriate error
- I just looked into this some more and if we want to allow the above code to work then we need to change the way the class variable cache works right now. Right now because the lookup of the class where we set the @@variables is static, i...
-
03:59 AM Bug #19345 (Closed): Class variable access from top-level inappropriate error
- I was looking at doing something like this:
```ruby
set_cvar = EnvUtil.labeled_class("SetCVar") do
def self.set(val)
@@a = val
end
end
set_cvar.set(1) # fill write cache
set_cvar.freeze
set_cvar.set(2) # hit write cach... -
02:34 PM Bug #19339: Defining ivar on special constants with @ syntax causes segv
- Thank you for reporting this bug. I opened a PR with the fix here: https://github.com/ruby/ruby/pull/7129
-
01:59 PM Bug #19154: Specify require and autoload guarantees in ractors
- > I think require/autoload in a Ractor should simply be forbidden.
That would be a resolution for this ticket. -
01:41 PM Bug #19154: Specify require and autoload guarantees in ractors
- luke-gru (Luke Gruber) wrote in #note-2:
> As long as there's a mutex somewhere protecting these mutations it's safe. There is a mutex around rubygems require. I only had to add `Ractor.force_shareable!` to 2 or 3 places in the rubygems ... -
01:46 PM Bug #17420: Unsafe mutation of $" when doing non-RubyGems require in Ractor
- @ko1 I believe this needs to be an exception until there is a better solution.
It's likely possible to create a segfault with concurrent mutations of `$"` currently.
And anyway `require` does not work in non-main Ractors, not just `$"`... -
11:53 AM Feature #19333: Setting (Fiber Local|Thread Local|Fiber Storage) to nil should delete value in order to avoid memory leaks.
- The current solution/workaround to both of these memory leaks is to use concurrent-ruby's [ThreadLocalVar](https://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/ThreadLocalVar.html) (and upcoming FiberLocalVar), which is t...
-
09:53 AM Feature #19333: Setting (Fiber Local|Thread Local|Fiber Storage) to nil should delete value in order to avoid memory leaks.
- While the proposed idea is a good move in the right direction, it doesn't handle cases where several (a large number) threads all have the SAME thread local, and that thread local goes out of scope, e.g.
```ruby
name = ":local-#{object_... -
10:44 AM Revision a2748c50 (git): [DOC] Update `String#encode` special case
- This behavior has been slightly extended with the addition of
`String#scrub`. -
09:52 AM Misc #18976: [ANN] blade.nagaokaut.ac.jp is down
- I restored `ruby-talk` archives today. Sorry, I forgot to do it.
-
07:47 AM Bug #19342 (Closed): String#encode does not always throw exceptions for invalid source encodings
- I fixed the documentation (which was moved to doc/string/encode.rdoc by @nobu in commit:468ce1488d) in commit:11f28f3268. I think that this issue can therefore be closed.
-
12:55 AM Bug #19342: String#encode does not always throw exceptions for invalid source encodings
- This was discussed in issue 6190. As you already say, it's somehow a weird case. The decision was to make transcoding from an encoding to the same encoding a no-op for performance. There was also some documentation (now in git commit com...
-
07:30 AM Revision 11f28f32 (git): [DOC] Explain that transcoding to the same encoding just copies.
- This is a reenstatement of the explanation in commit
463633e4a934a00f869086a6ffbf84c6cb8ad630 to partially
address Bug #19342. -
07:22 AM Feature #19344: Regexp.new: stricter handling of second argument
- It is already warned with `$VERBOSE`, and this make to raise `ArgumentError`.
```diff
diff --git a/re.c b/re.c
index 7a743185589..f03c2b48a1e 100644
--- a/re.c
+++ b/re.c
@@ -3866,7 +3866,7 @@ reg_extract_args(int argc, VALUE *ar... -
05:19 AM Feature #19325: YJIT: Windows support lacking.
- Hello everyone!
First, let me thank you for all your work! Ruby on Windows has helped me a lot over the years. Gems with C extensions used sometimes fail to install, but nowadays it works. Ruby Installer with MSYS2 actually works quite ... -
04:38 AM Revision 468ce148 (git): [DOC] Use RDoc inclusions in transcode.c
-
03:33 AM Bug #19340: Ruby master 'make install' not installing rbs gem
- From the ruby-loco log, which has the Ruby PR applied:
```
Copying rbs@eab5367add3469b3f614e663ba43a3debc62420a to rbs-3.0.0.dev.1
From https://github.com/ruby/rbs
* branch eab5367add3469b3f614e663ba43a3debc62420a... -
02:44 AM Bug #19340: Ruby master 'make install' not installing rbs gem
- I couldn't reproduce it.
And What should we install their versions?
1. rbs of eab5367add3469b3f614e663ba43a3debc62420a(not 3.0.0.dev.1)
2. 3.0.0.dev.1
3. rbs-2.8.3
4. Nothing, We skip to install rbs because there is no tested ve...
01/15/2023
-
11:00 PM Revision 4617b40f (git): fix typo in comments / autodoc
- replace _socktype_ with _type_ in the comments
-
05:10 PM Feature #19344 (Open): Regexp.new: stricter handling of second argument
- Since Ruby 3.2 (#18788), the second argument to `Regexp.new` can be:
1. Integer: then it is treated as a combination of `Regexp::<constant>` flags
2. String: then it is treated as a combination of string flags
3. `nil` or `false`: the... -
02:57 PM Revision 6698b580 (git): Clear gem paths for each test
- So that rubygems can find the bundled rake.
-
08:21 AM Revision 088132fb (git): Do not depend on `REVISION_H`
- Disable for now, since this seems causing infinite rebuilding.
-
07:54 AM Bug #19154: Specify require and autoload guarantees in ractors
- I've also got parallel references to constant for which there is autoload working, with a few tweaks to the VM needed.
```ruby
rs = []
autoload :C, './test3.rb'
1000.times do
rs << Ractor.new do
C
C
C
end
end
p rs.map(&... -
01:33 AM Bug #19154: Specify require and autoload guarantees in ractors
- I've taken a look at this a bit and got this working:
```ruby
require 'rubygems' # get rubygems version of require
rs = []
100.times do
rs << Ractor.new do
require './c.rb'
end
end
rs.each(&:take)
p C
```
In file c.rb, it's
```r... -
07:02 AM Bug #19343 (Closed): Integer#ceildiv should respect #coerce
- https://github.com/ruby/ruby/pull/7118
This issue is similar to #19335.
```Ruby
c = Object.new
def c.coerce(other) = [other, 10]
p 1234 / c # => 123
p 1234.div(c) # => 123
p 1234.quo(c) # => (617/5)
p 1... -
05:24 AM Bug #19342 (Closed): String#encode does not always throw exceptions for invalid source encodings
- Documentation says that String#encode throws Encoding::InvalidByteSequenceError when the string isn't valid in the source encoding, but it does not always do so:
```
"\x99".encode('UTF-8', 'UTF-8')
"\x99".force_encoding('UTF-8').enc... -
04:03 AM Bug #19335 (Closed): Integer#remainder and Numeric#remainder should respect #coerce
- Applied in changeset commit:git|71ce7e1825c5b8fe08dd96cd77c6a379afd34256.
----------
[Bug #19335] `Integer#remainder` should respect `#coerce` (#7120)
Also `Numeric#remainder` should. -
04:03 AM Revision 71ce7e18 (git): [Bug #19335] `Integer#remainder` should respect `#coerce` (#7120)
- Also `Numeric#remainder` should.
01/14/2023
-
09:56 PM Bug #19341 (Closed): Write cache issue with class variables
- ``` ruby
class SetCvar
def self.set(val)
@@a = val # inline cache
end
end
def test_set_cvar_on_frozen_object
SetCvar.set(1) # fill write cache
SetCvar.freeze
SetCvar.set(2) # hit write cache, but should check fro... -
09:22 PM Bug #19340 (Closed): Ruby master 'make install' not installing rbs gem
- Last three daily builds of ruby-dev-builder have not included the rbs gem.
See https://github.com/ruby/ruby-dev-builder/actions/runs/3919887598/jobs/6701177359#step:17:284
ruby/ruby PR https://github.com/ruby/ruby/pull/7114
ruby... -
09:02 PM Bug #19339 (Closed): Defining ivar on special constants with @ syntax causes segv
- ```ruby
1.instance_eval do
@a = 1
end
```
There's a missing check at the top of vm_setivar_fastpath, should be:
```c
if (UNLIKELY(RB_SPECIAL_CONST_P(obj))) { // example code: 1.instance_eval { @a = 1 }
rb_check_... -
06:48 PM Bug #19338: Ruby hangs when ouputting warnings inside ractor with VM lock held
- To simplify the problem, this hangs too:
```ruby
MYCONSTANT = 1
Ractor.new do
MYCONSTANT = 2
end.take
```
-
06:15 PM Bug #19338 (Closed): Ruby hangs when ouputting warnings inside ractor with VM lock held
This code causes Ruby to hang:
``` ruby
rs = []
2.times do
rs << Ractor.new do
MYCONSTANT = 2
end
end
rs.each(&:take)
```
There is a problem when the warning is being outputted with multiple ractors. A thread is c...-
11:30 AM Revision 1ddeb747 (git): Move the dependency of makefiles on revision header [ci skip]
- Since `REVISION_H` is defined in common.mk which is appended or
included after Makefile.in, it was undefined yet at the point of the
dependency. -
09:19 AM Revision 5b26f76a (git): [ruby/reline] Correspond to refactored RubyLex
- (https://github.com/ruby/reline/pull/498)
* Correspond to refactored RubyLex
ref: https://github.com/ruby/irb/pull/503
* Fix test_yamatanooroti -
09:19 AM Revision cb9b885e (git): [ruby/irb] Store context in RubyLex
- Some background for this refactor:
1. Through a RubyLex instance's lifetime, the context passed to its methods
should be the same.
Given that `Context` is only initialised in `Irb#initialize`,
this should be true.
2. When `Rub... -
09:13 AM Bug #19337: What is the difference between "default" gems and "bundled" gems?
- This is likely dupe of my #18381, which was not addressed yet.
-
07:40 AM Bug #19337 (Closed): What is the difference between "default" gems and "bundled" gems?
- Although I found [some answers](https://nts.strzibny.name/ruby-stdlib-default-bundled-gems/) on the [internet](https://stdgems.org), it seems like this information should be available from Ruby itself, if it's not already.
Perhaps thi... -
01:24 AM Revision 2082ba7c (git): [ruby/psych] Remove deleted file from gemspec
- https://github.com/ruby/psych/commit/77861ff281
01/13/2023
-
08:32 PM Revision b4cdde46 (git): YJIT: Use SIZEOF_VALUE_I32 instead of `... as i32`
- Shorter, and easier to parse without parentheses.
-
08:32 PM Revision 84b1f488 (git): YJIT: Factor out VALUE_BITS = (8 * SIZE_OF_VALUE as u8)
- Using a constant shows intention better and is less noisy. It always
took me a second to parse the long expression. -
05:48 PM Bug #19334: Defining many instance variables and accessing them is slow in Ruby 3.2.0
- mame (Yusuke Endoh) wrote in #note-2:
> I didn't explain the problem properly. The code takes a super-linear time for the number of instance variables: 50k ivars take 3.5 sec., 100k do 15 sec., and 200k do 60 sec. Is this intentional? I... -
05:37 PM Bug #19334: Defining many instance variables and accessing them is slow in Ruby 3.2.0
- I didn't explain the problem properly. The code takes a super-linear time for the number of instance variables: 50k ivars take 3.5 sec., 100k do 15 sec., and 200k do 60 sec. Is this intentional? I think something unexpected is happening....
-
04:34 PM Bug #19334: Defining many instance variables and accessing them is slow in Ruby 3.2.0
- Is there real code doing this?
Otherwise IMHO it's complexity and significant footprint increase to solve an irrelevant issue (misuse of instance variables). -
03:31 PM Revision 8a93e5d0 (git): Use str_enc_copy_direct to improve performance
- str_enc_copy_direct copies the string encoding over without checking the
frozen status of the string. Because we know that we're safe here (we
only use this function when interpolating strings on the stack via a
concatstrings instruction... -
03:31 PM Revision 2605615f (git): Benchmark String interpolation across size pools
-
03:31 PM Revision bb5fddd0 (git): Remove MIN_PRE_ALLOC_SIZE from Strings.
- This optimisation is no longer helpful now that we use VWA to allocate
strings in larger size pools where they can be embedded. -
03:06 PM Bug #19335: Integer#remainder and Numeric#remainder should respect #coerce
- https://github.com/ruby/ruby/pull/7120
-
04:09 AM Bug #19335: Integer#remainder and Numeric#remainder should respect #coerce
- Sounds reasonable.
-
03:16 AM Bug #19335 (Closed): Integer#remainder and Numeric#remainder should respect #coerce
- Thinking of the result of the following, `Integer#remainder` and `Numeric#remainder` should respect `#coerce`.
(`BigDecimal#remainder` seems to respect `#coerce`.)
```Ruby
c = Object.new
def c.coerce(other)
[other, 10]
end
p... -
11:34 AM Revision fc7f8520 (git): [DOC] Add gem lists to NEWS.md automatically
-
11:34 AM Revision 447f8f7a (git): [DOC] Changed gem list style in NEWS.md
-
11:34 AM Revision 3ecffae8 (git): [DOC] Extract tool/update-NEWS-gemlist.rb
-
10:19 AM Bug #19331: --enable-rpath results in incorrect RPATH in Ruby 3.1.3+
- I think I found it. The difference is in whether ruby already available on a given machine is detected/how it's used.
I found out that while 3.1.2 generated the `enc.mk` was generated like this:
`./miniruby -I./lib -I. -I.ext/common ... -
08:43 AM Bug #19331: --enable-rpath results in incorrect RPATH in Ruby 3.1.3+
- nobu (Nobuyoshi Nakada) wrote in #note-1:
> I tried the exactly same commands on Ubuntu 22.04, but couldn't reproduce the result of `grep`.
That's interesting (and unexpected) - let me investigate it more.
-
08:25 AM Revision 94d6d6d9 (git): [ruby/error_highlight] Identify which node in `Foo::Bar::Baz` causes a NameError
- In Ruby 3.2 or later, a nested constant access like `Foo::Bar::Baz` is
compiled to one instruction by the optimization https://github.com/ruby/ruby/pull/6187
We try to spot which sub-node caues a NameError in question based on the
const... -
07:38 AM Bug #19336 (Closed): Backport commit eab7f4623fbf0488e828b75843d70c8e02dc8aa5
- This commit fix a potential VM crash when profiling.
-
03:26 AM Revision 5b36fefc (git): Skip time-related assertions on /dev/null
-
01:28 AM Revision 7e8802fa (git): fix `unused variables` warning
- Now `ccs` is not needed there.
-
01:11 AM Bug #4040 (Closed): SystemStackError with Hash[*a] for Large _a_
- Applied in changeset commit:git|2e7bceb34ea858649e1f975a934ce1894d1f06a6.
----------
Do not use VM stack for splat arg on cfunc
On the cfunc methods, if a splat argument is given, all array elements
are expanded on the VM stack and it ... -
01:11 AM Revision eab7f462 (git): Return 0 if there is no CFP on the EC yet
- StackProf uses a signal handler to call `rb_profile_frames`. Signals
are delivered to threads randomly, and can be delivered after the thread
has been created but before the CFP has been established on the EC.
This commit returns early... -
12:46 AM Revision 391d4310 (git): [DOC] Fix markup [ci skip]
-
12:30 AM Revision 2e7bceb3 (git): Do not use VM stack for splat arg on cfunc
- On the cfunc methods, if a splat argument is given, all array elements
are expanded on the VM stack and it can cause SystemStackError.
The idea to avoid it is making a hidden array to contain all parameters
and use this array as an argv....
01/12/2023
-
10:48 PM Misc #19240: DevMeeting-2023-01-19
- - [Feature #19333] Setting (Fiber Local|Thread Local|Fiber Storage) to nil should delete value in order to avoid memory leaks.
-
07:57 AM Misc #19240: DevMeeting-2023-01-19
- * [Bug #18658] Need openssl 3 support for Ubuntu 22.04 (Ruby 2.7.x and 3.0.x)
* Should we merge openssl-3.0.x into `ruby_3_0` before moving security only maintenance phase?
-
08:18 PM Revision 537183cd (git): Fix write barrier order for `klass` to `cme` edge
- Previously, the following crashes with
`CFLAGS=-DRGENGC_CHECK_MODE=2 -DRUBY_DEBUG=1 -fno-inline`:
$ ./miniruby -e 'GC.stress = true; Marshal.dump({})'
It crashes with a write barrier (WB) miss assertion on an edge from the
`Hash` c... -
08:09 PM Revision da7e5c7b (git): YJIT: Do not refer to an undefined constant (#7112)
-
03:25 PM Bug #19331 (Feedback): --enable-rpath results in incorrect RPATH in Ruby 3.1.3+
- I tried the exactly same commands on Ubuntu 22.04, but couldn't reproduce the result of `grep`.
And the command to build windows_31j.so seems using the expected options.
```
gcc -shared -o .ext/x86_64-linux/enc/windows_31j.so enc/... - 03:14 PM Revision 8d3ff663 (git): Enable `clippy` checks for yjit in CI (#7093)
- * Add job to check clippy lints in CI
* Address all remaining clippy lints
* Check lints on arm64 as well
* Apply latest clippy lints
* Do not exit 0 on clippy warnings -
02:06 PM Revision bfc887f3 (git): Add str_enc_copy_direct
- This commit adds str_enc_copy_direct, which is like str_enc_copy but
does not check the frozen status of str1 and does not check the validity
of the encoding of str2. This makes certain string operations ~5% faster.
```ruby
puts(Benchma... -
11:49 AM Revision 207f8d00 (git): [ruby/irb] Avoid calling private methods on the main object
- (https://github.com/ruby/irb/pull/498)
When the main object is frozen, `IRB` wraps a `SimpleDelegator` around it.
But because `SimpleDelegator` doesn't delegate private methods, methods like
`require_relative` or `const_get` would cause... - 10:34 AM Revision 3faecaaa (git): Update bundled gems list at b7598b535e49d316110aa96542a746 [ci skip]
-
10:33 AM Revision b7598b53 (git): Bump up typeprof-0.21.4
-
10:33 AM Revision 633fde41 (git): Try to use https://github.com/ruby/rbs/pull/1207
-
10:30 AM Revision 019c6582 (git): [ruby/irb] Remove redundant argument defaults from some RubyLex
- methods
(https://github.com/ruby/irb/pull/502)
* Remove unnecessary parameter defaults
These methods are always called with tokens specified. So their default
`@tokens` value is never used and is misleading.
* Remove unnecessary conte... - 09:40 AM Revision aa665958 (git): [ruby/reline] Update to Unicode 15.0.0
- (https://github.com/ruby/reline/pull/437)
* Update to Unicode 14.0.0
* Update to Unicode 15.0.0 -
07:14 AM Revision d4a3882c (git): Assert possible hash functions in RHASH_ST_TABLE (#7107)
- Because of the function pointer, it's hard to figure out what hash
functions could be used in Hash objects when st_lookup is used.
Having this assertion makes it easier to understand what
hash_stlike_lookup could possibly do. (AR uses o... -
05:41 AM Revision a8537eae (git): [ruby/mutex_m] Avoid anonymous eval
- It makes it hard to locate code when profiling etc.
https://github.com/ruby/mutex_m/commit/8760ab19ec -
05:38 AM Revision 0e21c9f5 (git): [ruby/mutex_m] Drop to support Ruby 2.4
- https://github.com/ruby/mutex_m/commit/9245b9a63a
-
04:41 AM Feature #19322: Support spawning "private" child processes - "kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core" <ruby-core@ml.ruby-lang.org> wrote:
> 2. Programs doing `waitpid -1` are widely deployed, it would
> be good if, when writing gems, there were APIs we could use
> which offer better is... -
02:20 AM Feature #19322: Support spawning "private" child processes
- > In the example you shown, I believe it's none of Unicorn's business to reap arbitrary processes
Firstly, I do want to note that I don't think this is just a Unicorn problem. This is the "classic unix" way of writing a preforking poo... -
12:11 AM Feature #19322: Support spawning "private" child processes - "Eregon (Benoit Daloze) via ruby-core" <ruby-core@ml.ruby-lang.org> wrote:
> IMHO this sounds like some code is doing bad stuff and not
> properly caring about its own resources.
>
> In the example you shown, I believe it's none of... -
02:11 AM Bug #19334 (Closed): Defining many instance variables and accessing them is slow in Ruby 3.2.0
- ```
class C
eval("def initialize; #{ (0..100000).map { "@x#{ _1 } = 0; " }.join } end")
attr_reader :x50000
end
p :start
C.new.x50000
```
This script takes less than one second in Ruby 3.1.3, and does more than ten second i... -
01:46 AM Revision fe11bee5 (git): Suppressing installation messages with test-bundler
- Ignoring the following messages:
```
(snip)
-e 'load "spec/bundler/support/bundle.rb"' -- install --gemfile=tool/bundler/dev_gems.rb
Using rake 13.0.6
Using bundler 2.5.0.dev
Using diff-lcs 1.5.0
Usin... -
01:26 AM Bug #19254 (Third Party's Issue): Enabling YJIT configuration option breaks rspec-core test suite
-
01:15 AM Revision 617b3f69 (git): enhance build matrix
-
01:11 AM Feature #19075: Binary searching for the last element
- I have thought about this issue and am now leaning toward `bsearch(target: :last)`.
I proposed `bsearch_last` at first, this is because I didn't think of an optional keyword argument for `bsearch`.
Since searching the beginning and t... -
12:29 AM Revision cc15963a (git): Strip trailing spaces [ci skip]
-
12:14 AM Revision 0abb4b63 (git): [ruby/reline] Pass unmodifined lines(that does not include escape
- sequence) to check_multiline_prompt
(https://github.com/ruby/reline/pull/458)
* pass unmodified lines to check_multiline_prompt
* Add test to check that output modified by output_modifier_proc is not passed to prompt_proc
01/11/2023
-
10:54 PM Revision 048751dd (git): Generate parser-text.rb with bcdc058e50674aedb180eea91e0fdb15bcf529db
-
10:52 PM Revision bcdc058e (git): [ruby/racc] Get rid of anonymous eval calls
- Things declared in anonymous eval are always annoying to locate.
(profilers, etc)
https://github.com/ruby/racc/commit/f304205256 -
10:52 PM Revision 11e15b4d (git): [ruby/racc] Make racc Ractor compatible
- https://github.com/ruby/racc/commit/1948de9d1d
-
10:29 PM Revision 7e283c58 (git): [ruby/irb] Formatting to header styles
- https://github.com/ruby/irb/commit/cef125850d
-
10:29 PM Revision 128398e7 (git): [ruby/irb] After Ruby 2.0, coding is always utf-8
- https://github.com/ruby/irb/commit/7a94bc4135
-
10:29 PM Revision c7bb8d67 (git): [ruby/irb] Removed Release Version and Revisions for old VCS software
- https://github.com/ruby/irb/commit/07fae94862
-
10:21 PM Feature #19333 (Open): Setting (Fiber Local|Thread Local|Fiber Storage) to nil should delete value in order to avoid memory leaks.
- As it stands, Fiber Locals, Thread Locals and Fiber Storage have no way of deleting key-value associations.
```ruby
100.times do |i|
name = :"variable-#{i}"
Thread.current[name] = 10
end
```
Because of this, dynamically ge... -
09:26 PM Revision c693dfd7 (git): [ruby/irb] Drop unused arguments in `RubyLex`
- (https://github.com/ruby/irb/pull/504)
* Simplify `RubyLex#set_prompt`
It's optional argument is never used by any caller.
* Remove the optional `p` argument from `RubyLex#set_input`
The argument is only used in a test case, which ca... -
07:39 PM Feature #19322: Support spawning "private" child processes
- Also the hacks for MJIT in process.c are already infamous, let's not add on top of it and force every Ruby implementation to have such complexity please.
-
07:38 PM Feature #19322: Support spawning "private" child processes
- IMHO this sounds like some code is doing bad stuff and not properly caring about its own resources.
In the example you shown, I believe it's none of Unicorn's business to reap arbitrary processes, it doesn't compose (I could be wrong,... -
08:01 AM Feature #19322: Support spawning "private" child processes
- So I ran into a pretty serious snag when trying to implement my idea with Linux pidfds - you can make a hidden process which is unwaitable & doesn't raise SIGCHLD, but if that process exec's, those special properties go away and it goes ...
-
07:12 PM Revision 36420068 (git): YJIT: Add a few asm comments (#7105)
- * YJIT: Add a few asm comments
* YJIT: Clarify exiting insns
* YJIT: Fix cargo test -
06:09 PM Bug #19254: Enabling YJIT configuration option breaks rspec-core test suite
- I agree with mame that the test is highly questionable.
The GC does not guarantee collection for all semantically unreachable objects since it's not exact.
Because we scan the native stack for conservative marking, changes in code genera... -
04:33 PM Bug #19254: Enabling YJIT configuration option breaks rspec-core test suite
- k0kubun (Takashi Kokubun) wrote in #note-2:
> ```
> ...
I have not hit the issue trying to run just this minimal example -
06:01 PM Revision ad5ab0c3 (git): Remove unnecessary set of INVALID_SHAPE_ID in rb_callcache
- We don't use this value, so there's no need to set it.
-
05:18 PM Bug #19332: Thread::Queue#pop raises ArgumentError with
- Oh thanks Jeremy!
-
05:13 PM Bug #19332 (Closed): Thread::Queue#pop raises ArgumentError with
- The documentation shows that `non_block` is a positional argument, not a keyword argument. You want `q.pop(true)`.
-
04:42 PM Bug #19332 (Closed): Thread::Queue#pop raises ArgumentError with
- ✓ ruby --version
ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux]
✓ irb
Ignoring debug-1.7.1 because its extensions are not built. Try: gem pristine debug --version 1.7.1
Ignoring rbs-2.8.2 because its extensions are not b... -
04:06 PM Revision abff5f62 (git): Move classpath to rb_classext_t
- This commit moves the classpath (and tmp_classpath) from instance
variables to the rb_classext_t. This improves performance as we no
longer need to set an instance variable when assigning a classpath to
a class.
I benchmarked with the f... -
04:06 PM Revision d86833e7 (git): Make variation_count an unsigned char
- Since SHAPE_MAX_VARIATIONS is 8, it can easily fit inside an unsigned
char. -
03:48 PM Feature #19324: Enumerator.product => Enumerable#product
- zverok (Victor Shepelev) wrote in #note-4:
> [I]s there a design plan to change _many_ of the methods (`Array.product` in addition to `Enumerable.product`, `Array.zip`, `Hash.merge`, I dunno, maybe even `Array.concat`?..) to the `Module.... -
08:47 AM Feature #19324: Enumerator.product => Enumerable#product
- First, I just looked through codebases at my disposal, and it seems that for `product` there are at least as many examples where the first argument _has_ a special meaning as those where it doesn't. Examples are like:
```ruby
user_name... -
03:09 AM Feature #19324: Enumerator.product => Enumerable#product
- As @duerst mentioned, it is sometimes noted that `Array#product` and `Array#zip` are ugly and inconvenient due to its asymmetry.
https://bugs.ruby-lang.org/issues/8970
https://bugs.ruby-lang.org/issues/6499
I don't think we have ... -
02:29 PM Bug #19331 (Feedback): --enable-rpath results in incorrect RPATH in Ruby 3.1.3+
- I just updated Ruby from 3.1.2 to 3.1.3 and found out that all .so libraries from the enc directory have wrong RPATH/RUNPATH (when building with `--enable-rpath`). I first hit this on Solaris, but my testing on Linux resulted in the same...
-
02:25 PM Revision a4682139 (git): [DOC] Mention the conditional regexp
-
02:16 PM Revision ac8cf010 (git): Remove check for RCLASS_EXT in variable.c
- A class/module should always have a RCLASS_EXT, so we shouldn't need to
check that it exists. -
12:41 PM Revision 327cf5ec (git): Skip rbs Encoding#replicate test
-
12:41 PM Revision 6abe20e8 (git): Remove Encoding#replicate
- 11:38 AM Revision d831b1d5 (git): [ruby/reline] Reset IOGate in test_reset
- https://github.com/ruby/reline/commit/331c1094ef
- 11:38 AM Revision 4222083c (git): [ruby/reline] Change IOGate back to GeneralIO
- Staying with ANSI can cause side effects with other tests.
https://github.com/ruby/reline/commit/ba36067802 -
11:00 AM Revision b311c35b (git): Suppressing pending messages with RSpec
-
10:08 AM Revision 3161fd43 (git): [ruby/psych] Get rid of anonymous eval calls
- Things declared in anonymous eval are always annoying to locate.
https://github.com/ruby/psych/commit/38871ad4e5 -
09:26 AM Revision e85ef212 (git): [ruby/set] Avoid the `block or return` pattern to save Proc allocations
- Using the block param in a boolean context like this cause it to be
allocated.
Using it with an `if` or `unless` was optimized in 3.2
(https://github.com/ruby/ruby/pull/6286) but using it with `or`
or `and` wasn't.
```ruby
def foo(&blo... -
09:09 AM Revision 8c2b6926 (git): Skip unfixed assertion about objspace/dump_all
- ```
{"address":"0x7f8c03e9fcf0", "type":"STRING", "shape_id":10, "slot_size":40, "class":"0x7f8c00dbed98", "frozen":true, "embedded":true, "fstring":true, "bytesize":5, "value":"TEST2", "encoding":"US-ASCII", "coderange":"7bit", "memsize... -
09:05 AM Revision 2038c5c4 (git): Remove about ext/psych/yaml which is no longer bundled [ci skip]
-
03:12 AM Bug #19330 (Closed): ruby 3.2.0 parameter lack-of-autosplat breaks call using (*args, &block)
- rockorequin (rocko requin) wrote:
> The following code in Rails 6.1.7 activerecord relation.rb no longer works with ruby 3.2.0, because the call "instance_exec(*args, &block)" raises an ArgumentException:
> ...
This code is expected to... -
02:37 AM Bug #19330 (Closed): ruby 3.2.0 parameter lack-of-autosplat breaks call using (*args, &block)
- The following code in Rails 6.1.7 activerecord relation.rb no longer works with ruby 3.2.0, because the call "instance_exec(*args, &block)" raises an ArgumentException:
```
def _exec_scope(*args, &block) # :nodoc:
@delegate_to_kla...