Project

General

Profile

Activity

From 06/25/2020 to 07/01/2020

07/01/2020

11:42 PM Feature #17004: Provide a way for methods to omit their return value
Are there examples (for example from known gems) where this would actually be useful? marcandre (Marc-Andre Lafortune)
05:04 PM Feature #17004: Provide a way for methods to omit their return value
The more I think about this, the more it concerns me. If there is some library code like this:
``` ruby
def do_something_and_return_report
something = do_something
if RubyVM.return_value_used?
create_report(something)
...
tenderlovemaking (Aaron Patterson)
05:02 PM Feature #17004: Provide a way for methods to omit their return value
> I'd see an explicit caution such as "DO NOT ABUSE THIS!" in its document.
It will definitely be abused.
I do not think this should be exposed to user code in any way. If you want a method to either return a result or not dependin...
headius (Charles Nutter)
04:52 PM Feature #17004: Provide a way for methods to omit their return value
I will add that although I can see the same potential problem with the C api I am less concerned it will lead to the same problems I outlined in Core MRI code. enebo (Thomas Enebo)
04:42 PM Feature #17004: Provide a way for methods to omit their return value
Reposted from github issue:
"Having only thought about this for about half an hour I am concerned with this feature. Will this lead to people writing APIs where the users of that API need to worry about whether they are assigning the me...
enebo (Thomas Enebo)
04:14 PM Feature #17004: Provide a way for methods to omit their return value
As an example, I don't think using such a manual optimization in OptCarrot (default mode) would be appropriate (it would feel like a hack). Eregon (Benoit Daloze)
04:10 PM Feature #17004: Provide a way for methods to omit their return value
What Jeremy said, so in short RubyVM is not a good place for this because it's CRuby-specific (ExperimentalFeatures or Kernel would be OK IMHO).
Do you have measurements on real applications, not just micro-benchmarks?
The masgn ca...
Eregon (Benoit Daloze)
04:02 PM Feature #17004: Provide a way for methods to omit their return value
My first impression is that this is a very bad tool to change method behavior depending upon its caller context. However, my second consideration is that such a bad thing is already possible by some ways like `Kernel#caller`. So I'm ne... mame (Yusuke Endoh)
03:42 PM Feature #17004: Provide a way for methods to omit their return value
I can see definite performance advantages to this in my libraries (specifically Sequel). Knowing that the return value is not used can save expensive database queries to determine what the return value should be.
I think it may be be...
jeremyevans0 (Jeremy Evans)
03:41 PM Feature #17004: Provide a way for methods to omit their return value
In `rb_whether_the_return_value_is_used_p` I believe `whether_the` is redundant with `p`. `is` also seems unnecessary here, so perhaps `rb_return_value_used_p` and `return_value_used?` are good enough?
There is a possible concern if thi...
headius (Charles Nutter)
09:24 AM Feature #17004 (Open): Provide a way for methods to omit their return value
In ruby, it often is the case for a method's return value to not be used by its caller. Even when a method returns something meaningful, its caller is free to ignore it.
Why not provide a way for a method to know if its return value ...
shyouhei (Shyouhei Urabe)
07:59 PM Bug #17005 (Third Party's Issue): lib_gssapi.rb:182: [BUG] Segmentation fault at 0x000000000000004d
Looks like an issue with the gssapi gem and not Ruby. There is an issue on the gssapi repository that looks the same:
https://github.com/zenchild/gssapi/issues/12
The issue was closed but I guess no fix: https://github.com/zench...
tenderlovemaking (Aaron Patterson)
07:51 PM Bug #17005: lib_gssapi.rb:182: [BUG] Segmentation fault at 0x000000000000004d
In case it is of any use:
```
Alberts-MacBook-Pro:dcache_deploy arossi$ /opt/puppetlabs/bolt/bin/gem list | grep krb
net-ssh-krb (0.5.1)
```
```
Alberts-MacBook-Pro:dcache_deploy arossi$ /opt/puppetlabs/bolt/bin/gem list | grep...
alrossi55 (Albert Rossi)
07:49 PM Bug #17005 (Third Party's Issue): lib_gssapi.rb:182: [BUG] Segmentation fault at 0x000000000000004d
I am running Bolt from a MacBook Pro (mid-2014) with Mojave 10.14.6.
My organization requires us to use kerberized ssh to contact internal nodes.
Here are the ruby/gem versions packaged with this version of puppet-bolt:
```
/o...
alrossi55 (Albert Rossi)
05:36 PM Feature #17000: 2.7.2 turns off deprecation warnings by default
> This also makes it easier to turn on keyword warnings (-w vs -W:keyword_deprecated). The downside is it also turns on other verbose warnings, which the user may not be interested in.
Yes, that would be a big problem for us. We hook ...
byroot (Jean Boussier)
03:51 PM Feature #17000: 2.7.2 turns off deprecation warnings by default
An alternative approach to adding `Warning[:keyword_deprecated]` that would be easier to implement in 2.7 and would not require changes to master would be only printing keyword argument warnings in verbose mode. This should be a one-lin... jeremyevans0 (Jeremy Evans)
02:47 PM Feature #17000: 2.7.2 turns off deprecation warnings by default
nagachika-san, thank you for your reply!
nagachika (Tomoyuki Chikanaga) wrote in #note-2:
> I worried about a kind of discontinuity of the some deprecation warnings.
I agree that it is best to disable only keyword-related warnings...
mame (Yusuke Endoh)
12:34 PM Feature #17000: 2.7.2 turns off deprecation warnings by default
I understand the pain point discussion of warning for the 3.0 keyword arguments, and I agree to turn off the warning for keyword arguments in ruby_2_7 branch.
But the proposed changesets in the pull request https://github.com/ruby/rub...
nagachika (Tomoyuki Chikanaga)
05:26 PM Feature #17002: Extend heap pages to exactly 16KiB
I chatted with @tenderlovemaking a bit about this.
I did some research as well and my reading of this "extra" metadata from malloc seems to indicate that you really should not assumptions about it being in a specific place, or a speci...
headius (Charles Nutter)
01:41 PM Revision 49029811 (git): Reduced working `Rational` object allocations
When rationalizing negative values. nobu (Nobuyoshi Nakada)
01:41 PM Revision 254bed30 (git): Renamed `nurat_sub` compliant with `rb_rational_plus`
nobu (Nobuyoshi Nakada)
01:41 PM Revision 53d2bfd5 (git): Added a few integer case short-circuits
nobu (Nobuyoshi Nakada)
01:41 PM Revision 29ecce4d (git): Replaced f_odd_p with rb_int_odd_p
nobu (Nobuyoshi Nakada)
09:51 AM Revision 68d7e93b (git): * 2020-07-01 [ci skip]
git[bot]
09:50 AM Revision 0aac138e (git): Merge json-2.3.1 from flori/json
hsbt (Hiroshi SHIBATA)
09:47 AM Revision 26041da2 (git): [flori/json] Typo fix
https://github.com/flori/json/commit/26c1769969 Marc-Andre Lafortune
09:47 AM Revision d69b55ac (git): [flori/json] Added :call-seq: to RDOc for some methods
https://github.com/flori/json/commit/ee5b6a74e9 burdettelamar (Burdette Lamar)
09:47 AM Revision cb3e6251 (git): [flori/json] Use frozen string for hash key
When use non-frozen string for hash key with `rb_hash_aset()`, it will duplicate and freeze it internally.
To avoid duplicate and freeze, this patch will give a frozen string in `rb_hash_aset()`.
```
Warming up -------------------------...
watson1978 (Shizuo Fujita)
09:47 AM Revision 7d8ce96d (git): [flori/json] RDoc enhancements
https://github.com/flori/json/commit/ada48f0236 burdettelamar (Burdette Lamar)
09:47 AM Revision be644738 (git): [flori/json] RDoc enhancements
https://github.com/flori/json/commit/470d909c0d burdettelamar (Burdette Lamar)
09:47 AM Revision 99980b30 (git): [flori/json] RDoc enhancements
https://github.com/flori/json/commit/7bee2c7c13 burdettelamar (Burdette Lamar)
09:47 AM Revision fe10323a (git): [flori/json] Fix test that wasn't testing anything
https://github.com/flori/json/commit/d5c6566b41 Marc-Andre Lafortune
09:47 AM Revision 4689fd5f (git): [flori/json] Rdoc enhancements
https://github.com/flori/json/commit/e7e3732130 burdettelamar (Burdette Lamar)
08:41 AM Bug #17003 (Closed): Segfault during bundler specs on Windows
About a month ago, we got a segfault on Windows while running bundler specs in CI.
I'm posting the log here in case there's something obvious in there that needs fixing.
```
Failures:
1) [TEST_ENV_NUMBER=1] bundle add with --...
deivid (David Rodríguez)

