Activity
From 05/11/2022 to 05/17/2022
05/17/2022
- 10:12 PM Revision e2bad65e (git): * 2022-05-18 [ci skip]
-
10:12 PM Revision e658da94 (git): [ruby/irb] Fix documents for .irbrc path
- https://github.com/ruby/irb/commit/af99c01b0d
-
08:40 PM Bug #18782: Race conditions in autoload when loading the same feature with multiple threads.
@fxn said:
> Once the trigger has been executed, it is gone, the way I see it. How is that represented internally, I don't care and should not drive the design of the interface in my view. To me, autoload is not metadata of the modu...-
08:26 PM Feature #18788: Support passing Regexp options as String to Regexp.new
- I agree that the use cases are fairly limited. They are not totally uncommon, though.
`Regexp.new` is mostly needed for recursion on Ruby and metaprogramming, and is used this way e.g. in [rubocop](https://github.com/rubocop/rubocop-a... -
02:10 PM Feature #18788: Support passing Regexp options as String to Regexp.new
- I think this is a good idea, but I also think `Regexp.new` is not used so often so it does not matter if we have such feature or not. Most of the time, a regex is created using a regex literal. What is the use case of `Regexp.new`?
-
01:15 PM Feature #18788: Support passing Regexp options as String to Regexp.new
- +1, I've often wanted that.
-
12:11 PM Feature #18788 (Closed): Support passing Regexp options as String to Regexp.new
- ## Current situation
`Regexp.new` takes an integer as second argument which needs to be ORed together from multiple constants:
```ruby
Regexp.new('foo', Regexp::IGNORECASE | Regexp::MULTILINE | Regexp::EXTENDED) # => /foo/imx
```... -
05:50 PM Bug #18780: Incorrect binding receiver for C API rb_eval_string()
> You have just made this literally impossible to write in ruby.
And before you say "just have the caller pass in the binding" - keep in mind that Kernel::eval does not require this. So you would not, for example, be able to make c...-
05:47 PM Bug #18780: Incorrect binding receiver for C API rb_eval_string()
- Eregon (Benoit Daloze) wrote in #note-6:
> OK, finally the issue is clear.
> ...
This is 100% not what I was hoping for.
1) That seems like it will break a number of things, if your binding is no longer correct. What if you try to ... -
05:35 PM Bug #18780: Incorrect binding receiver for C API rb_eval_string()
- https://gist.github.com/eregon/31259907c132ab61e9f136d684b1fc39 is an easy way to have a single-file repro with both C code and Ruby code, it'd be nice if you can provide a complete repro as well.
-
05:33 PM Bug #18780 (Open): Incorrect binding receiver for C API rb_eval_string()
- OK, finally the issue is clear.
Could you try with latest master?
With #18487 I believe you should get a RuntimeError if you call `binding` from a C frame/method.
That also makes it clear one should not try to get a Binding from a... -
05:02 PM Bug #18780: Incorrect binding receiver for C API rb_eval_string()
- Eregon (Benoit Daloze) wrote in #note-3:
> It's the same as TOPLEVEL_BINDING, isn't it?
> ...
No, it's not. It's the same as the caller's binding, *except* that the receiver/self is set to TOPLEVEL.
In other words:
## RUBY CODE
```
c... -
10:59 AM Bug #18780: Incorrect binding receiver for C API rb_eval_string()
- It's the same as TOPLEVEL_BINDING, isn't it?
It doesn't use any information from the caller, which is a C extension, which has binding, hence "no caller binding".
> so the answer of "just supply binding() to the method" is not really... -
04:47 AM Bug #18780: Incorrect binding receiver for C API rb_eval_string()
- That's actually not really true, there *is* a caller binding, as evidenced by the fact that you can *get* the binding inside of the eval.
So it sets up the binding() properly, *except* that binding().receiver is *incorrect* and it eff... -
03:41 PM Bug #18751: Regression on master for Method#== when comparing public with private method
- mame (Yusuke Endoh) wrote in #note-7:
> Let me confirm the current situation:
> ...
I think that is a good summary.
> Now, I wonder if it is really needed to store the visibility information in a Method object. Will just reverting 5... -
10:21 AM Bug #18751: Regression on master for Method#== when comparing public with private method
- @mame I'll let @jeremyevans0 reply since he knows better about the implementation details.
Your summary seems overall accurate to me. -
10:00 AM Bug #18751: Regression on master for Method#== when comparing public with private method
- It's okay for `==` to not be strong equality and be closer to equivalence. That's why we have different methods for "This is the identical thing" or "This is comparably equivalent". I always felt like `eql?` was better for "These are ide...
-
06:51 AM Bug #18751: Regression on master for Method#== when comparing public with private method
- Let me confirm the current situation:
* Both #18435 and #18729 focus on the same issue (an inconsistency due to the fact that a Method object skips ZSUPER method entry)
* In #18435, the visibility information is now stored in a Metho... -
03:28 PM Misc #18747: DevMeeting-2022-05-19
- * [Bug #18407] Behavior difference between integer and string flags to File creation (jeremyevans0)
* I don't think it's worth breaking backwards compatibility to allow File::BINARY to work on Unix.
* Do we want to reject this, or ... -
01:40 PM Bug #18061: Execshield test: libruby.so.N.N.N: FAIL: property-note test because no .note.gnu.property section found
- > Isn't Docker always Linux, regardless hosts?
Yes, Docker where `annocheck` is running in is always Linux (= `docker.io/fedora:latest` container). But the `target_os` (= "linux" on host os: Fedora and Ubuntu) in `common.mk` is maybe no... -
11:47 AM Bug #18061: Execshield test: libruby.so.N.N.N: FAIL: property-note test because no .note.gnu.property section found
- jaruga (Jun Aruga) wrote in #note-18:
> But as you said, it may work on Windows, Mac, *BSD too where Docker is installed. If it works there, maybe the current target `linux-test-annocheck` is not enough.
Isn't Docker always Linux, re... -
11:30 AM Bug #18061: Execshield test: libruby.so.N.N.N: FAIL: property-note test because no .note.gnu.property section found
- nobu (Nobuyoshi Nakada) wrote in #note-17:
> jaruga (Jun Aruga) wrote in #note-15:
> ...
I see. Thanks for explaining it, and thanks for fixing the issue on the commit https://github.com/ruby/ruby/commit/2411f0ad8cf608d6aae221ce4d803b5... -
03:19 AM Bug #18061: Execshield test: libruby.so.N.N.N: FAIL: property-note test because no .note.gnu.property section found
- jaruga (Jun Aruga) wrote in #note-15:
> @nobu what is your intent for this commit, https://github.com/ruby/ruby/commit/a7577dbfd3ea53cccf7aaf94208069784ad17791 ? What issue did you see?
`TEST_RUNNABLE` is a flag for native/cross comp... -
12:21 PM Feature #18774: Add Queue#pop(timeout:)
- There are several methods which should adopt timeouts, including `SizedQueue#push` and probably `Queue#each`, along with essentially any other blocking operations (e.g. `Kernel#system`, `Process#wait` etc).
I'd like to suggest we try to... -
12:00 PM Feature #18774: Add Queue#pop(timeout:)
- Also, this timeout is quite similar to IO.select's timeout (i.e. expected to timeout), and IO.select returns `nil` on timeout:
`r, w = IO.pipe; p IO.select([r], nil, nil, 1.0) => nil` -
08:34 AM Feature #18774: Add Queue#pop(timeout:)
- One precision: `nil` is the best option for performance (and convenience).
Using an exception on queue pop timeout would be a significant performance overhead, because an exception needs a stacktrace and that's slow on all Ruby implemen... - 11:44 AM Revision 11af23ee (git): Move feature deletion from GC mark to `autoload_delete`. (#5912)
-
10:54 AM Feature #14602: Version of dig that raises error if a key is not present
- There is also this blog post discussing about `dig_fetch`, which seems very similar: https://shopify.engineering/dig-fetch-truffleruby
```ruby
message = data.dig_fetch(:response, :message) { IdentityObject.new }
# instead of
message ... -
08:04 AM Feature #14602: Version of dig that raises error if a key is not present
- mame (Yusuke Endoh) wrote in #note-14:
> shyouhei (Shyouhei Urabe) wrote in #note-13:
> ...
Hmm, sorry. I was confusing. -
07:03 AM Feature #14602: Version of dig that raises error if a key is not present
- shyouhei (Shyouhei Urabe) wrote in #note-13:
> Doesn't interface with Arrays.
`[0, 0, 0].inject([[[:foo]]], :fetch) #=> :foo` ?
I don't think @nobu is serious about the idiom, though. -
06:18 AM Feature #14602: Version of dig that raises error if a key is not present
- nobu (Nobuyoshi Nakada) wrote in #note-12:
> ```ruby
> ...
Doesn't interface with Arrays. -
06:07 AM Feature #14602: Version of dig that raises error if a key is not present
- ```ruby
[:name, :middle].inject(hash, :fetch) # raises KeyError (key not found: :middle)
``` -
10:42 AM Bug #15790: Strange interaction between autoload and $LOADED_FEATURES
- There is some discussion on https://github.com/ruby/ruby/pull/5910#issuecomment-1128149901 as we well.
I think it'd be great to unify more the behavior when an autoload fail, and specifically avoid those "undefined constants" complete... -
10:09 AM Bug #18729: Method#owner and UnboundMethod#owner are incorrect after using Module#public/protected/private
- jeremyevans0 (Jeremy Evans) wrote in #note-14:
> I think you either treat a ZSUPER method like a method in the current class (this issue), or you treat it as a method in the ancestor (Ruby 3.1 and below behavior).
Yes, it should be l... - 07:12 AM Revision 60d45b2e (git): Restore implicit relationship between `autoload_const` and `autoload_data` during GC. (#5911)
-
04:55 AM Revision 8a907da0 (git): Suppress an unused-but-set-variable warning [ci skip]
- 03:15 AM Revision 1f537dc6 (git): * 2022-05-17 [ci skip]
-
03:14 AM Revision 2411f0ad (git): Set `target_os` for a7577dbfd3ea53cccf7aaf94208069784ad17791
05/16/2022
-
06:18 PM Bug #18787 (Closed): Use correct make rules
- Recently an improvement was made to the documentation adding some new files.
I was reading doc/contributing/building_ruby.md where explains how to debug the source code.
It is mentioning about make lldb-runruby and make gdb-runruby... -
05:09 PM Bug #18061: Execshield test: libruby.so.N.N.N: FAIL: property-note test because no .note.gnu.property section found
- On the current latest master `f2dc97294086c31604a45ee350c4fa5d51762f45`, here is the result on my Fedora 35. The Fedora container and `annocheck` are not executed.
```
$ git clean -fdx
$ ./autogen.sh
$ ./configure --enable-shared --with... -
04:21 PM Bug #18061: Execshield test: libruby.so.N.N.N: FAIL: property-note test because no .note.gnu.property section found
- @nobu what is your intent for this commit, https://github.com/ruby/ruby/commit/a7577dbfd3ea53cccf7aaf94208069784ad17791 ? What issue did you see?
Before the commit, you see the `annocheck` was executed in `make test-annocheck` using Fed... -
08:20 AM Bug #18061: Execshield test: libruby.so.N.N.N: FAIL: property-note test because no .note.gnu.property section found
- @ioquatix My PR above was merged. Now after you rebase your PR on the latest master branch, you can test your PR with `make test-annocheck` on your local or test with CI with the following modification. Thanks.
```
$ git diff
diff -... - 02:43 PM Revision f2dc9729 (git): [ruby/set] Fix a typo
- https://github.com/ruby/set/commit/71a876ae81
-
02:39 PM Bug #18786 (Closed): Rescuing NotImplementedError from `GC.verify_compaction_references` can lead to infinite loop on platforms
- `GC.verify_compaction_references` throws an NotImplementedError on platforms that do not support it as is expected.
However, rescuing this exception after calling the method can lead to an infinite loop later.
The infinite loop was obs... - 12:50 PM Revision f626998c (git): Delete autoload data from global features after autoload has completed. (#5910)
- * Update naming of critical section assertions macros.
* Improved locking for autoload. -
10:40 AM Bug #18780 (Rejected): Incorrect binding receiver for C API rb_eval_string()
- rb_eval_string() is used inside C code/C extensions, there is no "caller Binding" to use, C extension frames have no Binding.
If you want to eval with a specific Binding, capture it (e.g., with Kernel#binding in Ruby code), then pass it... -
10:27 AM Revision a7577dbf (git): `annobin` works only when targeting Fedora
- And hopefully for other Linux. Since it is not run on the build os,
`TEST_RUNNABLE` is not suitable for this case. -
10:15 AM Bug #18781: MJIT tests failing with Ubuntu focal with gcc-11 and some flags
- After fixing this issue, I hope you would delete the following part to test the fix. Thanks.
```
$ git diff
diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml
index ddb53cadb8..23c4ce925c 100644
--- a/.... -
09:09 AM Bug #18785 (Feedback): RbConfig::MAKEFILE_CONFIG["warnflags"] contains "-Wno-cast-function-type" which is not compatible with clang 13.0.0
- Hi,
I was having an issue installing the curses gem: https://github.com/ruby/curses/issues/41#issuecomment-1127293843
A minimal reproduction script is:
```ruby
require "mkmf"
curses = ["ncurses.h"]
convertible_int('chtype... -
09:04 AM Feature #18784 (Closed): `FileUtils.rm_f` and `FileUtils.rm_rf` should not mask exceptions
- In recent times, I've been having issues with these methods because they don't let you know when some issue happened while trying to remove the given folders/files.
IMO most users expect all pre-existing folders/files that are passed ... -
08:24 AM Revision 641c3830 (git): [rubygems/rubygems] Use `Array#concat` in `SpecSet#for` to save memory
- On `rails/rails` repository Gemfile, running the following script
```
# script.rb
require "bundler/setup"
```
#### Before
```
➜ rails git:(main) ✗ BUNDLER_VERSION=2.4.0.dev ruby-memory-profiler --pretty --no-detailed --allocated-stri... -
08:24 AM Revision c380aac1 (git): [rubygems/rubygems] Improve `bundler/setup` performance again
- On a different patch, it was noticed Ngam Pham that we are calling
`LazySpecification#hash` many times, and simply memoizing that led to a
very considerable performance improvement in his app.
I noticed though that we shouldn't be calli... - 08:10 AM Revision dccfff94 (git): Add `make test-annocheck` to detect security issues.
- * Note that as the annocheck binary package is not available on Ubuntu, and it
is working in progress in Debian, the script uses Fedora container, and
it requires docker or podman command.
https://www.debian.org/devel/wnpp/itp.en.h... - 03:24 AM Revision 36efb2a1 (git): * 2022-05-16 [ci skip]
-
03:24 AM Revision 774b9e27 (git): [ruby/racc] [DOC] Remove stale `Object::ParseError` documentation
- https://github.com/ruby/racc/commit/4ecc13c9cb
-
12:21 AM Bug #15790: Strange interaction between autoload and $LOADED_FEATURES
- > The behaviour described here does not seem strange to me
What do you mean Samuel?
You don't find strange that we pass from "no autoload for X" to "there's an autoload for X", without having set an autoload for X in between? (No threa...
05/15/2022
-
11:36 PM Bug #18782: Race conditions in autoload when loading the same feature with multiple threads.
- Okay, so I suspected some issue with `autoload_delete` and finally found how to reproduce it.
```c
static void
autoload_delete(VALUE mod, ID id)
{
RB_VM_LOCK_ENTER();
st_data_t val, load = 0, n = id;
if (st_looku... -
02:36 AM Bug #18782: Race conditions in autoload when loading the same feature with multiple threads.
- PR: https://github.com/ruby/ruby/pull/5898
-
02:29 AM Bug #18782: Race conditions in autoload when loading the same feature with multiple threads.
- After debugging the above issue I found a use-after-free bug in
```c
static void
autoload_c_free(void *ptr)
{
struct autoload_const *ac = ptr;
ccan_list_del(&ac->cnode); // <- can mess up other unrelated objects if parent linke... -
02:58 PM Misc #16112: Reduce the possibility of "expand tabs" commit occurrences
- > cons: Pollute git blame result when -w option is not specified.
Not sure if this will ever be reconsidered, but just in case:
Git 2.23.0 added an `--ignore-revs-file` switch for this purpose: https://www.git-scm.com/docs/git-blam... -
01:48 PM Bug #15790: Strange interaction between autoload and $LOADED_FEATURES
- Another weird edge case we have now:
```
File.write("./empty.rb", "Y = 1")
autoload :X, "./empty.rb"
begin
pp X
rescue NameError => error
pp error
# #<NameError: uninitialized constant Y>
end
pp autoload? :X
# nil
... -
01:34 PM Bug #15790: Strange interaction between autoload and $LOADED_FEATURES
- Let me add, that I think it's also reasonable sequence of events/state transition:
```
before failed autoload autoload path is "/Users/fxn/tmp/x.rb"
after failed autoload autoload path is "/Users/fxn/tmp/x.rb"
after $LOADED_FEATURE... -
01:32 PM Bug #15790: Strange interaction between autoload and $LOADED_FEATURES
- The behaviour described here does not seem strange to me, at least, I'm not sure if it's problematic. @fxn what was the actual issue at the root of the behaviour described here?
Even more challenging is how this PR is implemented, giv... - 04:07 AM Revision 105609d3 (git): * 2022-05-15 [ci skip]
- 04:07 AM Revision 32de6097 (git): Fix various autoload race conditions. (#5898)
- * Add RUBY_VM_CRITICAL_SECTION for detecting unexpected context switch.
* Prevent race between GC mark and autoload setup.
* Protect race on autoload state.
* Avoid potential race condition when allocating `autoload_featuremap`.
* Ad... -
03:46 AM Bug #18783 (Closed): OptionParser should recognize "-" as an optional argument
- ``` ruby
require 'optparse'
optarg = nil
OptionParser.new do |parser|
parser.on("-o", "--opt [ARG]", "Option with optional argument") do |arg|
optarg = arg
end
end.parse!
puts "#{optarg.inspect}, #{ARGV.inspect}"
`... -
03:36 AM Bug #18781 (Assigned): MJIT tests failing with Ubuntu focal with gcc-11 and some flags
05/14/2022
-
11:06 PM Bug #18782: Race conditions in autoload when loading the same feature with multiple threads.
- @normalperson I've attached patch files. If you have time, I'd really appreciate your feedback on this. Specifically, patch 5 - freeing this unconditionally causes the Ruby VM to hang in `test-bundler-parallel` and I'm not sure why. Here...
-
11:01 PM Bug #18782 (Closed): Race conditions in autoload when loading the same feature with multiple threads.
- I have identified several race conditions in the autoload code.
1. It's possible to race on adding and then deleting items in `autoload_featuremap`. When this happens, two threads will try to load the same file with different autoload... -
01:38 PM Revision 48002ff1 (git): [ruby/fileutils] [DOC] Enhanced RDoc for #ln (https://github.com/ruby/fileutils/pull/69)
- Enhanced RDoc for #ln
https://github.com/ruby/fileutils/commit/79fc67f03f
Co-authored-by: Peter Zhu <peter@peterzhu.ca> -
09:06 AM Feature #17363: Timeouts
- marcandre (Marc-Andre Lafortune) wrote in #note-10:
> We could also define `::TimeoutError` as base class, and modify `timeout` lib so that `Timeout::Error < ::TimeoutError` instead of `==` as it is currently.
I think there is actual... -
07:14 AM Bug #15307: TestJIT#test_{catching_deep_exception,compile_insn_throw,lambda_longjmp} segfaults with gcc-8 -fcf-protection
- > It doesn't seem relevant to the issue described in this ticket. Could you file another one?
Oh sorry for my mistake. I opened another ticket: https://bugs.ruby-lang.org/issues/18781 now.
-
12:26 AM Bug #15307: TestJIT#test_{catching_deep_exception,compile_insn_throw,lambda_longjmp} segfaults with gcc-8 -fcf-protection
- It doesn't seem relevant to the issue described in this ticket. Could you file another one?
-
07:12 AM Bug #18781 (Closed): MJIT tests failing with Ubuntu focal with gcc-11 and some flags
- I find some MJIT tests failing in `test/ruby/test_jit.rb` and `test/ruby/test_rubyvm_jit.rb` on gcc 11 on Ubuntu focal on the latest master branch `708e839dee57bc5ef8f5b21fb4fa620e89caeb52` on CI. [Here](https://github.com/ruby/ruby/runs...
05/13/2022
-
11:39 PM Bug #15307: TestJIT#test_{catching_deep_exception,compile_insn_throw,lambda_longjmp} segfaults with gcc-8 -fcf-protection
- It seems I faced this issue on gcc 11 on Ubuntu focal on the latest master branch 708e839dee57bc5ef8f5b21fb4fa620e89caeb52 .
Here is the result of GitHub Actions on Ubuntu focal. The used configure options are `./configure --enable-sh... -
11:00 PM Bug #18780 (Closed): Incorrect binding receiver for C API rb_eval_string()
% ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]
(Though looking at the source code this problem still exists in ruby 3.0)
The rb_eval_string() is seemingly capable of everything that eval is capable of, ...-
08:26 PM Revision 708e839d (git): Fix compiler warning when USE_RVARGC=0
-
08:12 PM Bug #18061: Execshield test: libruby.so.N.N.N: FAIL: property-note test because no .note.gnu.property section found
- I am testing Samuel's PR: <https://github.com/ruby/ruby/pull/5895>.
To pass the security tool, `annocheck` with the PR, I am trying to build with minimal compiler flags.
I am using the following gcc on my local.
```
$ gcc --ver... - 08:02 PM Revision 51fab060 (git): * 2022-05-14 [ci skip]
-
08:02 PM Revision 9639dc91 (git): [ruby/logger] [DOC] Enhanced RDoc for Logger (https://github.com/ruby/logger/pull/77)
- Enhanced RDoc for Logger
https://github.com/ruby/logger/commit/c601ed0370
Co-authored-by: Peter Zhu <peter@peterzhu.ca> -
02:47 PM Revision 09c72f41 (git): Print function name in backtrace when available
- If we don't have `saddr` but have `sname` we should output `sname`.
-
02:23 PM Misc #18747: DevMeeting-2022-05-19
- * [Feature #18742] Introduce a way to tell if a method invokes the `super` keyword or not
* It's currently possible to do this with RubyVM::InstructionSequence, but non-portable and a bit slow.
* I think it would be useful and chea... -
01:54 PM Bug #18779 (Closed): `GC.compact` and other compaction related methods should be defined as rb_f_notimplement on non supported platforms.
- I received several bug report on native gems using `GC.verify_compaction_references` in their test suite.
Examples:
- https://github.com/msgpack/msgpack-ruby/pull/275/files
- https://github.com/Shopify/bootsnap/pull/414/files
... -
01:52 PM Revision 55ba4144 (git): [ruby/logger] Update lib/logger.rb
- https://github.com/ruby/logger/commit/a5a2f2da4a
Co-authored-by: Peter Zhu <peter@peterzhu.ca> -
01:52 PM Revision 1f1283b9 (git): [ruby/logger] Update lib/logger.rb
- https://github.com/ruby/logger/commit/e6f2c64fc6
Co-authored-by: Peter Zhu <peter@peterzhu.ca> -
01:52 PM Revision 45a92cc4 (git): [ruby/logger] Update lib/logger.rb
- https://github.com/ruby/logger/commit/3dc5a8d7a4
Co-authored-by: Peter Zhu <peter@peterzhu.ca> -
01:52 PM Revision 00635f8d (git): [ruby/logger] Update lib/logger.rb
- https://github.com/ruby/logger/commit/98919e09e5
Co-authored-by: Peter Zhu <peter@peterzhu.ca> -
01:52 PM Revision 2427a11b (git): [ruby/logger] Update lib/logger.rb
- https://github.com/ruby/logger/commit/073a892ad9
Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com> -
01:52 PM Revision b9311e64 (git): [ruby/logger] Update lib/logger.rb
- https://github.com/ruby/logger/commit/6d91281f7f
Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com> -
01:52 PM Revision e36a794f (git): [ruby/logger] Update lib/logger.rb
- https://github.com/ruby/logger/commit/34c0ba8baa
Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com> -
01:52 PM Revision 90d8b721 (git): [ruby/logger] Enhanced RDoc for Logger
- https://github.com/ruby/logger/commit/16556d06d1
-
01:17 PM Feature #18742: Introduce a way to tell if a method invokes the `super` keyword
- Thank you for the suggestion, and I apologize for the late reply.
This works remarquably well.
```ruby
class UnboundMethod
def calls_super?
iseqs = [RubyVM::InstructionSequence.of(self)]
iseqs.any? do |iseq|
iseq... -
11:32 AM Feature #17316: On memoization
- I've been experimenting with doing memoization by passing a block to `attr_reader` / `attr_accessor`, e.g.
```ruby
attr_reader(:foo) { something_slow }
```
or
```ruby
attr_reader :foo do
something_slow
end
```
I prototyped this in ... -
09:54 AM Bug #18778 (Third Party's Issue): Crash on MacOS 12.1 (Monterey) , M1 Max CPU
- This is a duplicate of #18555 and many tickets. See https://github.com/ffi/ffi/issues/800#issuecomment-1008308614 for solution.
-
08:18 AM Bug #18778 (Third Party's Issue): Crash on MacOS 12.1 (Monterey) , M1 Max CPU
- This bug happens ALWAYS when I try to run CocoaPods.
-
06:23 AM Revision 4c9ddaac (git): [rubygems/rubygems] Fix `Gemfile.lock` versions leaking to `bundler/inline` install output
- The lockfile is completely ignored in inline mode, yet the previous
output would suggest it wasn't.
https://github.com/rubygems/rubygems/commit/763125a745 -
06:23 AM Revision 4962e5c4 (git): [rubygems/rubygems] Normalize parameter name
- The other sources use `options` which reads better.
https://github.com/rubygems/rubygems/commit/a672f9d602 -
02:45 AM Bug #18777: NDEBUG macro defined after including ruby.h
- shyouhei (Shyouhei Urabe) wrote in #note-1:
> This is intentional. Devs hate assertions. See also https://bugs.ruby-lang.org/issues/16837 .
Thanks for confirming.
Here is the workaround I use, should anybody with the same issue need a... -
01:43 AM Bug #18777 (Closed): NDEBUG macro defined after including ruby.h
- This is intentional. Devs hate assertions. See also https://bugs.ruby-lang.org/issues/16837 .
-
01:11 AM Feature #18776: Object Shapes
- > struct rb_id_table * edges;
and I understand `edges` manages the next transitions. Thanks.
-
01:06 AM Feature #18776: Object Shapes
- jemmai (Jemma Issroff) wrote in #note-5:
> When we add a new ivar, if there is no transition we have to find a new ID. Right now we're doing a linear scan of available IDs. Once we're confident in shape ID GC, we'll switch the algorit...
05/12/2022
-
11:44 PM Revision 2d103207 (git): Stop `build_extensions` when DESTDIR set
- Try to fix `make install without root privilege` failures on snapshot CIs.
example: https://github.com/ruby/actions/actions/runs/2315349280 -
09:34 PM Revision ebaf56c0 (git): YJIT: Implement getblockparam
- This implements the getblockparam instruction.
There are two cases we need to handle depending on whether or not
VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM is set in the environment flag.
When the modified flag is unset, we need to call rb_vm_... -
08:23 PM Bug #18777 (Closed): NDEBUG macro defined after including ruby.h
- Hello,
When using ruby 3+, including `ruby.h` results in the `NDEBUG` macro becoming defined, which deactivates assertions.
This simple (see attached `test.c` file) example illustrates this:
```C
#include <assert.h>
#include <ruby... -
08:20 PM Feature #18776: Object Shapes
- > If you call memoized methods in a different order, would that cause instances of the same class to have multiple shapes?
Yes. -
08:05 PM Feature #18776: Object Shapes
- If you call memoized methods in a different order, would that cause instances of the same class to have multiple shapes?
-
06:46 PM Feature #18776: Object Shapes
- byroot (Jean Boussier) wrote in #note-7:
> > it definitely would be easier if we had more than 16 bits
> ...
When we measured on Shopify core it was before we had started implementing shape GC. There were ~40k shapes, but that was t... -
06:19 PM Feature #18776: Object Shapes
- > it definitely would be easier if we had more than 16 bits
Yeah, my worry is that while the Shopify monolith is probably among the bigger codebases, ~40k out of ~65k is really not that much leeway. -
03:59 PM Feature #18776: Object Shapes
- byroot (Jean Boussier) wrote in #note-4:
> > We want object shapes to be enabled on 32 bit systems and 64 bit systems so that limits us to the bottom 32 bits of the Object header.
> ...
I'm not sure how popular 32 bit systems are, esp... -
03:56 PM Feature #18776: Object Shapes
- Thanks for the feedback, Koichi.
ko1 (Koichi Sasada) wrote in #note-3:
> * how to use parent id?
The `rb_shape` type is as follows:
```C
struct rb_shape {
VALUE flags;
struct rb_shape * parent;
struct rb_id_table * edges;... -
12:41 PM Feature #18776: Object Shapes
- > We want object shapes to be enabled on 32 bit systems and 64 bit systems so that limits us to the bottom 32 bits of the Object header.
Might be a silly question, but how popular are 32bits systems these days? Would it be acceptable... -
01:24 AM Feature #18776: Object Shapes
- Great patch.
I'm looking forward to seeing evaluation results.
Questions:
* how to use parent id?
* how to find next id with additional ivar?
- 07:20 PM Revision 14ae97de (git): * remove trailing spaces. [ci skip]
-
07:19 PM Revision a6ce73ef (git): Add documentation section to README
- 07:08 PM Revision 30d0f08c (git): * 2022-05-13 [ci skip]
-
07:08 PM Revision f07a0e79 (git): YJIT: Fix getting the EP with registers other than RAX (#5882)
- Before this commit we were accidentally clobbering RAX. Additionally,
since this function had RAX hardcoded then the function may not have
worked with registers other than RAX.
Co-authored-by: John Hawthorn <john@hawthorn.email> -
05:45 PM Feature #9045 (Closed): URIに含まれるエンコードされたID/パスワードがデコードされない
- Applied in changeset commit:git|fbebfe1697938a684f460cd28af36cf1f056513c.
----------
[ruby/uri] Add URI::Generic#decoded_#{user,password}
URI::Generic#{user,password} return the encoded values, which are
not that useful if you want to ... -
01:44 PM Feature #18654: Enhancements to prettyprint
- @akr okay, thank you for the consideration. I'm going to maintain it as a separate project in this case as I don't see a way around some of your concerns.
-
01:37 PM Feature #18642: Named ripper fields
- To respond to your points @mame:
* It can live in a gem, and it is in https://github.com/ruby-syntax-tree/syntax_tree. The issue is, it's hard to maintain completely outside the ruby/ruby repository because if things change it's hard ... - 10:36 AM Revision 75223433 (git): .github/workflows/compilers.yml: Add configure --enable-mkmf-verbose case.
- 10:36 AM Revision 019cbded (git): mkmf: Add a configure option to set verbose mode (V=1 or 0) in mkmf.rb.
- Note this change is only for `configure.ac`, not for Windows using
`win32/configure.bat`.
```
$ ./configure --help | grep mkmf
--enable-mkmf-verbose enable verbose in mkmf
```
Run the following command to enable the mkmf verbose mo... -
09:19 AM Revision 40ca208a (git): [ruby/uri] Improve URI.register_scheme tests and automatically upcase the given scheme
- * Also add docs and mention current limitations.
* For reference, https://stackoverflow.com/a/3641782/388803 mentions the
valid characters in schemes.
https://github.com/ruby/uri/commit/4346daac75 -
05:54 AM Revision fbebfe16 (git): [ruby/uri] Add URI::Generic#decoded_#{user,password}
- URI::Generic#{user,password} return the encoded values, which are
not that useful if you want to do authentication with them.
Automatic decoding by default would break backwards compatibility.
Optional automatic decoding via a keyword to... - 01:06 AM Revision 054ae999 (git): [ruby/uri] Update file.rb
- The module here is called `URI`, so it's probably reasonable to expect a requirement for the path to be RFC3986-compliant, but on the other hand, the class is called `File`, so it might be reasonable to expect that a path produced by e.g...
-
01:04 AM Bug #18464: RUBY_INTERNAL_EVENT_NEWOBJ tracepoint causes an interpreter crash when combined with Ractors
- Just checked, this is still an issue with 3.2.0-preview1. Is there any feedback on the patch I posted? Any other way you would suggest going about a solution? Thanks!
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 <peter@peterzhu.ca>
-
07:11 PM Revision 01916934 (git): [ruby/fileutils] Update lib/fileutils.rb
- https://github.com/ruby/fileutils/commit/4771925fee
Co-authored-by: Peter Zhu <peter@peterzhu.ca> -
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 <peter@peterzhu.ca>
co-authored-by: Stan Lo <stan001212@gmail.com> -
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