Activity
From 05/05/2022 to 05/11/2022
05/11/2022
- 10:53 PM Revision 9f9a0940 (git): Quick markup fix
-
10:53 PM Revision f6cc4b97 (git): Write Thread instead of Threade
-
09:02 PM Feature #18776 (Closed): Object Shapes
- # Object Shapes implementation
Aaron Patterson, Eileen Uchitelle and I have been working on an implementation of Object Shapes for Ruby. We are filing a ticket to share what we've been doing, as well as get feedback on the project in... -
08:43 PM Feature #18774: Add Queue#pop(timeout:)
- > shouldn't we also consider a hypothetical Queue::TimeoutError
IMHO, consistency with closed queues is really more important.
> ...
@eregon just beat me to it, but whenever I can I actually use non-exception versions of methods th... -
08:39 PM Feature #18774: Add Queue#pop(timeout:)
- If others feel strongly it should be an exception, I think it should be `Thread::TimeoutError` (we already have `Timeout::Error`, `Regexp::TimeoutError` and probably `IO::TimeoutError` in #18630).
I'd inherit from `StandardError` as tha... -
08:36 PM Feature #18774: Add Queue#pop(timeout:)
- I also think `nil` can work, but shouldn't we also consider a hypothetical `Queue::TimeoutError` similar to how all other timeouts work? Although I hate using exceptions for non-exceptional code paths.
-
08:29 PM Feature #18774: Add Queue#pop(timeout:)
- Indeed, I forgot to mention that. I think returning `nil` is easiest, most consistent and convenient.
I believe it is already common practice to use another element than `nil` in a Queue for special markers, so it seems a rare issue in ... -
07:51 PM Feature #18774: Add Queue#pop(timeout:)
- In https://bugs.ruby-lang.org/issues/17363 there was some discussion on what the return value or exception should be when timeout is reached, and it seems to be part of why the discussion stalled.
@ko1 said:
> return nil -> can't r... -
07:38 PM Feature #18774 (Closed): Add Queue#pop(timeout:)
- This has been mentioned many times but somehow was never added.
It is useful for many different use cases:
* Implementing Timeout#timeout without needing to create a Thread per call which is very inefficient (especially when the timeou... -
07:58 PM Bug #18775 (Closed): Backport ef525b012a709077ea2797e8642fae0b61234063
- Ref: https://github.com/ruby/ruby/pull/5892
cc @ioquatix
This bug can cause Ruby 3.1.2 to crash with a `[BUG] object allocation during garbage collection phase`. Seems worth backporting. -
07:54 PM Bug #18772 (Closed): Backport edf01d4e82d8e44ee30ec41fbcb7f802bc8b8c5d
-
02:41 PM Bug #18772 (Closed): Backport edf01d4e82d8e44ee30ec41fbcb7f802bc8b8c5d
- I believe edf01d4e82d8e44ee30ec41fbcb7f802bc8b8c5d should be backported to Ruby 3.0
Ref: https://github.com/msgpack/msgpack-ruby/pull/281 -
07:40 PM Misc #18747: DevMeeting-2022-05-19
- * [Feature #18774] Add Queue#pop(timeout:) (eregon)
* OK?
* Anyone wants to implement it for CRuby?
-
11:44 AM Misc #18747: DevMeeting-2022-05-19
- - [Feature #14602] Version of `dig` that raises error if a key is not present
- Proposed names: in the issue `deep_fetch`, `dig!`, `dig(..., exception: true)`
- My preference would go to `deep_fetch`, but maybe we can find better?
... - 07:13 PM Revision 26a07b8b (git): Add a separate doc for contributing to stdlibs [ci skip]
- co-authored-by: Peter Zhu <[email protected]>
-
07:11 PM Revision 01916934 (git): [ruby/fileutils] Update lib/fileutils.rb
- https://github.com/ruby/fileutils/commit/4771925fee
Co-authored-by: Peter Zhu <[email protected]> -
07:11 PM Revision dbca60c5 (git): [ruby/fileutils] Enhanced RDoc for FileUtils
- https://github.com/ruby/fileutils/commit/a0ea474214
-
06:29 PM Feature #14602: Version of dig that raises error if a key is not present
- duerst (Martin Dürst) wrote in #note-2:
> Would a keyword parameter to dig work for you?
> ...
Keyword approach is not backwards compatible, because keywords are currently treated as positional arguments:
```ruby
{:name=>{:middle=>... -
06:12 PM Feature #14602: Version of dig that raises error if a key is not present
- Just a bit of "design space" analysis:
1. I think `dig!` is unusual for core Ruby. A lot of Rubyists are used that in Rails pairs like `find_by`/`find_by!` are raising/non-raising, but I don't remember any Ruby core API using this con... -
05:54 PM Revision 4da0f7a7 (git): [ruby/rdoc] Fix dead link in RDoc::Markup
- https://github.com/ruby/rdoc/commit/521c9ebd29
-
05:13 PM Feature #18773 (Rejected): deconstruct to receive a range
- Currently when you're pattern matching against a hash pattern, `deconstruct_keys` receives the keys that are being matched. This is really useful for computing expensive hashes.
However, when you're pattern matching against an array p... - 03:20 PM Revision 4978c486 (git): * 2022-05-12 [ci skip]
- 03:20 PM Revision e88ada46 (git): Ruby shovel operator (<<) speedup. (#5896)
- For string concat, see if compile-time encoding of strings matches.
If so, use simple buffer string concat at runtime. Otherwise, use
encoding-checking string concat. -
02:59 PM Revision c00feffb (git): Improve documentation on contributing to Ruby
- co-authored-by: Peter Zhu <[email protected]>
co-authored-by: Stan Lo <[email protected]> -
02:00 PM Revision becafe1e (git): [ruby/fileutils] Enhanced RDoc for FileUtils
- https://github.com/ruby/fileutils/commit/c38fd02372
-
02:00 PM Revision dde9db64 (git): [ruby/fileutils] Enhanced RDoc for FileUtils
- https://github.com/ruby/fileutils/commit/7b60f2d63b
-
11:39 AM Bug #18763: The configure option “--with-openssl-dir” has lower precedence than pkg-config
- This issue has more details: https://github.com/postmodern/ruby-install/issues/412
So CRuby picks a mix of of 1.1 headers and 3.0 lib, when given `--with-openssl-dir`.
That sounds like a clear bug.
Setting `PKG_CONFIG_PATH` helps ... -
11:09 AM Bug #18658: Need openssl 3 support for Ubuntu 22.04 (Ruby 2.7.x and 3.0.x)
- FYI, related discussion in ruby-build: https://github.com/rbenv/ruby-build/pull/1974
I think Ruby 3.0 should support OpenSSL 3, even if that means dropping support for OpenSSL 1.0.1.
The OS using OpenSSL 1.0.1 are pretty old, I think... - 07:56 AM Revision 6758b76b (git): * 2022-05-11 [ci skip]
-
07:55 AM Revision 8f1a8e68 (git): [rubygems/rubygems] Fix error message on metadata mismatches
- Previously we were removing not installable specs. However, if those are
the only ones, that would result in a bad error message. If we still
choose them as a last resort, Bundler will later check metadata right
before installing a give ... -
07:55 AM Revision c582d986 (git): [rubygems/rubygems] Tweak negative expectations
- The follow a tweak on the yank message.
https://github.com/rubygems/rubygems/commit/f6817bfe58 -
07:55 AM Revision 54b15487 (git): [rubygems/rubygems] Extract a `next_ruby_minor` helper method for specs
- https://github.com/rubygems/rubygems/commit/66eae0ef1d
05/10/2022
-
07:19 PM Bug #18061: Execshield test: libruby.so.N.N.N: FAIL: property-note test because no .note.gnu.property section found
- @ioquatix Thank you for your investigation! I prepared `make test-annocheck` command for your convenient, and for us to test this case on CI. You can pick up my commit from https://github.com/ruby/ruby/pull/5900 .
-
06:16 PM Feature #18690: Allow `Kernel#then` to take arguments
- As a (maybe useful) sidenote, if we'll try to think in "useful atomic constructs" instead of "making existing multi-purpose", `Enumerator#with_object` is _almost_ what might help here:
```ruby
3.then.with_object(4) { |x, y| p [x, y] }
... -
06:02 PM Feature #18690: Allow `Kernel#then` to take arguments
- For your scenarios, as written, I agree with Benoit's #note-2 suggestions. ;) I also agree that core/stdlib `#then` should only ever yield a single value to its block. *However*, it's worth noting that multi-parameter blocks will autom...
-
05:37 PM Bug #18771 (Closed): IO.foreach/.readlines ignores the 4th positional argument
- The `IO.readlines` method has the following signature:
```
readlines(name, sep, limit [, getline_args, open_args]) → array
```
The last arguments `getline_args`, `open_args` are accepted as keyword arguments, so there are actuall... -
01:29 PM Bug #18770 (Closed): Inconsistent behavior of IO/StringIO's each methods when called with nil as a separator, limit and chomp: true
- IO's and StringIO's `#each` method (and similar ones - `#gets`, `#readline` etc) behave in a different way in the following case:
- separator is `nil`
- limit is passed
- `chomp: true` passed
In this case `StringIO#each` removes tr... -
12:47 PM Bug #18769 (Closed): StringIO#each hangs up on some input with `chomp: true`
- The mentioned StringIO method `#each` (as well as `#readlines` and `#each_line`) may hang up when passed a separator and `chomp: true`:
```ruby
require 'stringio'
StringIO.new('a||b||c').each("||", chomp: true) { |s| p s }
""
... -
12:06 PM Bug #18768 (Closed): Inconsistent behavior of IO, StringIO and String each_line methods when return paragraph and chomp: true passed
- In IO, StringIO and String methods that return lines (e.g. `each`, `each_line`, `gets`, `readline`, `readlines`) behave in a different way when the following parameters are passed
- separator is `""` and
- `chomp` is `true`.
They tr... -
09:41 AM Bug #18767 (Closed): IO.foreach hangs up when passes limit=0
- `IO.foreach` behaves in an unexpected way in a corner case when passes 0 as a limit parameter. It never stops and hangs up.
```ruby
IO.foreach('file.txt', 0) { |s| p s }
""
""
""
""
""
""
""
""
""
""
```
Expected behavi... -
06:24 AM Feature #18611: Promote best practice for combining multiple values into a hash code
- This makes me happy, thanks everyone!
-
04:07 AM Revision a85cdb5a (git): Write have instead of have have [ci skip
-
01:15 AM Revision d0983af6 (git): Fix the order of assert_eqaul and remove unused variables
-
12:24 AM Revision c7d2247e (git): Honor --with-thread option to enable pthread
05/09/2022
- 06:20 PM Revision 2999eb88 (git): * 2022-05-10 [ci skip]
-
06:20 PM Revision 40be4d42 (git): [ruby/psych] tr is typically 4 to 5 times faster than gsub
- https://github.com/ruby/psych/commit/8533be8fe7
-
05:34 PM Misc #18691: An option to build Ruby with build only flags not propagated to `rbconfig.rb`.
- > https://github.com/ruby/ruby/pull/5879
Anyone, could you review this PR? The CI is passed. Thank you.
-
03:04 PM Feature #14602: Version of dig that raises error if a key is not present
- For me this is a nice shortcut to safely access values in a large config hash. So I would use it if it became part of Ruby core.
I like the name `dig!` because it's short, but if that has too much of a Rails flavor rather than Ruby, t... -
02:21 PM Bug #18766: ArgumentError with no backtrace information when requiring openssl/cipher and initializing an OpenSSL::Cipher
- technically it does show, the problem are the parameter for initialize, or better for `BasicObject#initialize`
The Error you get is this one:
```
irb(main):001:0> class X
irb(main):002:0> end
=> nil
irb(main):003:0> x= X.new("abe... -
02:07 PM Bug #18766: ArgumentError with no backtrace information when requiring openssl/cipher and initializing an OpenSSL::Cipher
- @Hanmac oh I am aware that `require 'openssl'` is the correct way to load all of openssl. The bug in question is that it causes an ArgumentError to be raised, but does not show where the exception is being raised from. That is confusing ...
-
12:19 PM Bug #18766: ArgumentError with no backtrace information when requiring openssl/cipher and initializing an OpenSSL::Cipher
- @postmodern : the problem is a missing require
`openssl/cipher` is a helper script that can't run without `openssl` or it makes funky results
```
irb(main):001:0> require "openssl/cipher"
=> true
irb(main):002:0> OpenSSL::Cipher... -
10:36 AM Bug #18766 (Rejected): ArgumentError with no backtrace information when requiring openssl/cipher and initializing an OpenSSL::Cipher
- I discovered a mysterious ArgumentError when requiring 'openssl/cipher' instead of 'openssl' and initializing a OpenSSL::Cipher object. The ArgumentError does not indicate where the exception is being raised from.
## Steps To Reproduc... -
12:45 PM Revision 85479b34 (git): Don't allocate new page on finish sweeping
- We don't need to allocate a new page in gc_sweep_finish_size_pool.
It can be allocated when needed. -
12:45 PM Revision e28e9c63 (git): Fix heap_extend_pages when total_slots is 0
- Some size pools may not have any pages/slots, so total_slots is 0. This
causes a divide-by-zero in the calculation. This commit adds a special
case to catch the case when total_slots is 0 and returns the number of
pages for heap_init_slots. -
12:45 PM Revision f7d48037 (git): Grow size pools with no or few slots
- If the size pool has no or few pages/slots, then min_free_slots will
be a very small number (or even 0). Then the heap won't be eligible to
grow, causing GC thrashing or infinite loops. -
12:45 PM Revision b3f3cb0c (git): Call gc_sweep_finish_size_pool on size pools with no pages
- Size pools with no pages won't be swept so gc_sweep_finish_size_pool
will never be called on it, but gc_sweep_finish_size_pool must be called
to grow the size pool. -
12:45 PM Revision 033e58cf (git): Fix gc_page_sweep when last bitmap plane is not used
- Depending on alignment, the last bitmap plane may not used. Then it will
appear as if all of the objects on that plane is unmarked, which will
cause a buffer overrun when we try to free the object. This commit
changes the loop to calcula... -
12:45 PM Revision a41fbc2c (git): Increase SIZE_POOL_COUNT to 5
- Having more size pools will allow us to allocate larger objects
through Variable Width Allocation.
I have attached some benchmark results below.
Discourse:
On Discourse, we don't see much change in response times. We do see
a small... -
12:25 PM Revision 00e5e827 (git): [rubygems/rubygems] Cleanup old legacy code
- https://github.com/rubygems/rubygems/commit/531d6b5fee
-
09:48 AM Bug #17871: TestGCCompact#test_ast_compacts test failing again
- Right now the patch is only applied to master and Ruby 3.1. I want to see the backport to old Rubies.
https://github.com/ruby/ruby/commit/fc832ffbfaf581ff63ef40dc3f4ec5c8ff39aae6
This issue is related to #18560 .
* https://github.... - 09:21 AM Revision 0161dc3e (git): Update default gems list at ecf32dbfc03c39a75fdd8a4e4dc3cb [ci skip]
-
09:20 AM