06/30/2020

10:07 PM Feature #17002 (Closed): Extend heap pages to exactly 16KiB
Hi,
I would like to extend heap pages to be exactly 16KiB. Currently, `struct heap_page_body` is 16KiB - `(sizeof(size_t) * 5)`.
Before I list the reasons I want to change, there are two important facts I want to list. First, OS ...
tenderlovemaking (Aaron Patterson)
07:57 PM Feature #17001 (Open): [Feature] Dir.scan to yield dirent for efficient and composable recursive directory scaning
### Use case
When you need to recusrsively scan a directory, you either have to use `Dir[]` / `Dir.glob`, which is fine for small directories or simple patterns,
but can easily take several seconds to complete for large repositories ...
byroot (Jean Boussier)
04:29 PM Feature #17000: 2.7.2 turns off deprecation warnings by default
I understand (and also had to feel) the pain points. I can't imagine what this would have been with duplication warnings https://bugs.ruby-lang.org/issues/16289...
IIUC the proposal is basically to have "-W:no-deprecated" by default, ...
marcandre (Marc-Andre Lafortune)
11:52 AM Feature #17000 (Closed): 2.7.2 turns off deprecation warnings by default
Matz has decided to disable deprecation warnings for 3.0 keyword separation by default because many users feel them noisy and painful rather than useful. See https://discuss.rubyonrails.org/t/new-2-7-3-0-keyword-argument-pain-point/7498... mame (Yusuke Endoh)
02:58 PM Feature #16891 (Rejected): Restore Positional Argument to Keyword Conversion
jeremyevans0 (Jeremy Evans)
10:12 AM Revision 1351374b (git): Split visibility cases
nobu (Nobuyoshi Nakada)
10:12 AM Revision 52ef2477 (git): Extracted METHOD_ENTRY_CACHEABLE macro
nobu (Nobuyoshi Nakada)
10:12 AM Revision 74ac1283 (git): Evaluate macros argument just once
nobu (Nobuyoshi Nakada)
10:03 AM Revision 7cb8904a (git): Extract correct processor name for ARM64 Macs
segiddins (Samuel Giddins)
08:14 AM Revision 15a312ed (git): * 2020-06-30 [ci skip]
git[bot]
08:13 AM Revision eefc2d8a (git): Fix a typo [ci skip]
znz (Kazuhiro NISHIYAMA)
07:13 AM Feature #16984: Remove write barrier exemption for T_ICLASS
> Could you measure the memory/objects consumption before and after this patch if it is not difficult?
I took measurements on app B. It's a large Rails app with lots of classes and modules.
The amount of retained memory is not determ...
alanwu (Alan Wu)
04:48 AM Bug #16974 (Assigned): frozen string issue in lib/reline/ansi.rb on ruby-2.7.1
hsbt (Hiroshi SHIBATA)

06/29/2020

