Activity
From 01/03/2022 to 01/09/2022
01/09/2022
-
08:19 PM Bug #18465: Make `IO#write` atomic.
- > I think it'd better to guarantee atomicity for puts and write, even if the same fd is used by multiple IO instances, and even if the same fd is used by multiple processes.
The current implementation before and after this PR makes no... -
01:41 PM Bug #18465: Make `IO#write` atomic.
- Ah and in either case the IO scheduler should either receive the already-concatenated string, or all strings to write together in a single hook call.
Calling the write hook for each argument is of course broken. -
01:39 PM Bug #18465: Make `IO#write` atomic.
- I think it'd better to guarantee atomicity for `puts` and `write`, even if the same fd is used by multiple IO instances, and even if the same fd is used by multiple processes.
The write lock does not address both of these cases and it's... -
08:01 AM Bug #18465: Make `IO#write` atomic.
- Even though `stderr` should not be buffered, I feel like it would be advantageous to use a write lock too, to avoid interleaved log output if possible. Obviously still an issue for multi-process all logging to the same `stderr`.
-
06:46 AM Bug #18465: Make `IO#write` atomic.
- I tried to make a micro-benchmark measuring this.
```
> make benchmark ITEM=io_write
/Users/samuel/.rubies/ruby-3.0.3/bin/ruby --disable=gems -rrubygems -I../benchmark/lib ../benchmark/benchmark-driver/exe/benchmark-driver \
... -
06:34 AM Bug #18465: Make `IO#write` atomic.
- As part of working through the implementation, I merged <https://github.com/ruby/ruby/pull/5418>.
The follow up PR, making `io_binwrite` and `io_binwritev` atomic, is here: <https://github.com/ruby/ruby/pull/5419>. -
06:33 AM Bug #18465 (Closed): Make `IO#write` atomic.
- Right now, `IO#write` including everything that calls it including `IO#puts`, has a poorly specified behaviour w.r.t. other fibers/threads that call `IO#write` at the same time.
Internally, we have a write lock, however it's only used... -
07:28 PM Misc #18467 (Closed): Clarify and update language around Ractor-safety for extensions
- The language around what makes an extension Ractor safe could use a little clarification.
The PR for this issue is https://github.com/ruby/ruby/pull/5421. -
10:17 AM Revision 65a8d522 (git): Revert "[DOC] Mention RBOOL in extension.rdoc [Feature #13125]"
- This reverts commit 9ad34da47ff7d71446e667897559047ed5635b60, as
`RBOOL` is not defined publicly yet. -
08:32 AM Bug #18466 (Third Party's Issue): Im receiving an error when attempting to download RealmSwift Pods
- It's third party's issue. https://github.com/typhoeus/ethon/issues/193
-
06:36 AM Bug #18466 (Third Party's Issue): Im receiving an error when attempting to download RealmSwift Pods
- I was attempting to install the RealmSwift Pods. I received the following error during the installation. This was in terminal.
jeremiahdepass@Jeremiahs-Air Pod % pod install
Analyzing dependencies
/Library/Ruby/Gems/2.6.0/gems/eth... -
04:21 AM Revision b43ad6b8 (git): [DOC] Fold too long lines
-
03:40 AM Revision 83983bac (git): [DOC] Mention `make check`
-
03:39 AM Revision a7faca51 (git): Add `=num` to yjit options
- `--yjit-call-threshold` and `--yjit-max-versions` need an argument.
-
03:34 AM Revision cc01ae59 (git): [DOC] test-spec would be preferable now
01/08/2022
- 11:06 PM Revision 86484575 (git): Don't combine test-all and rubyspec.
-
08:07 PM Revision 33cc8816 (git): Revert "Enable Variable Width Allocation by default"
- This reverts commit c365c5921ea26e31c03a85b01ff4c04629abfc10.
- 07:41 PM Revision a5fffb31 (git): * 2022-01-09 [ci skip]
-
07:40 PM Revision 18b97eee (git): YJIT: Add support for ruby array cfuncs (argc=-2)
- This adds support for cfuncs which take variable arguments using a Ruby
array. This is specified with the method entry's argc == -2. -
07:40 PM Revision b5c03912 (git): YJIT: Save SP later in cfunc call
- Saving SP later allows us to avoid storing SP in an intermediate
register and allows using the ctx_stack_opnd helpers. -
11:32 AM Revision 09cfc653 (git): [ruby/reline] Fix reline on Solaris
- Solaris requires that the pointer errret_int is alined to an integer,
however, with VWA, strings are no longer aligned to an integer, so use a
Fiddle::Pointer with a malloc'd region instead.
https://github.com/ruby/reline/commit/5fcd89ab0c - 11:03 AM Revision 0ca00e2c (git): Move IO write buffer allocation into function.
-
09:59 AM Bug #18464 (Assigned): RUBY_INTERNAL_EVENT_NEWOBJ tracepoint causes an interpreter crash when combined with Ractors
-
04:37 AM Bug #18464 (Closed): RUBY_INTERNAL_EVENT_NEWOBJ tracepoint causes an interpreter crash when combined with Ractors
- When a Ractor is created whilst a tracepoint for `RUBY_INTERNAL_EVENT_NEWOBJ` is active (registered with `rb_tracepoint_new`/`rb_tracepoint_enabled`), the interpreter crashes with a null pointer dereference with the following backtrace:
... -
09:55 AM Feature #18463: Random number generation with xoshiro
- That gem seems pretty old, before `include/ruby/random.h` was introduced.
You can see a skeleton at `ext/-test-/random/loop.c` too. -
05:47 AM Revision 47a05f7c (git): Do not run the same tests twice
-
05:47 AM Revision fb532d80 (git): Run an old fixed bug in the same process
-
05:47 AM Revision 64eccbf5 (git): Run the tests on a subclass of String
-
03:49 AM Revision 32a0d9dd (git): Prefer the dedecated conversion function
-
12:29 AM Revision 54c91042 (git): YJIT: Discard local var type info on routine call
- Routines that are called from YJIT's output code can call methods, and
calling methods mean they can capture and change the environment of the
calling frame.
Discard type info whenever we perform routine calls. This is more
conservative...
01/07/2022
-
08:48 PM Revision bc643bbe (git): Use unsigned short for length of embedded strings
-
07:22 PM Revision d9ef711f (git): Improve string info in rb_raw_obj_info
- Improve rb_raw_obj_info to output additional into about strings
including the length, capacity, and whether or not it is embedded. -
06:27 PM Revision c365c592 (git): Enable Variable Width Allocation by default
-
06:23 PM Feature #12125: Proposal: Shorthand operator for Object#method
- Has `&&` been considered?
```
Dir["*/*.c"].map(&&File.basename)
```
It can also adapt to outside usage so `&File.basename` equals `File.method(:basename)`.
-
05:46 PM Bug #18435: Calling `protected` on ancestor method changes result of `instance_methods(false)`
- I'm not fully clear on the expected semantics of private/protected/public in a subclass, that would probably be good to improve in the docs of these methods or in general docs.
However since the current semantics seems to clearly create... -
05:02 PM Feature #18461: closures are capturing unused variables
- bughit (bug hit) wrote in #note-9:
> V8 handles that, detecting eval and deopting, so ruby can too.
So what does V8 do then if `eval` is aliased e.g., to `e`?
---
BTW, your replies feel rather aggressive to me.
You are speakin... - 03:50 PM Revision a1bef7c2 (git): * 2022-01-08 [ci skip]
-
03:50 PM Revision be68b3a4 (git): Change termlen when changing encoding during concatenation
- After changing the encoding, we should update the terminator length.
-
03:01 PM Bug #12666: Fatal error: glibc detected an invalid stdio handle
- I can see the patch https://github.com/ruby/fiddle/commit/a267a40be7844224c5f000530bd3e8e906f1acea is applied into the Ruby 3.0 stable branch ruby_3_0 and Ruby 3.0.3 as a part of upgrading the fiddle to 1.0.8 by the following commit.
ht... -
02:23 PM Bug #12666: Fatal error: glibc detected an invalid stdio handle
- Let me explain more context about this backport requests.
Here is current `test/fiddle/helper.rb` file on ruby/ruby ruby_2_6 branch.
https://github.com/ruby/ruby/blob/02c341c9bc5879eae568ed2ba02cf227ed948199/test/fiddle/helper.rb#L... -
02:55 PM Revision 3f9af8a9 (git): [DOC] Fix typos in a doxygen comment [ci skip]
-
09:25 AM Feature #17473: Make Pathname to embedded class of Ruby
- For what it's worth, although for unrelated reasons, I completely rewrote `Pathname` in pure Ruby here: https://github.com/rubygems/rubygems/pull/4992.
-
07:11 AM Feature #18463: Random number generation with xoshiro
- Thanks for the feedback. Another good algorithm is pcg https://rubygems.org/gems/pcg_random
-
06:55 AM Feature #18463: Random number generation with xoshiro
- I guess you can start implementing xoshiro as a separate gem now. I remember @mrkn once wanted to implement xorshift, and `include/ruby/random.h` was introduced (mainly) for that purpose. Not sure his current status though.
-
06:34 AM Feature #18463 (Open): Random number generation with xoshiro
- Xoshiro https://prng.di.unimi.it/ random number generation is typically faster than Mersenne Twister currently used in Ruby in https://github.com/ruby/ruby/blob/master/random.c It would be good to allow use of xoshiro either as an opti...
-
06:31 AM Misc #18399: DevMeeting-2022-01-13
- * [Feature #18462] Proposal to merge WASI based WebAssembly support (mame)
* Let's support wasm. This will allow MRI to work on browsers and edge computing platforms. -
06:10 AM Feature #18462 (Closed): Proposal to merge WASI based WebAssembly support
- # Proposal to merge WASI based WebAssembly support
This is an initial port of WASI based WebAssembly support.
This enables a CRuby binary to be available on Web browser, Serverless Edge environment, and other WebAssembly/WASI embedde... -
12:44 AM Revision 533bc771 (git): Fix typo [ci skip]
-
12:42 AM Bug #18158 (Closed): Pathname#each_entry without block does not return Enumerator
-
12:42 AM Revision dd6a7519 (git): [ruby/pathname] Make Pathname#each_entry return enumerator if called without block
- Fixes [Bug #18158]
https://github.com/ruby/pathname/commit/914c726aa2 -
12:39 AM Bug #18389: `binding.irb` can fail in some classes that implement `context` and `print` methods.
- I've submitted a pull request to fix this error: https://github.com/ruby/irb/pull/325
-
12:23 AM Revision 6baa78bb (git): Use chomp: option when chomp mode
- Get rid of depending on using $/ internally in String#chomp!, and
chomp the separator at once. -
12:23 AM Revision 83b98705 (git): Explicitly pass $/ when loop mode
- Get rid of depending on using $/ internally in ARGF.gets.
01/06/2022
-
11:13 PM Feature #18461: closures are capturing unused variables
- > That's of no use then, that's just not the semantics of Proc#binding, which is to capture every variable at the place the block is defined.
If you are suggesting that everything is set in stone, that's obviously false. Changes can b... -
10:25 PM Feature #18461: closures are capturing unused variables
- bughit (bug hit) wrote in #note-4:
> There's no such need. If the capture is optimized then Proc#binding will continue giving access to what has been captured, rather than everything that could be captured.
That's of no use then, tha... -
05:38 PM Feature #18461: closures are capturing unused variables
- > uncaptured ones are on the stack and disappear with the stack frame. You can't get them back later.
That's actually one of the major benefits of optimized capture, you're not wasting memory holding on to things you don't need. There... -
05:00 PM Feature #18461: closures are capturing unused variables
- > However, as soon as you call proc.binding.local_variables, you should see all local variables in scope (deoptimizing if necessary)
That's not possible. Captured variables are on the heap, uncaptured ones are on the stack and disappe... -
04:39 PM Feature #18461: closures are capturing unused variables
- bughit (bug hit) wrote in #note-4:
> > But, maybe we could deprecate Proc#binding and remove it, I think that would be a good start.
> ...
This is not how it should be implemented, IMO. Optimizing such procs is fine, as long as such o... -
04:26 PM Feature #18461: closures are capturing unused variables
- > But, maybe we could deprecate Proc#binding and remove it, I think that would be a good start.
There's no such need. If the capture is optimized then Proc#binding will continue giving access to what has been captured, rather than eve... -
11:43 AM Feature #18461: closures are capturing unused variables
- I think Ruby JIT implementers are already aware of this, but these are the current semantics of Ruby.
I think JRuby does some optimization like this (only keeps the outside scope if there is `binding/eval` inside the block, but JRuby ... -
12:19 AM Feature #18461: closures are capturing unused variables
- Interning string literals also breaks code, but it's worth moving in that direction, and here also.
Note the following quote from chromium/v8:
> The only solution I could think of is that whenever devtools is on, we would deopt all... -
12:02 AM Feature #18461: closures are capturing unused variables
- This is Ruby, you can always modify the value of the local variable later, even if it isn't accessed inside the proc itself.
Such access can affect other scopes:
```ruby
def foo
a = 1
[->{}, ->{}]
end
x, y = foo
x.binding... -
10:23 PM Revision ae0d67d7 (git): Revert "Set encoding before concatenating to string"
- This reverts commit 44368b5f8bc21e19fa06a0fc0625923fc41293e6.
-
09:47 PM Revision aeb344e6 (git): Revert "Enable Variable Width Allocation by default"
- This reverts commit d4a95428bb244ca8c4a97ad50f3837f191f1f0c3.
-
08:17 PM Feature #17473: Make Pathname to embedded class of Ruby
- Regarding openat(), [4bf3cb5ba9c0242bd5a6d0d55b7db9f837c09edf](https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/4bf3cb5ba9c0242bd5a6d0d55b7db9f837c09edf) was 11 years ago, so I assume there is little demand or nee...
-
08:12 PM Feature #17473: Make Pathname to embedded class of Ruby
- I plan to make a PR to move Pathname back to Ruby for all methods which don't significantly gain from being written in C.
I'm coming from https://github.com/oracle/truffleruby/issues/2559, which is additional motivation for it, the curr... -
07:33 PM Revision 5f55b037 (git): Set correct termlen for frozen strings
- Frozen strings should have the same termlen as the original string when
copy_encoding is true. -
07:33 PM Revision 44368b5f (git): Set encoding before concatenating to string
- If we set encoding after the call to rb_str_buf_cat, then rb_str_buf_cat
will not set the correct terminator length. -
07:33 PM Revision ee4784c0 (git): Update lldb_cruby.py for VWA strings
-
07:33 PM Revision 3818cfbd (git): Compile with USE_RVARGC=0 on CI
-
07:33 PM Revision d4a95428 (git): Enable Variable Width Allocation by default
-
07:31 PM Feature #18438: Add `Exception#additional_message` to show additional error information
- 👋, I maintain [Datadog's application monitoring gem](https://github.com/DataDog/dd-trace-rb), alongside Ivo.
ivoanjo (Ivo Anjo) wrote in #note-3:
> I'll need to sync with my colleagues at Datadog and may take a few days because a lot... -
05:13 PM Revision ae51f304 (git): io_buffer.c: use mremap based resizing only when mremap available
- some libc implementations (e.g. wasi-libc) define MREMAP_MAYMOVE, but
don't have mremap itself, so guard the use of mremap by HAVE_MREMAP -
04:47 PM Revision 5ad507d7 (git): Enhanced RDoc for IO (#5402)
- Treats:
#ungetc
#isatty
#close_on_exec? -
04:13 PM Revision 1bfccba7 (git): Add bugs.ruby links.
-
04:03 PM Bug #18292 (Closed): 3.1.0-dev `include` cause Module to be marked as initialized
- Applied in changeset commit:git|a79c59472df38297c246b27713c277f2edaefa7a.
----------
Allow include before calling Module#initialize
This is to allow Module subclasses that include modules before
calling super in the subclass's initiali... -
12:59 AM Bug #18292: 3.1.0-dev `include` cause Module to be marked as initialized
- A simple work around for this is to `include` after calling `super`.
`initialize` checks whether the module is uninitialized, and fails otherwise. When calling `include`, the module is marked as initialized. If you call `include` be... - 04:03 PM Revision 818fc853 (git): * 2022-01-07 [ci skip]
-
04:03 PM Revision 3f6bfe49 (git): Update test/ruby/test_module.rb
- Co-authored-by: Nobuyoshi Nakada <[email protected]>
-
04:03 PM Revision 24b53b1f (git): Remove unneeded line
-
04:03 PM Revision a79c5947 (git): Allow include before calling Module#initialize
- This is to allow Module subclasses that include modules before
calling super in the subclass's initialize.
Remove rb_module_check_initializable from Module#initialize.
Module#initialize only calls module_exec if a block is passed,
it do... - 02:58 PM Revision 73be7a85 (git): [rubygems/rubygems] Fix suggestions flag
- https://github.com/rubygems/rubygems/commit/b55a1393ca
- 02:58 PM Revision cea4a810 (git): [rubygems/rubygems] Let fetch understand gem:version syntax
- Fix version error message
Add tests to fetch error messages
Fix default version since is not necessary
https://github.com/rubygems/rubygems/commit/070620ebe4 -
02:52 PM Revision ee5e684b (git): [rubygems/rubygems] Fix `gem install <non-existent-gem> --force` crash
- Before:
```
$ gem install sfdsfdsfsdide --force
ERROR: While executing gem ... (NoMethodError)
undefined method `spec' for nil:NilClass
@always_install << newest.spec
^^^^^
```
After:
```
$ gem i... -
11:13 AM Feature #18460 (Rejected): implicit self for .() syntax without rvalue
- This proposal is rejected for several reasons:
* we don't allow `.m` notation for implicit self (for now at least)
* You will gain only 4 fewer characters
* I don't think it's worth the cost of syntax complexity it brings
Matz.
-
09:33 AM Revision e3b0c8c1 (git): [ruby/reline] windows: test_yamatanooroti fix
- windows can't create too narrow and tall window.
https://github.com/ruby/reline/commit/20b5f2f6fc -
09:14 AM Revision e554b17c (git): tool/rbinstall.rb: instal ruby.wasm produced by Emscripten
- 07:02 AM Revision 2db7952e (git): Update bundled gems list at 2022-01-06
-
02:32 AM Revision 3e417a55 (git): NEWS: "taintedness" and "trustedness" methods are removed
-
02:20 AM Revision ac0d27eb (git): NEWS: Separate removed constants section
-
01:36 AM Feature #12966 (Rejected): net/ftp to include fxp support?
- net/ftp is now a bundled gem, so I close this issue.
-
01:26 AM Revision da43c882 (git): Remove useless code [Bug #18185]
- RMODULE_SUPER is initialized to 0, as the uninitialized module
flag is used since b929af430c39df6597d2f3f53b82c38b1d76217b. -
01:14 AM Revision 5e7cd480 (git): Fix spec failure on ruby 3.1
- Because https://github.com/ruby/ruby/pull/5148 merged after Ruby 3.1.0 released.
13241b71a50dded0a7b021ec4f2fb6a995daace9 did not fix proc spec yet.
https://github.com/ruby/actions/runs/4718820699?check_suite_focus=true#step:18:173
```...
01/05/2022
-
11:45 PM Feature #18461 (Rejected): closures are capturing unused variables
- ```rb
def foo
a = 1
->{}
end
p foo.binding.local_variables # [:a]
```
Shouldn't `a` be optimized away? Like v8 does (https://bugs.chromium.org/p/v8/issues/detail?id=3491) -
10:13 PM Revision 445c055b (git): Enhanced RDoc for IO (#5395)
- Treats:
#getc
#readchar
#getbyte
#readbyte
#ungetbyte -
08:39 PM Feature #17524 (Closed): resolv: add some more characters in IPv6 link local zone id
-
08:38 PM Bug #18165 (Closed): resolv: IPv6 link local addresses do not accept dash as a valid zone_id character
-
07:25 PM Misc #18399: DevMeeting-2022-01-13
- * [Feature #18408] Allow pattern match to set instance variables
* Currently, `expr => @var` is not supported.
* It doesn't seem like there's a specific reason for that limitation; `rescue => @var` works fine.
* I think ivars sh... -
06:12 PM Misc #18399: DevMeeting-2022-01-13
- * [Feature #16122] `Struct::Value`: simple immutable value object (zverok)
* the concept was somewhat favorably discussed a long time ago, but since then no reiterations were made.
* I provided the extended description and rationa... -
06:59 PM Feature #18270 (Closed): Refinement#{extend_object,append_features,prepend_features} should be removed
- Applied in changeset commit:git|791343b5bb1b8bb11de4ba2800118c20e36b5a71.
----------
Remove Refinement#{extend_object,append_features,prepend_features}
Also make include, prepend, and extend raise a TypeError if one
of the modules is a... -
09:00 AM Feature #18270: Refinement#{extend_object,append_features,prepend_features} should be removed
- jeremyevans0 (Jeremy Evans) wrote in #note-8:
> I've submitted a pull request to implement this: https://github.com/ruby/ruby/pull/5358
Thank you. I've approved it, but it has conflicts with my commits....
Could you merge it resolv... - 06:59 PM Revision 7bef101e (git): * 2022-01-06 [ci skip]
-
06:59 PM Revision 791343b5 (git): Remove Refinement#{extend_object,append_features,prepend_features}
- Also make include, prepend, and extend raise a TypeError if one
of the modules is a refinement.
Implements [Feature #18270] -
02:51 PM Feature #18460 (Rejected): implicit self for .() syntax without rvalue
- We have a nice `.()` shorthand for calling Proc
```ruby
m = 1.method(:+)
m.(2) # 3
```
But while we can use this shorthand in a Proc's context with the explicit self, we cannot use it with the implicit self:
```ruby
m.instance... -
02:46 PM Revision f22296d2 (git): test/ruby/test_refinement.rb: Remove "assigned but unused variable"
-
02:32 PM Revision 6f7e02bf (git): Remove assertion causing read barrier to trigger
- GET_HEAP_PAGE reads the page. If during compaction there is a read
barrier on the page, it causes the read barrier to trigger. -
01:00 PM Bug #12666: Fatal error: glibc detected an invalid stdio handle
- Just FTR, we are hitting this issue on RHEL8 PPC once again, although we were using quite reduced version of this logic.
-
10:16 AM Revision 8bba6d3d (git): [rubygems/rubygems] Exclude bin directory for newgem template, Because it contains only development script
- https://github.com/rubygems/rubygems/commit/01017ee8ca
-
09:27 AM Revision e38d5833 (git): NEWS: Links to the tickets to remove deprecated features
-
09:20 AM Feature #12737 (Closed): Module#defined_refinements
- Applied in changeset commit:git|54198c7b97d3d353f7ac233e0360034b6e7b6cb6.
----------
Add Module#refinements and Refinement#refined_class [Feature #12737] -
09:18 AM Revision 1272a331 (git): NEWS: Removal of `Kernel#=~` [Feature #15231]
-
08:47 AM Revision 54198c7b (git): Add Module#refinements and Refinement#refined_class [Feature #12737]
-
08:07 AM Feature #14332 (Closed): Module.used_refinements to list refinement modules
- Applied in commit:git|21ee5341f8fc4ca513295dff2148f7c203c908a7.
-
07:58 AM Revision 21ee5341 (git): Add Module.used_refinements
-
07:20 AM Revision 5757696e (git): `res.response_body_permitted?` is not defined
- `response_body_permitted?` is a method of request.
-
02:15 AM Feature #18459 (Assigned): IRB autocomplete dropdown colour options
-
01:23 AM Bug #18435: Calling `protected` on ancestor method changes result of `instance_methods(false)`
- I agree this is a confusing part of the API surface. This ticket reminds me of
the discussion from [Bug #16106].
Consider the following setup:
```ruby
class Parent
def foo; end
end
class Child < Parent
protected :foo
e... -
01:05 AM Feature #18181: Introduce Enumerable#min_with_value, max_with_value, and minmax_with_value
- I like the more generic suggestion from @ko1 on `with_value`, I had a similar idea before reading it when @shan pinged me about this ticket.
The other potential is using the `_map` suffix as is the case with `filter_map`:
```ruby
%w(ab... -
12:39 AM Revision 6326112e (git): Enhanced RDoc for Enumerable (#5393)
- A little more about the classes that include or extend Enumerable.
-
12:05 AM Revision d5836db1 (git): Fix `Leaked file descriptor: TestIO_Console#test_console_kw`
- ```
Leaked file descriptor: TestIO_Console#test_console_kw: 10 : #<File:/dev/tty>
```
01/04/2022
-
11:18 PM Revision 13241b71 (git): Fix failures on ruby 3.1
- Because https://github.com/ruby/ruby/pull/5148 merged after Ruby 3.1.0 released.
https://github.com/ruby/actions/runs/4705986643?check_suite_focus=true#step:18:144
```
1)
Method#parameters adds * rest arg for "star" argument FAILED
... -
10:53 PM Feature #18181: Introduce Enumerable#min_with_value, max_with_value, and minmax_with_value
- For a single value, a "then" suffix might be nice.
``` ruby
%w(abcde fg hijk).min_by(&:size)
#=> "fg"
%w(abcde fg hijk).min_by_then(&:size)
#=> 2
```
It mirrors #min_by and #then with the same block.
``` ruby
%w(abcde fg... -
10:25 PM Revision d1a91076 (git): [rubygems/rubygems] Fix race conditon on JRuby
- On JRuby, sometimes we get the following error in CI when running a
realworld test that checks that `gem install rails` succeeds:
```
ERROR: While executing gem ... (NoMethodError)
undefined method `ignored=' for nil:NilClass
... -
08:42 PM Bug #18436 (Closed): Fix Pathname dot directory globbing
- Applied in changeset commit:git|5917f49ad03cd3b2c13d3eea85c969a113b83bf8.
----------
Fix documentation for Dir.glob
Dir.glob("*", File::FNM_DOTMATCH) no longer includes ".." in the
returned array as of Ruby 3.1.
Fixes [Bug #18436] -
08:38 PM Bug #18436: Fix Pathname dot directory globbing
- The glob difference between Ruby 3.0 and 3.1 is expected, as the change was made to fix bug #17280. Looks like the documentation needs to be updated to reflect the change. I'll take care of that shortly.
-
08:38 PM Revision 5917f49a (git): Fix documentation for Dir.glob
- Dir.glob("*", File::FNM_DOTMATCH) no longer includes ".." in the
returned array as of Ruby 3.1.
Fixes [Bug #18436] -
08:20 PM Bug #18449 (Rejected): Bug in 3.1 regexp literals with \c
-
08:15 PM Bug #18432 (Rejected): case ... when bug if add a extra comma on the end of condition.
-
07:46 PM Revision 44379805 (git): Fix crash on bootup when RGENGC_CHECK_MODE=2 with GC stress
- We need to unshare the array loaded_features because the shared root
could be old gen (while loaded_features is young) which causes a WB
miss. -
07:28 PM Feature #18459 (Closed): IRB autocomplete dropdown colour options
- It would be great to be able to specify bg/fg colours for the new autocomplete dropdown in irb in ruby 3.1. This could help for accessibility purposes, or for anyone who just wants to make it look more personalised for their terminal 😎
... -
06:57 PM Revision 9c15da0f (git): Enhanced RDoc for IO (#5381)
- Treats:
#lineno
#lineno=
#readline
#readlines
#each_line
#each_byte
#each_char
#each_codepoint -
06:03 PM Bug #18458 (Closed): Segmentation fault when missing Warning#warn method
- Applied in changeset commit:git|9e0a91d0640600f2dfd7fc1d5fae6667019c9ca5.
----------
Don't segfault if Warning.warn is undefined
Check that there is a method entry for the method before passing
it to rb_method_entry_arity.
Fixes [Bug ... -
05:15 PM Bug #18458: Segmentation fault when missing Warning#warn method
- Pull requested submitted to fix this: https://github.com/ruby/ruby/pull/5391
-
02:21 PM Bug #18458 (Closed): Segmentation fault when missing Warning#warn method
- If you remove the `Warning#warn` method and call `Kernel#warn`, you get a segmentation fault:
ruby 3.1.0:
```
$ ruby -e 'Warning.undef_method(:warn); warn ""' 2>&1 | head -2 ... -
06:03 PM Revision 9e0a91d0 (git): Don't segfault if Warning.warn is undefined
- Check that there is a method entry for the method before passing
it to rb_method_entry_arity.
Fixes [Bug #18458] - 03:28 PM Revision e7806049 (git): * 2022-01-05 [ci skip]
-
03:27 PM Revision ad007bc6 (git): Switch `is_pointer_to_heap` to use library bsearch
- This commit switches from a custom implemented bsearch algorithm to
use the one provided by the C standard library.
Because `is_pointer_to_heap` will only return true if the pointer
being searched for is a valid slot starting address wi... -
02:48 PM Feature #18364 (Closed): Add GC.stat_pool for Variable Width Allocation
- Applied in changeset commit:git|615e9b28658c5b44a4474e04a53b84ae83b8e3fd.
----------
[Feature #18364] Add GC.stat_heap to get stats for memory heaps
GC.stat_heap will return stats for memory heaps. This is
used for the Variable Width A... -
02:46 PM Revision 615e9b28 (git): [Feature #18364] Add GC.stat_heap to get stats for memory heaps
- GC.stat_heap will return stats for memory heaps. This is
used for the Variable Width Allocation feature. -
02:18 PM Revision e9a4cc02 (git): [ruby/error_highlight] Add a test to check if it is robust against a spoofed filename
- Previously, RubyVM::AST.of opened a wrong file if the iseq's file path is spoofed.
```
module Dummy
binding.irb
end
```
```
$ ruby test.rb
From: test.rb @ line 2 :
1: module Dummy
=> 2: binding.irb
3: end
irb(Dummy):001... - 02:09 PM Revision 11b1ebe6 (git): [ruby/error_highlight] Fix the spurious TypeError.
- When we have no backtrace locations, we can't have the highlight,
so just return the message.
https://github.com/ruby/error_highlight/commit/9f5c639494 - 02:09 PM Revision e22218b5 (git): [ruby/error_highlight] Reproduce the error seen when calling .to_s in embedded Ruby
- The test fails with the following error:
Error: test_simulate_funcallv_from_embedded_ruby(ErrorHighlightTest): TypeError: wrong argument type nil (expected method)
https://github.com/ruby/error_highlight/commit/52943c9cd2 -
11:09 AM Feature #18136: take_while_after
- `take_until`, from reading the method name, clearly implies to me including the element for which the condition became true, i.e., it includes that "last" element, like `1..3` includes `3`.
But if that's too confusing for others then it... -
10:59 AM Feature #16663: Add block or filtered forms of Kernel#caller to allow early bail-out
- I also think the approach of yielding an enumerable while smart looks really complicated to implement properly, and I could imagine it might cause issues in some VMs.
Also if I understand correctly, that would mean `enum.each` would star... -
08:52 AM Revision b673e9a3 (git): Fix the previous commit
-
08:45 AM Bug #18454: YJIT slowing down key Discourse benchmarks
- What about YJIT_STATS=1 ? That's the part that will tell us why it's slower.
> Oddly bootsnap may be causing an RSS increase 338 -> 370 (on 2.7.5 290 -> 315)
RSS isn't necessarily the best mesure, but yes bootsnap incur increased m... -
02:29 AM Bug #18454: YJIT slowing down key Discourse benchmarks
- @k0kubun already doing 20 iterations as a warmup, so it is not likely :cry: https://github.com/discourse/discourse/blob/bbca25e875c36d3541b22c520b6d56ae6322dfbe/script/bench.rb#L192-L192
@byroot @noahgibbs this is a tough one Ruby ... -
08:34 AM Revision 426ddbff (git): test/ruby/test_method.rb: Fix a random failure during `make COVERAGE=1`
- This fixes the following failure.
```
1) Error:
TestMethod#test_method_list:
NoMethodError: undefined method `<=>' for #<BasicObject:0x00007f7757e7eb60>
mods = mods.sort_by {|m| m.name }
^^^^^^^^
```
https://gith... -
08:25 AM Revision 47bf64a2 (git): Use omit instead of skip: test/ruby/**/*.rb
-
07:38 AM Revision f0669fb6 (git): [ruby/optparse] Use `require_relative` for internal requires (https://github.com/ruby/optparse/pull/28)
- https://github.com/ruby/optparse/commit/e4f2682128
-
06:31 AM Misc #18399: DevMeeting-2022-01-13
- * [Feature #18438] Add `Exception#additional_message` to show additional error information (mame)
* I'd like to apply error_highlight more exceptions than NameError, but it will break some existing tests that check the return value of... -
05:59 AM Revision 5074aa19 (git): [rubygems/rubygems] Test the actual checksums of the mock gems
- https://github.com/rubygems/rubygems/commit/2b42630959
-
05:59 AM Revision 0bfb406b (git): [rubygems/rubygems] Fix the test to use the mock gem path
- "NUL.*" means the NUL device on Windows, as well as mere "NUL",
and no data is read.
https://github.com/rubygems/rubygems/commit/e2c7d22745 -
05:59 AM Revision 8f962374 (git): [rubygems/rubygems] Append a newline to the checksum file
- https://github.com/rubygems/rubygems/commit/48ea2778e9
-
05:59 AM Revision c2e8e1f6 (git): [rubygems/rubygems] Fix checksum
- Calculate the checksum of the content, not the given pathname at
the build time itself.
https://github.com/rubygems/rubygems/commit/b60ee97ee9
01/03/2022
-
11:25 PM Revision 67612dad (git): [ruby/net-http] Handle invalid use of IP addresses in SNI
- Server Name Indication does not allow IP addresses (RFC 6066, section 3:
`Literal IPv4 and IPv6 addresses are not permitted in "HostName".`).
Recent versions of LibreSSL enforce this restriction, which raises
when setting the hostname t... - 08:11 PM Revision 8d6e4f15 (git): * 2022-01-04 [ci skip]
-
07:36 PM Feature #18136: take_while_after
- `until` is the negative of `while`, so I would expect `take_until{cond}` (or the synonym `take_till`) to behave like `take_while{!cond}`. So `(1..9).take_until{_1==5}` would/should produce `[1,2,3,4]`, unlike the current proposal to get ...
-
01:52 PM Feature #18136: take_while_after
- I recently wanted to have something like this for advent of code, and worked around by using `Enumerator.produce + find + side effect` but it feels clearly less elegant.
https://github.com/eregon/adventofcode/blob/a582daa1f2c549d459d6b0... -
06:22 PM Misc #18399: DevMeeting-2022-01-13
- * [Bug #15928] Constant declaration does not conform to JIS 3017:2013 (jeremyevans0)
* This was discussed at the May 2021 developer meeting, and it was decided to wait until after 3.1.
* This makes constant assignment consistent wi... -
06:16 PM Feature #16663: Add block or filtered forms of Kernel#caller to allow early bail-out
- headius (Charles Nutter) wrote in #note-15:
> Yes I botched that part of my example. The Enumerable would have to be yielded to a block and used within that block. My example done right would be more like:
> ...
I think this approach o... -
06:13 PM Bug #18431: Ruby 2.6.9, bundler 1.17.2 and CVE-2021-43809
- I see, I agree more with GitHub assessment.
If I understand correctly, ruby 2.6 will be declared as EOL soon, so it seems fine to me to way for that to happen and don't take any action. Users who want to stick to Ruby 2.6 but use a fi... -
10:19 AM Bug #18431: Ruby 2.6.9, bundler 1.17.2 and CVE-2021-43809
- deivid (David Rodríguez) wrote in #note-3:
> How is the score for vulnerabilities calculated? I tried to set the score myself to "Low" in the Github Advisory, because the chances that this issue is ever explored seemed very low to me. I... -
05:43 PM Revision 3ae8b115 (git): YJIT: Fix confusing self reference when initializing variable
-
05:43 PM Revision c7177288 (git): YJIT: Refine comments
- Correct method name, fix copypasta, and add an ASCII illustration.
[ci skip] -
02:13 PM Bug #18454: YJIT slowing down key Discourse benchmarks
- Possibly related: YJIT released 3.1 was breaking Rails caching: https://bugs.ruby-lang.org/issues/18453
-
01:33 PM Revision 980bf94f (git): Kernel#=~: delete
- Has been deprecated since ebff9dc10e6e72239c23e50acc7d3cbfdc659e7a.
-
01:00 PM Bug #18457 (Closed): ruby 2.7.5 fiddle/types.rb use uint32_t but fiddle/cparser.rb lacks uint32_t
- ```
C:\src\git\reline>bundle exec rake test_yamatanooroti
Traceback (most recent call last):
17: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/rake_test_loader.rb:6:in `<main>'
16: from C:/Ruby27-x6...