01:49 PM Bug #16988: Kernel.load loads file from current directory without '.' in path
nobu (Nobuyoshi Nakada) wrote in #note-1:
> I don’t this is an implementation bug, but a documentation issue.
Shouldn't behavior be consistent with require, though?
TheSmartnik (Nikita Misharin)
08:39 AM Bug #16998 (Closed): [Backport] support for Bison 3 to 2.6 and 2.7
To build with latest Bison 3.5, the following commits are needed.
### for [2.7]:
* `8e694129305a3978313cf4bcd463c6aa2ba9ceb4`
* `47720e2255f34ecad49763c66a7ea02a55a3f60a` (commit log has a typo)
### for [2.6] and [2.5], preceding...
nobu (Nobuyoshi Nakada)
07:59 AM Feature #16378: Support leading arguments together with ...
Thank you for your notice and providing the patch. I will take a look into it. nagachika (Tomoyuki Chikanaga)
04:25 AM Revision 3621a7de (git): Avoid deprecated OpenSSL::Digest constants
bdewater (Bart de Water)
03:33 AM Revision 1ce9c372 (git): Revert "RBIMPL_UNREACHABLE_RETURN: evaluate the argument"
This reverts commit c8dc2bf1401fc01d35a4a7587ed224f1f2fe29e6.
No longer necessary.
shyouhei (Shyouhei Urabe)
02:43 AM Revision 94ab244b (git): rb_class_modify_check: add UNREACHABLE
(I was not aware of this because I use clang, but) it seems gcc cannot
detect reachablility of this point. It renders an unused variable
warning, which is a false positive. Let us suppress the compiler.
https://github.com/ruby/ruby/ru...
shyouhei (Shyouhei Urabe)
02:06 AM Revision 1020e120 (git): * 2020-06-29 [ci skip]
git[bot]
02:05 AM Revision a523eca1 (git): rb_enc_symname_type: refactor split
Reduce goto by splitting the function. shyouhei (Shyouhei Urabe)
02:05 AM Revision 2bd0f37e (git): glob_opendir: move cleanup codes at the end
Nobu likes this arrangement. shyouhei (Shyouhei Urabe)
02:05 AM Revision da8af471 (git): find_time_t: reset status before goto
shyouhei (Shyouhei Urabe)
02:05 AM Revision de3e931d (git): add UNREACHABLE_RETURN
Not every compilers understand that rb_raise does not return. When a
function does not end with a return statement, such compilers can issue
warnings. We would better tell them about reachabilities.
shyouhei (Shyouhei Urabe)
02:05 AM Revision c8dc2bf1 (git): RBIMPL_UNREACHABLE_RETURN: evaluate the argument
Prevent casual typos inside of UNREACHABLE_RETURN(...). shyouhei (Shyouhei Urabe)
02:05 AM Revision bacd03eb (git): compile_redo: fix wrong condition
shyouhei (Shyouhei Urabe)
02:05 AM Revision 2b636dc8 (git): make_exception: early return
The rb_exc_new3() result is already ready to be returned. No need to
fall through the switch.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 801752f5 (git): builtin_class_name: add variant that return VALUE
Found that `if (builtin_class_name) { printf } else { printf }` happens
twice. It would be better if we could eliminate those if statements.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 2071c61e (git): tracepoint_inspect: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 1bf0d361 (git): vm_getivar: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 6e67b305 (git): method_missing: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision edb1680a (git): rb_method_call_status: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision f12efec2 (git): vm_exec_handle_exception: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision b95b2497 (git): rb_mod_remove_cvar: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 1e9d5839 (git): rb_copy_generic_ivar: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision fc45a061 (git): generic_ivar_update: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 421db59c (git): rb_path_to_class: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 3d636ecc (git): make_econv_exception: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision fd0e9358 (git): time_mload: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision ed6938ef (git): indent [ci skip]
shyouhei (Shyouhei Urabe)
02:05 AM Revision 83f6de86 (git): find_time_t: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision ce6be888 (git): utc_offset_arg: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 1c0a97bf (git): vtm_add_offset: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 0fc56936 (git): num_exact: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision f402dc35 (git): rb_szqueue_push: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 8fc89121 (git): exec_recursive: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 08fc718e (git): indent [ci skip]
shyouhei (Shyouhei Urabe)
02:05 AM Revision ad6512f3 (git): rb_enc_synmane_type: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 5f926b2b (git): rb_str_partition: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision e3d821a3 (git): rb_str_crypt: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision a5ae9aeb (git): trnext: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision c7a40731 (git): chompped_length: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision fdae2063 (git): get_pat_quoted: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 673ddea9 (git): get_pat: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 31e5d138 (git): rb_str_slice_bang: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 19f2cabe (git): rb_str_aset: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 841eea4b (git): rb_str_subpat_set: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 0358846f (git): rb_str_update: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision d49924ed (git): rb_str_match: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision c422fc4b (git): rb_str_rindex_m: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision c29ec1ef (git): rb_str_index_m: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 6df790f2 (git): rb_enc_cr_str_buf_cat: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 31a770ac (git): rb_strftime_with_timespec: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision b5eeb345 (git): trap_handler: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 224e9c38 (git): signm2signo: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 7cf46256 (git): feature_option: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 689dd3ae (git): parse_rat: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision d7eec15f (git): rb_rational_cmp: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 9c5804ac (git): range_each: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision cc27cd26 (git): rand_range: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 08202d1f (git): check_exec_redirect: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 92986313 (git): check_exec_redirect_fd: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 2bfac015 (git): proc_binding: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 3db15919 (git): rb_obj_singleton_method: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 8b9b51bb (git): rb_method_name_error: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 2390a8bd (git): bind_local_variable_get: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 82ed66a7 (git): rb_cstr_to_dbl_raise: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 06ed9a7a (git): rb_convert_to_integer: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 26896207 (git): rb_mod_const_location: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 60212cd8 (git): rb_mod_const_defined: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 3b8d9bad (git): rb_mod_const_get: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 1f6e7410 (git): class_or_module_required: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 03354feb (git): fix_pow: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 250189f5 (git): int_pow: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision bf19820b (git): flo_to_s: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 41703fcf (git): r_object0: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 6575766e (git): search_required: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision e551dfda (git): rb_feature_p: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 9e92292e (git): rb_io_modestr_fmode: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 0e4ee715 (git): rb_io_each_codepoint: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 1e846142 (git): rb_hash_transient_heap_evacuate: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 5f605382 (git): any_hash: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision b5adaa8d (git): goruby_options: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision c5f43451 (git): get_envparam_double: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 22811848 (git): gc_marks_finish: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision e9cb092b (git): rb_f_stat: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 4606ec49 (git): make_exception: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 13bdbfce (git): setup_exception: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 0b1b7345 (git): rb_class_modify_check: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision a2677815 (git): rb_check_typeddata: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision c47b805d (git): add spaces [ci skip]
shyouhei (Shyouhei Urabe)
02:05 AM Revision d060ebf8 (git): sum_iter: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 5e960545 (git): dln_find_1: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 99073f49 (git): glob_opendir: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 70857ae1 (git): glob_make_pattern: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 9c92dcf3 (git): ibf_dump_object_object: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision a8d992ac (git): compile_call: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision aa2cb7f7 (git): compile_redo: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision cf29de7e (git): compile_next: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision cc1e9b8e (git): compile_break: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 1f90690a (git): compile_branch_condition: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision a6b1454a (git): optimize_checktype: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision a5342f46 (git): iseq_set_exception_table: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision a93da497 (git): cmp_clamp: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 3a3728e4 (git): singleton_class_of: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 86e3d637 (git): SPECIAL_SINGLETON: no longer used
This macro does not improve any readability and/or runtime performance. shyouhei (Shyouhei Urabe)
02:05 AM Revision 8d182b04 (git): builtin_lookup: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 9ec4f1f2 (git): rb_big_aref: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 184f0ab4 (git): rb_int_parse_cstr: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 5a7c0dd0 (git): str2big_scan_digits: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 4dfc2f2e (git): bary_mul_karatsuba_branch: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision e634a9d1 (git): node_children: do not goto into a branch
Was this an autogenerated function? This tendency of avoiding empty
branches are no longer preserved (see for instance NODE_IVAR). Let's
just delete those unnecessary jumps into branches.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 4f242554 (git): rb_ary_slice_bang: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 73f98d25 (git): ary_join_1: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 4dc83eef (git): rb_ary_aset: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 2d6f8db3 (git): add spaces [ci skip]
shyouhei (Shyouhei Urabe)
02:05 AM Revision 86c869fb (git): ary_ensure_room_for_unshift: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)
02:05 AM Revision 2e8d8d10 (git): rb_ary_behead: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
shyouhei (Shyouhei Urabe)

06/28/2020

07:07 PM Bug #16510: irb crashes when hitting 'Home' or 'End' keys
I noticed this issue when I connect to my Ubuntu 20.04 server and I press Home or End in the Rails console. This is a new issue introduced with Ruby 2.7.0.
I was using the macOS terminal and I had the Home key mapped to `\033[H` and the...
yvo@yvo.net (Yvo van Beek)
05:14 AM Revision 09b936d8 (git): Calculate header line count instead of hardcoding
nobu (Nobuyoshi Nakada)
05:12 AM Revision 1020f7e3 (git): Replace separators in input file name in header too
nobu (Nobuyoshi Nakada)
04:20 AM Revision 44a659ad (git): Replace ALT_SEPARATOR with SEPARATOR also in output file name
To suppress warnings by Visual C.
```
./integer.rb(5) : warning C4129: 'i' : unrecognized character escape sequence
./kernel.rb(21) : warning C4129: 'k' : unrecognized character escape sequence
```
nobu (Nobuyoshi Nakada)
01:40 AM Revision 48fb6299 (git): [ruby/fiddle] support for very old libffi
Define `Fiddle::TYPE_VARIADIC` only when `ffi_prep_cif_var` is
available, otherwise skip the test for it.
nobu (Nobuyoshi Nakada)

06/27/2020

09:26 PM Bug #16997 (Open): IO#gets converts some \r\n to \n with universal_newline: false
Reproduction code:
```
IO.binwrite "t.csv", ("a" * 100 + "\r\n") * 100
File.open("t.csv", encoding: "BOM|UTF-8", universal_newline: false) do |input|
p input.gets(nil, 32 * 1024) # => "a...a\n...\na...a\r\n...\r\n"
end
```
It ...
scivola20 (sciv ola)
07:12 PM Feature #16984: Remove write barrier exemption for T_ICLASS
Thank you for great work. This kind of hack can cause BUGs easily.
> Private app A's heap size is about 22 MiB compared to B's 250 MiB.
Could you measure the memory/objects consumption before and after this patch if it is not diffi...
ko1 (Koichi Sasada)
06:31 PM Feature #16986: Anonymous Struct literal
First of all, this is super cool idea!
I do have habit to use hash since it is seems to be elegant (as described in original proposal background section) and I end up having problems later (since I need to use fetch everywhere to get ...
retro (Josef Šimánek)
06:08 PM Feature #16986: Anonymous Struct literal
Other syntax ideas, by others:
* Other prefixes
* `::{a: 1}`
* `\{a: 1}`
* `<>` to indicate
* `{<> a:1}` for anonymous Struct.
* `{<A> a:1}` for named Struct, the name is `A`.
* Similar with `%`
* `{% a:1}` for anonymous Struc...
ko1 (Koichi Sasada)
05:55 PM Feature #16986: Anonymous Struct literal
# Q&A
## Splat like Hash literal and method arguments
https://bugs.ruby-lang.org/issues/16986#note-3
> I was wondering if ${} can do the following things compared to Hash literals:
Not allowed because of vulnerability concerns (please...
ko1 (Koichi Sasada)
02:28 PM Feature #16986: Anonymous Struct literal
I like the idea of being able to quickly create an anonymous Struct but am concerned about the use of `$` for the syntax since that hinders readability and causes confusion due to `$` generally denoting a *global variable*. Why not allow... bkuhlmann (Brooke Kuhlmann)
12:37 PM Feature #16986: Anonymous Struct literal
`struct = (a: 1, b: 2)` would be a great syntax, because I think anonymous struct is something like Tuple of Python.
But, there are two problems:
1. `()` returns `nil`, not an empty struct.
2. The meaning of `p(a: 1)` and `p (a: 1)...
ttanimichi (Tsukuru Tanimichi)
05:07 PM Revision 0703e014 (git): Mark some Integer methods as inline (#3264)
k0kubun (Takashi Kokubun)
05:03 PM Revision 247dd874 (git): * 2020-06-28 [ci skip]
git[bot]
04:37 PM Bug #16996: Hash should avoid doing unnecessary rehash
Dan0042 (Daniel DeLorme) wrote in #note-2:
> Shouldn't the rehash be tied to a change in the number of buckets rather than which method is used?
> ...
I think you might be confusing the re-organizing of a Hash's internal structure into...
marcandre (Marc-Andre Lafortune)
04:00 PM Bug #16996: Hash should avoid doing unnecessary rehash
Very surprising results for `Hash#dup`. I even tried `h.rehash` before the benchmark, with no effect.
Shouldn't the rehash be tied to a change in the number of buckets rather than which method is used?
`select{true}` doesn't change t...
Dan0042 (Daniel DeLorme)
11:48 AM Bug #16996: Hash should avoid doing unnecessary rehash
Completely agreed, `Hash#dup` should not rehash (and it already doesn't on TruffleRuby). Eregon (Benoit Daloze)
08:20 AM Bug #16996 (Closed): Hash should avoid doing unnecessary rehash
Pop quiz: Which is the fastest way to get a copy of a Hash `h`?
If, like me, you thought `h.dup` (of course, right?), you are actually wrong.
The fastest way is to call `h.merge`. Try it:
```
require 'benchmark/ips'
lengths ...
marcandre (Marc-Andre Lafortune)
04:03 PM Revision c405a8d3 (git): [ruby/fiddle] try bundled libffi by default
If no installed libffi found, use bundled libffi unless explicitly
`--disable-bundled-libffi` option is given.
nobu (Nobuyoshi Nakada)
02:54 PM Revision f2bcdc72 (git): [ruby/fiddle] Support MSWIN (#43)
https://github.com/ruby/fiddle/commit/f16e7ff6e0 Sutou Kouhei
02:54 PM Revision a40b390b (git): [ruby/fiddle] test windows: use _snprintf
https://github.com/ruby/fiddle/commit/aa261bdb9f Sutou Kouhei
02:54 PM Revision 6429b6d9 (git): [ruby/fiddle] Add missing include
https://github.com/ruby/fiddle/commit/4ca61efcd7 Sutou Kouhei
02:54 PM Revision ae18220f (git): [ruby/fiddle] Add support for variadic arguments
GitHub: fix GH-39
Reported by kojix2. Thanks!!!
https://github.com/ruby/fiddle/commit/6c4cb904dc
Sutou Kouhei
02:54 PM Revision 9f740aca (git): [ruby/fiddle] Use meaningful variable name
https://github.com/ruby/fiddle/commit/2cac24b7c8 Sutou Kouhei
02:54 PM Revision 50fbd00e (git): [ruby/fiddle] Use "do { } while (0)" to ensure requiring ";"
https://github.com/ruby/fiddle/commit/2155ae5979 Sutou Kouhei
02:40 PM Revision 0faf6c8c (git): Update to ruby/spec@6c466d4
Eregon (Benoit Daloze)
02:15 PM Revision 25fbc886 (git): Removed non-ASCII code to suppress warnings by localized compilers
nobu (Nobuyoshi Nakada)
01:51 PM Revision b3fa158d (git): Update to ruby/spec@b6b7752
Eregon (Benoit Daloze)
01:51 PM Revision 64d8c081 (git): Update to ruby/mspec@6cb1f10
Eregon (Benoit Daloze)
09:14 AM Feature #16812: Allow slicing arrays with ArithmeticSequence
> But a negative start with a non-negative end is quite weird. What is that operation even supposed to mean? What is it useful for?
I believe such edge cases might emerge not being directly written, but when dynamically calculated. Im...
zverok (Victor Shepelev)
05:44 AM Feature #16993: Sets: from hash keys using Hash#key_set
sawa (Tsuyoshi Sawada) wrote in #note-2:
> Would
> ...
It will definitely work, but it will be the same as `Set.new(h.keys)` (a bit slower because enumerator is a bit slow). It still iterates on the keys, and add them to the new hash.
...
marcandre (Marc-Andre Lafortune)
01:55 AM Feature #16993: Sets: from hash keys using Hash#key_set
Would
```ruby
Set.new(h.each_key)
```
not work?
sawa (Tsuyoshi Sawada)
05:43 AM Revision 609ac6ee (git): Revert "Try increasing read timeout of rinda tests"
This reverts commit 5c03e4680e724faeedb2c5fc1581d5fcb66aaff2.
I gave up stabilizing Rinda::TupleSpaceProxyTest#test_cancel_02. As the
test uses sleep, it's probably not gonna be stable with --jit-wait.
http://ci.rvm.jp/results/trunk-mj...
k0kubun (Takashi Kokubun)
04:53 AM Revision 600f3990 (git): Cosmetic change
ktsj (Kazuki Tsujimoto)
04:52 AM Revision 7a5a0dfa (git): Suppress "assigned but unused variable" warnings
ktsj (Kazuki Tsujimoto)
04:51 AM Revision c9ee34a1 (git): Add #deconstruct cache to find pattern
palkan (Vladimir Dementyev)
04:51 AM Revision 53203757 (git): Optimize array pattern matching by caching #deconstruct value
palkan (Vladimir Dementyev)
04:51 AM Revision 6770d8f1 (git): Add pattern matching with arrays benchmark
palkan (Vladimir Dementyev)
03:29 AM Bug #16979: FileUtils#cp_r with preserve, lchmod fails with ENOTSUPP
ruby_2_7 799c5766a4dc215d139d2c26ac68636f43a64fbf merged revision(s) a19228f878d955eaf2cce086bcf53f46fdf894b9. nagachika (Tomoyuki Chikanaga)
02:17 AM Bug #16979 (Closed): FileUtils#cp_r with preserve, lchmod fails with ENOTSUPP
Closed to backport. nobu (Nobuyoshi Nakada)
03:29 AM Revision 799c5766 (git): merge revision(s) a19228f878d955eaf2cce086bcf53f46fdf894b9: [Backport #16979]
brace the fact that lchmod(2) can EOPNOTSUPP
Musl libc has this function as a tiny wrapper of fchmodat(3posix). On
the other hand Linux kernel does not support changing modes of a symlink.
The operation always f...
nagachika (Tomoyuki Chikanaga)
03:21 AM Bug #16981: [ripper] mismatched indentations warning has disappeared since 2.6
ruby_2_7 d8a32b146561a0ddd3e60da9863a082b7e7725db merged revision(s) 263b941321c3de6afc8f9dafbc2625f866b7437e. nagachika (Tomoyuki Chikanaga)
03:20 AM Revision d8a32b14 (git): merge revision(s) 263b941321c3de6afc8f9dafbc2625f866b7437e: [Backport #16981]
[ripper] fix mismatched indentations warning [Bug #16981]
The scanner location has to be set from `lex.ptok` before it is
flushed by dispatching the scanner event.
nagachika (Tomoyuki Chikanaga)
02:14 AM Feature #16989 (Assigned): Sets: need ♥️
nobu (Nobuyoshi Nakada)
02:11 AM Bug #16988: Kernel.load loads file from current directory without '.' in path
I don’t this is an implementation bug, but a documentation issue. nobu (Nobuyoshi Nakada)
01:55 AM Revision d6c9c014 (git): * 2020-06-27 [ci skip]
git[bot]
01:55 AM Revision 74c345c7 (git): Removed no longer used flags
nobu (Nobuyoshi Nakada)
01:55 AM Revision 61984d47 (git): Not to rewrite node while compiling
Moved this hack mark to an argument to `compile_hash`.
> Bad Hack: temporarily mark hash node with flag so
> compile_hash can compile call differently.
nobu (Nobuyoshi Nakada)

06/26/2020

08:43 PM Feature #16995 (Closed): Sets: <=> should be specialized
This is quite minor, but `Set#<=>` should be refined.
Reminder: `Set` defines `<`, `>`, etc. as inclusion, but does not have a corresponding `<=>`:
```ruby
Set[1] < Set[1, 2] # => true
Set[1] <=> Set[1, 2] # => nil, should be -1
...
marcandre (Marc-Andre Lafortune)
08:32 PM Feature #16994 (Feedback): Sets: shorthand for frozen sets of symbols / strings
I would like a shorthand syntax for *frozen Sets of symbols or of strings*.
I am thinking of:
```ruby
%ws{hello world} # => Set['hello', 'world'].freeze
%is{hello world} # => Set[:hello, :world].freeze
```
The individual stri...
marcandre (Marc-Andre Lafortune)
08:31 PM Feature #16993 (Open): Sets: from hash keys using Hash#key_set
To create a set from hash keys currently implies a temporary array for all keys, rehashing all those keys and rebuilding a hash. Instead, the hash could be copied and its values set to `true`.
```ruby
h = {a: 1}
# Now:
Set.new(h.ke...
marcandre (Marc-Andre Lafortune)
08:30 PM Feature #16992 (Assigned): Sets: officially ordered
Officially, set elements have uncertain order. This predades when Hash started being ordered (Ruby 1.9.0, Xmas 2007). Sets have since been de-facto insertion-ordered. FYI, in those 13 years, there have been about 70 commits to `lib/set.r... marcandre (Marc-Andre Lafortune)
08:29 PM Feature #16991 (Closed): Sets: add Set#join
I'd like to add `#join` to `Set`:
```ruby
# Now:
Set[1, 2, 3].join('x') # => NoMethodError
# After
Set[1, 2, 3].join('x') # => "1x2x3"
```
I'd make this join never recursive. (I've never wanted to use the recursivity of `Array...
marcandre (Marc-Andre Lafortune)
08:27 PM Feature #16990 (Open): Sets: operators compatibility with Array
We currently have `set <operator> array` work fine:
```ruby
Set[1] + [2] # => Set[1, 2]
```
Nothing works in the reverse order:
```ruby
[1] + Set[2] # => no implicit conversion of Set into Array
# should be:
[1] + Set[2] # ...
marcandre (Marc-Andre Lafortune)
08:18 PM Feature #16989 (Assigned): Sets: need ♥️
I am opening a series of feature requests on `Set`, all of them based on this usecase.
The main usecase I have in mind is my recent experience with `RuboCop`. I noticed a big number of frozen arrays being used only to later call `incl...
marcandre (Marc-Andre Lafortune)
07:08 PM Feature #16812: Allow slicing arrays with ArithmeticSequence
mrkn (Kenta Murata) wrote in #note-7:
> It may be better to change the behavior of `[*0..10][-100..100]`
I somewhat agree with that. When using range slicing most combinations make sense:
```ruby
[*0..10][0..4] #first elements
...
Dan0042 (Daniel DeLorme)
06:08 PM Bug #16988 (Closed): Kernel.load loads file from current directory without '.' in path
Ruby allows to load files using ```Kernel.load``` without explicitly specifying the relative path with ```.``` I'm not sure it's a bug or a feature, but since documentation in master doesn't say anything about it and the behavior differs... TheSmartnik (Nikita Misharin)
04:22 PM Feature #16986: Anonymous Struct literal
Thinking a bit more about it, I see more of a conceptual problem.
Introducing new literal in a language, we kinda introduce a new concept of the core collection. But what's that collection is, how'd you explain it to a novice?
It i...
zverok (Victor Shepelev)
11:15 AM Feature #16986: Anonymous Struct literal
> Or yeah just a simple Struct() or Struct[] with no additional syntax as suggested just above.
Actually I just realized that it can't really work as it would allow for `**kwargs`.
byroot (Jean Boussier)
11:14 AM Feature #16986: Anonymous Struct literal
> Matz said he thought about {|a: 1, b: 2 |} syntax.
Might be just me but `{|` on first sight makes me think: this is a block.
What about a `%` syntax? `%s` and `%S` already exists, but `%O` could make sense: `%O{foo: 1, bar: 42}`....
byroot (Jean Boussier)
11:08 AM Feature #16986: Anonymous Struct literal
Another (unrelated, but conflicting) matter: I am not sure we have/had a discussion for this, but I remember Bozhidar Batsov in his "Ruby 4: To Infinity and Beyond" proposed `${}` as a literal for *set* (which for me seems more important... zverok (Victor Shepelev)
11:05 AM Feature #16986: Anonymous Struct literal
WDYT about half-solution (without syntax change)?
E.g. for me, the problem with `Struct.new(:a, :b).new(1, 2)` is not that it is "too long to write" but just that it is looks "hacky" (like, "you are using Struct against its expectation...
zverok (Victor Shepelev)
10:09 AM Feature #16986: Anonymous Struct literal
hi, I like this idea :)
I was wondering if `${}` can do the following things compared to Hash literals:
```ruby
# Can a value that is not a Symbol be used as a key (Symbol only?)
${ "a" => 1 }
${ 1 => 1 }
# Can variables be use...
osyo (manga osyo)
09:36 AM Feature #16986: Anonymous Struct literal
First, I like the idea, so +1 for the idea. It also reminds me of
a more "prototypic-based approach" in general with structs, so if
the syntax could be made simpler to type, that seems to be a
possible improvement. And it fits into othe...
shevegen (Robert A. Heiler)
06:58 AM Feature #16986 (Assigned): Anonymous Struct literal
# Abstract
How about introducing anonymous Struct literal such as `${a: 1, b: 2}`?
It is almost the same as `Struct.new(:a, :b).new(1, 2)`.
# Proposal
## Background
In many cases, people use hash objects to represent a set o...
ko1 (Koichi Sasada)
03:56 PM Bug #14541: Class variables have broken semantics, let's fix them
Since it's an error in 3.0, shouldn't it be made a non-verbose warning in 2.7? Dan0042 (Daniel DeLorme)
03:51 PM Feature #16897: General purpose memoizer in Ruby 3 with Ruby 2 performance
sam.saffron (Sam Saffron) wrote in #note-28:
> If we keep `foo(a: 1)` working a developer may get confused (despite everything operating 100% correctly):
> ...
I feel compelled to make a quick note here that what Sam is saying above is...
Dan0042 (Daniel DeLorme)
02:57 PM Feature #16987 (Closed): Enumerator::Lazy vs Array methods
Enumerations are designed to be greedy (immediately executed on each method call within a chain) by default. Sometimes, that is not useful for practical purposes (e.g. 2 mln strings array, drop comments, split into fields, find the first... zverok (Victor Shepelev)
02:15 PM Feature #16848: Allow callables in $LOAD_PATH
That's interesting...
My understanding was that the "find" and "load" operations were supposed to be orthogonal, so that we could have e.g.
1. find in:
* directory
* gems (cache)
* zip file
2. load:
* .rb
* .so
...
Dan0042 (Daniel DeLorme)
12:38 PM Feature #16746: Endless method definition
To add an "opinion perspective"... I, for one, even if not fascinated but at least intrigued by new syntax.
My reasoning is as follows:
* The most precious Ruby's quality for me is "expressiveness at the level of the single 'phrase...
zverok (Victor Shepelev)
09:51 AM Feature #16985: Improve `pp` for `Hash` and `String`
I don't have any big preference, but I tend to agree with sawa too.
When I first read the proposal, I was confused in that two suggestions seem to be combined - or at the least I was reading it that way.
(1) Display "foo: bar" rather t...
shevegen (Robert A. Heiler)
07:58 AM Feature #16985: Improve `pp` for `Hash` and `String`
I wish the hashrocket stays and the syntax is consistent without exceptions for symbol. vo.x (Vit Ondruch)
06:01 AM Feature #16985: Improve `pp` for `Hash` and `String`
shyouhei (Shyouhei Urabe) wrote in #note-4:
> There are lots of debatable points on String#inspect (for instance its return value depends on runtime locale, why?). Improving it can quite easily jump into a bikeshed. You might want to s...
sawa (Tsuyoshi Sawada)
02:01 AM Feature #16985: Improve `pp` for `Hash` and `String`
There are lots of debatable points on String#inspect (for instance its return value depends on runtime locale, why?). Improving it can quite easily jump into a bikeshed. You might want to separate Hash's and String's discussions and fo... shyouhei (Shyouhei Urabe)
01:44 AM Feature #16985: Improve `pp` for `Hash` and `String`
For `String`, I meant to say that current format would be kept the same except if the single quote version exist and has no escape.
```ruby
pp "Hello" # => "Hello" (no change)
pp "Won't\nwork \"Marc-André\"" # => "Won't\nwork \"Marc-And...
marcandre (Marc-Andre Lafortune)
08:40 AM Revision ad1ebefe (git): Avoid duplicated "when"s [ci skip]
k0kubun (Takashi Kokubun)
08:36 AM Revision a0aacd2e (git): Add a NEWS placeholder for disposable cc [ci skip]
asked by ko1 to put this. k0kubun (Takashi Kokubun)
08:33 AM Revision 200c5f40 (git): Add NEWS entries about JIT optimizations
and a related VM improvement.
JIT related commits:
* Code size reduction
* Deduplicate functions on JIT compaction 818d6d33368a396d9cd3d1a34a84015a9e76c5c8
* Avoid always inlining cold paths of ivar fcd257629063a345c48ff2d8057fa8ab...
k0kubun (Takashi Kokubun)
08:05 AM Revision 4949df49 (git): [ruby/fiddle] Fixed typos
https://github.com/ruby/fiddle/commit/a09e66adf4
https://github.com/ruby/fiddle/commit/6cab9b45d6
https://github.com/ruby/fiddle/commit/ab72b19bed
nobu (Nobuyoshi Nakada)
06:50 AM Revision 40b40523 (git): Show what's inlined first in "JIT inline" log
and add a debug log k0kubun (Takashi Kokubun)
06:33 AM Revision 7982dc1d (git): Decide JIT-ed insn based on cached cfunc
for opt_* insns.
opt_eq handles rb_obj_equal inside opt_eq, and all other cfunc is
handled by opt_send_without_block. Therefore we can't decide which insn
should be generated by checking whether it's cfunc cc or not.
```
$ benchmark-dr...
k0kubun (Takashi Kokubun)
05:21 AM Revision 9dbc2294 (git): Collect insns from a child process
to make sure :opt_invokebuiltin_delegate_leave doesn't become
:(trace_)opt_invokebuiltin_delegate.
This is to prevent a warning like
> /tmp/ruby/v3/src/trunk-test/test/ruby/test_jit.rb:618: warning:
'opt_invokebuiltin_delegate_leave' in...
k0kubun (Takashi Kokubun)
05:15 AM Revision a640bcee (git): test/ruby/test_settracefunc.rb: Suppress a warning
http://rubyci.s3.amazonaws.com/ubuntu2004/ruby-master/log/20200626T033003Z.log.html.gz
```
/home/chkbuild/chkbuild/tmp/build/20200626T033003Z/ruby/test/ruby/test_settracefunc.rb:2299: warning: ambiguous first argument; put parentheses or...
mame (Yusuke Endoh)
05:11 AM Revision 5c03e468 (git): Try increasing read timeout of rinda tests
To prevent random failure with --jit-wait like
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3026615
k0kubun (Takashi Kokubun)
01:21 AM Revision 8070cb56 (git): fix return event and opt_invokebuiltin_delegate_leave (#3256)
If :return event is specified for a opt_invokebuiltin_delegate_leave
and leave combination, the instructions should be
opt_invokebuiltin_delegate
trace_return
instructions. To make it, opt_invokebuiltin_delegate_leave
instruction wil...
ko1 (Koichi Sasada)

06/25/2020

10:42 PM Feature #16746: Endless method definition
Eregon (Benoit Daloze) wrote in #note-23:
> Noteworthy is the current syntax in trunk is `def name(*args) = expr` (and not `def: name`), so there is *no* visual cue that this is a endless method definition except the `=` which comes ver...
marcandre (Marc-Andre Lafortune)
09:36 PM Feature #16746: Endless method definition
Noteworthy is the current syntax in trunk is `def name(*args) = expr` (and not `def: name`), so there is *no* visual cue that this is a endless method definition except the `=` which comes very late.
I agree with @marcandre, I think it ...
Eregon (Benoit Daloze)
06:46 PM Feature #16746: Endless method definition
tldnr; I am against this proposal, it decreases readability, increases complexity and doesn't bring anything to the table (in that order)
I read the thread carefully and couldn't find a statement of what is the intended gain.
@matz, co...
marcandre (Marc-Andre Lafortune)
10:04 PM Feature #16985: Improve `pp` for `Hash` and `String`
I think `symbol_key: value` would be nice in Hash#inspect, even if there are also non-Symbol keys.
I think changing String#inspect might be confusing, I'm used to see Strings always starting with a `"` for `p string`.
Eregon (Benoit Daloze)
05:28 PM Feature #16985 (Assigned): Improve `pp` for `Hash` and `String`
Could we improve `pp` for `Hash` and `String`:
```ruby
pp({hello: 'My name is "Marc-André"'})
# =>
{hello: 'My name is "Marc-André"'}
# instead of
{:hello=>"My name is \"Marc-André\""}
```
If any key is non-symbol, they woul...
marcandre (Marc-Andre Lafortune)
06:23 PM Feature #16147: List Comprehensions in Ruby
In my opinion, the more useful types of list comprehensions are when multiple inputs are needed.
The Ruby syntax in example one looks best, but requires more array manipulation, even if Enumerable#filter_map replaces select.map. Example...
emptyflask (Jon Roberts)
03:21 PM Revision 289a28e6 (git): * 2020-06-26 [ci skip]
git[bot]
03:21 PM Revision 2d89af45 (git): Add require to Delegator examples
In Ruby 2.7.1 SimpeDelegator cannot be used without requiring `delegate` this PR adds the require to the first example for each class so that devs don't have to hunt for what require to use. Richard Schneeman
12:39 PM Bug #16492: TestBugReporter#test_bug_reporter_add test failures
Digging a bit into this issue, I was wrong that this is just s390x.
~~~
for i in {1..10000}
do
echo "******** $i"
make runruby TESTRUN_SCRIPT="-Itool/lib test/-ext-/bug_reporter/test_bug_reporter.rb -v"
done
... snip ......
vo.x (Vit Ondruch)
09:21 AM Revision 6fdd5e26 (git): Removed duplicate target
While `spec/bundler` and `spec/bundler/` are treated different
targets by GNU make 4, the same target by GNU make 3. The latter
target, ending with a slash, was to run `test-bundler-parallel`,
instead of `spec/bundler/%`.
nobu (Nobuyoshi Nakada)
08:09 AM Feature #16897: General purpose memoizer in Ruby 3 with Ruby 2 performance
Understood Jeremy, there are always compromises.
```
def bar(a:); end
def foo(*args); bar(*args); end;
```
There was a deliberate decision made to break `foo(a: 1)` here (by default) which has both its upsides and downsides.
...
sam.saffron (Sam Saffron)
06:44 AM Revision 9a78e24f (git): Removed nonsense `rubygems_version` in input gemspec files
As it is ignored and set at building packages automatically, it is
just nonsense to set in gemspec file for input.
nobu (Nobuyoshi Nakada)
06:32 AM Revision 4eff8a66 (git): [flori/json] add metadata
https://github.com/flori/json/commit/9f430a7bba noraj (Alexandre ZANNI)
06:32 AM Revision 1b076ca3 (git): [flori/json] Gem::Specification#date is set automatically by RubyGems.org.
https://github.com/flori/json/commit/1920653013 hsbt (Hiroshi SHIBATA)
06:32 AM Revision 4dbb10f2 (git): [flori/json] keyword argument is provided after Ruby 2.0+
https://github.com/flori/json/commit/78ec5e2bd3 hsbt (Hiroshi SHIBATA)
05:59 AM Revision bb4a2351 (git): Do not JIT inline builtin methods
It's probably not worth it because there's nothing we can optimize in
such builtin methods. It's worth JIT only when inlined.
k0kubun (Takashi Kokubun)
05:43 AM Revision ab62aa70 (git): Run a TracePoint test in an insolated process
to prevent a random failure like
http://ci.rvm.jp/results/trunk-random2@phosphorus-docker/3024287
k0kubun (Takashi Kokubun)
01:03 AM Feature #16984 (Closed): Remove write barrier exemption for T_ICLASS
Currently, iclasses are "shady", or not protected by write
barriers. Because of that, the GC needs to spend more time marking these
objects than otherwise. Let's insert write barriers for iclasses.
Applications that use modules heav...
alanwu (Alan Wu)
12:01 AM Bug #16977: Ambiguous lookup super for refinements
ssnickolay (Nikolay Sverchkov) wrote:
> [In specification](https://docs.ruby-lang.org/en/2.7.0/syntax/refinements_rdoc.html) we have the note
> ...
(snip)
> I don’t understand why `include` works differently than refining a method dir...
shugo (Shugo Maeda)
 

Also available in: Atom