Project

General

Profile

Activity

From 07/02/2020 to 07/08/2020

07/08/2020

07:42 PM Feature #16150: Add a way to request a frozen string from to_s
I'd like to revisit this since it seems there's anecdotal evidence that returning frozen strings from Symbol#to_s is not as big a compatibility issue as thought.
Doing it for the next major release would make sense.
headius (Charles Nutter)
03:21 PM Misc #17019: DevelopersMeeting20200720Japan
* [Feature #16923] Switch reserved for numbered parameter warning to SyntaxError (jeremyevans0)
* Is it OK to commit the patch?
* [Bug #9790] Zlib::GzipReader only decompressed the first of concatenated files (jeremyevans0)
* As I...
jeremyevans0 (Jeremy Evans)
08:48 AM Misc #17019: DevelopersMeeting20200720Japan
* [Feature #17018] Show cfunc frames in rb_profile_frames() (mame)
* My colleagues want this feature because it will make it easier to investigate an application bottleneck.
mame (Yusuke Endoh)
08:45 AM Misc #17019 (Closed): DevelopersMeeting20200720Japan
# The next dev meeting
**Date: 2020/07/20 13:00-17:00**
Place/Sign-up/Agenda/Log: https://github.com/ruby/dev-meeting-log/blob/master/DevelopersMeeting20200720Japan.md
- Dev meeting *IS NOT* a decision-making place. All decisions ...
mame (Yusuke Endoh)
02:51 PM Feature #17016: Enumerable#accumulate
sawa (Tsuyoshi Sawada) wrote in #note-1:
> What is wrong with the following?
> ...
Good question! Using `#inject` or `#each_with_object` cannot be done lazily. We need to pass a lazy enumerator *after* applying the fold-like operation....
parker (Parker Finch)
04:00 AM Feature #17016: Enumerable#accumulate
What is wrong with the following?
```ruby
[1, 2, 3].inject([0]){|a, e| a << a.last + e} # => [0, 1, 3, 6]
[1, 2, 3].each_with_object([0]){|e, a| a << a.last + e} # => [0, 1, 3, 6]
```
sawa (Tsuyoshi Sawada)
02:27 PM Revision 9fc25811 (git): Enhanced RDoc for Array (#3282)
Methods:
reject!
reject
delete_if
zip
transpose
replace
clear
burdettelamar (Burdette Lamar)
01:56 PM Revision 23655e6d (git): Fix build error on Apple silicon macOS
This patch will fix following build error on macOS 11.0 + Xcode 12 beta.
```
$ ./configure
$ make V=1
BASERUBY = /Users/watson/.rbenv/shims/ruby --disable=gems
CC = clang -fdeclspec
LD = ld
LDSHARED = cla...
watson1978 (Shizuo Fujita)
01:06 PM Bug #17020 (Closed): ObjectSpace.trace_object_allocations_stop raises if called before trace_object_allocations_start
The error is easy to reproduce:
e.g. on Ruby 2.3:
```
$ ruby -robjspace -e 'ObjectSpace.trace_object_allocations_stop'
-e:1:in `trace_object_allocations_stop': wrong argument type false (expected tracepoint) (TypeError)
from -e...
byroot (Jean Boussier)
10:01 AM Bug #17011 (Closed): BigDecimal .to_s should not use ASCII-8BIT
@nobu picked that fix in https://github.com/ruby/ruby/commit/6a826eb4b08484cb3b6279da905f5b9e03e0df5f
(details at https://github.com/ruby/spec/pull/778#issuecomment-655420419)
Thanks!
Eregon (Benoit Daloze)
09:35 AM Revision 11af1202 (git): Hoisted out functions for no name rest argument symbol
nobu (Nobuyoshi Nakada)
09:26 AM Revision 6a055323 (git): Constified NODE pointer in ASTNodeData
nobu (Nobuyoshi Nakada)
08:43 AM Feature #17018 (Closed): Show cfunc frames in rb_profile_frames()
`rb_profile_frames()`, which is the backend of [stackprof](https://github.com/tmm1/stackprof), shows only ruby frames, so sometimes it is difficult to find a bottleneck in an application.
This will be gradually solved by "rubifying" all...
mame (Yusuke Endoh)
08:43 AM Revision ff5e6603 (git): Added `NODE_SPECIAL_EXCESSIVE_COMMA` info to `ARGS` of `RubyVM::AbstractSyntaxTree`.
osyo (manga osyo)
01:00 AM Revision 57cde28c (git): * 2020-07-08 [ci skip]
git[bot]
12:58 AM Revision ecfc09d0 (git): gc.c: Cast int literal "1" to bits_t
... because shifting by more than 31 bits has undefined behavior
(depending upon platform). Coverity Scan found this issue.
mame (Yusuke Endoh)

07/07/2020

08:56 PM Bug #17017: Range#max & Range#minmax incorrectly use Float end as max
Add documentation change as an option sambostock (Sam Bostock)
08:43 PM Bug #17017: Range#max & Range#minmax incorrectly use Float end as max
Add full array example sambostock (Sam Bostock)
08:41 PM Bug #17017: Range#max & Range#minmax incorrectly use Float end as max
Add .to_a examples to clarify unexpected behaviour. sambostock (Sam Bostock)
08:16 PM Bug #17017 (Closed): Range#max & Range#minmax incorrectly use Float end as max
While continuing to add edge cases to [`Range#minmax` specs](https://github.com/ruby/spec/pull/777), I discovered the following bug:
```ruby
(1..3.1).to_a == [1, 2, 3] # As expected
(1..3.1).to_a.max == 3 # As ex...
sambostock (Sam Bostock)
05:48 PM Feature #17016 (Open): Enumerable#accumulate
## Proposal
UPDATE: Changed proposed method name from `#scan_left` to `#accumulate`.
Add an `#accumulate` method to `Enumerable`.
## Background
`#accumulate` is similar to `#inject`, but it accumulates the partial results tha...
parker (Parker Finch)
03:29 PM Bug #17015 (Closed): RubyVM::AbstractSyntaxTree.parse has the same result on `proc { |a| }` and `proc { |a,| }`
## Summary
`RubyVM::AbstractSyntaxTree.parse("proc { |a| }")` and `RubyVM::AbstractSyntaxTree.parse("proc { |a,| }")` have the same result.
Since `proc { |a| }` and `proc { |a,| }` have different meanings, I think we need a way to di...
osyo (manga osyo)
03:07 PM Feature #16986: Anonymous Struct literal
Why is more special syntax needed, when it can just be a method?
```
def Kernel.AStruct(**key_values)
Struct.new(key_values.keys).new(key_values.values)
end
AStruct(a: 1, b: 2)
```
If that implementation isn't efficient en...
jrochkind (jonathan rochkind)
02:29 PM Bug #16922: single quote should be escaped in xml
Well, I haven't heard from @akr. But if he doesn't respond in the next few days, I'll merge my pull request. jeremyevans0 (Jeremy Evans)
06:55 AM Bug #16922: single quote should be escaped in xml
any update about this issue? lisbethw1130 (Lisbeth Wu)

07/06/2020

09:18 PM Feature #17002 (Closed): Extend heap pages to exactly 16KiB
Thanks, I committed it. tenderlovemaking (Aaron Patterson)
09:17 PM Revision b06a4dc6 (git): Expand heap pages to be exactly 16kb
This commit expands heap pages to be exactly 16KiB and eliminates the
`REQUIRED_SIZE_BY_MALLOC` constant.
I believe the goal of `REQUIRED_SIZE_BY_MALLOC` was to make the heap
pages consume some multiple of OS page size. 16KiB is conven...
tenderlovemaking (Aaron Patterson)
03:26 PM Revision b02a9584 (git): * 2020-07-07 [ci skip]
git[bot]
03:26 PM Revision 2c6512fe (git): Get rid of the redundant stat() in rb_check_realpath_internal
byroot (Jean Boussier)
07:14 AM Revision 167d1394 (git): Inline builtin struct aref
We don't do this for aset because it might raise a FrozenError.
```
$ benchmark-driver -v --rbenv 'before;after;before --jit;after --jit' benchmark/mjit_struct_aref.yml --repeat-count=4
before: ruby 2.8.0dev (2020-07-06T01:47:11Z master...
k0kubun (Takashi Kokubun)
01:47 AM Revision d94ef7c6 (git): Run method_missing in the same execution context
nobu (Nobuyoshi Nakada)

07/05/2020

11:58 PM Bug #17013: `RubyVM::AbstractSyntaxTree.parse("struct.field += foo")` has no operator
Thanks! :) osyo (manga osyo)
03:50 PM Bug #17013 (Closed): `RubyVM::AbstractSyntaxTree.parse("struct.field += foo")` has no operator
nobu (Nobuyoshi Nakada)
01:30 PM Bug #17013 (Closed): `RubyVM::AbstractSyntaxTree.parse("struct.field += foo")` has no operator
## Summary
`RubyVM::AbstractSyntaxTree.parse("struct.field += foo")` has no operator.
I'm making a tool that uses AST, but I'm having trouble finding a way to distinguish `struct.field += foo` and `struct.field -= foo` because of thi...
osyo (manga osyo)
07:53 PM Bug #17014 (Closed): Range#minmax returns incorrect results on non-numeric exclusive ranges
jeremyevans0 (Jeremy Evans)
04:42 PM Bug #17014 (Closed): Range#minmax returns incorrect results on non-numeric exclusive ranges
The implementation of `Range#minmax` added in [d5c60214c45](https://github.com/ruby/ruby/commit/d5c60214c45bafc1cf2a516f852394986f9c84bb) causes the following incorrect behaviour:
```ruby
('a'...'c').minmax # => ["a", ["a", "b"]]
``...
sambostock (Sam Bostock)
04:15 PM Revision efe851a0 (git): [ruby/bigdecimal] Version 2.0.1
https://github.com/ruby/bigdecimal/commit/3fa4f2ac67 Kenta Murata
04:15 PM Revision 6a826eb4 (git): [ruby/bigdecimal] Return US-ASCII string from BigDecimal#to_s
Fixes #159
https://github.com/ruby/bigdecimal/commit/57ee92e700
Kenta Murata
04:15 PM Revision e794d96c (git): [ruby/bigdecimal] Drop Ruby 2.3 support
https://github.com/ruby/bigdecimal/commit/79a819d205 Kenta Murata
04:15 PM Revision 40b82afe (git): [ruby/bigdecimal] Support Ruby < 2.6
https://github.com/ruby/bigdecimal/commit/61ec452599 Kenta Murata
04:15 PM Revision 03a33603 (git): [ruby/bigdecimal] Add Complex#to_d
https://github.com/ruby/bigdecimal/commit/97e794ac97 Kenta Murata
04:15 PM Revision 66072122 (git): [ruby/bigdecimal] Make tests pass on Ruby 2.4
https://github.com/ruby/bigdecimal/commit/9d19e842ee jeremyevans (Jeremy Evans)
04:15 PM Revision d36b197d (git): [ruby/bigdecimal] Remove definition of BigDecimal#initialize_copy
This leaves the default definition, which will raise FrozenError.
https://github.com/ruby/bigdecimal/commit/05e843d838
jeremyevans (Jeremy Evans)
04:15 PM Revision f00efef3 (git): [ruby/bigdecimal] Support a Complex in Kernel.BigDecimal()
https://github.com/ruby/bigdecimal/commit/00795cb01f Kenta Murata
04:15 PM Revision ceb9d516 (git): [ruby/bigdecimal] Undef BigDecimal#initialize_copy
Both BigDecimal#clone and BigDecimal#dup return self, there is no
reason to have initialize_copy exposed as a Ruby method.
The same is true for initialize_clone and initialize_dup.
https://github.com/ruby/bigdecimal/commit/aaf237fa9e
jeremyevans (Jeremy Evans)
04:15 PM Revision d69510b6 (git): Removed ext/bigdecimal/util/depend unused since dd0c75fdc2104a6ba38b68d4431a572504a3bbc2
nobu (Nobuyoshi Nakada)
03:48 PM Revision 1aed23c1 (git): tool/sync_default_gems.rb: Accept multiple commit ranges
nobu (Nobuyoshi Nakada)
03:48 PM Revision 8e189df3 (git): Add operator info to `OP_ASGN2` of `RubyVM::AbstractSyntaxTree`.
osyo (manga osyo)
03:28 PM Revision 988b4bc9 (git): * 2020-07-06 [ci skip]
git[bot]
02:20 PM Bug #16787: [patch] allow Dir.home to work for non-login procs when $HOME not set
Attaching two separate backport patches, one for branch 'ruby_2_6' and one for branch 'ruby_2_7'.
The changes for each patch were tested separately as outlined in the original issue description, and separate pull requests have been cr...
salewski (Alan Salewski)
01:08 PM Revision 41fef191 (git): tool/sync_default_gems.rb: Added bigdecimal
nobu (Nobuyoshi Nakada)
01:02 PM Revision 6236bbf3 (git): Removed duplicate test with test_BigDecimal_bug7522
nobu (Nobuyoshi Nakada)
12:14 PM Bug #17011: BigDecimal .to_s should not use ASCII-8BIT
How should we proceed to include that fix in CRuby master? Eregon (Benoit Daloze)
10:47 AM Bug #17011: BigDecimal .to_s should not use ASCII-8BIT
Actually, it's already been fixed upstream: https://github.com/ruby/bigdecimal/pull/160
Maybe the Ruby spec part of my PR is still useful. I'll submit it to https://github.com/ruby/spec
byroot (Jean Boussier)
10:44 AM Bug #17011: BigDecimal .to_s should not use ASCII-8BIT
Sure. byroot (Jean Boussier)
10:41 AM Bug #17011: BigDecimal .to_s should not use ASCII-8BIT
Could you submit this to https://github.com/ruby/bigdecimal? nobu (Nobuyoshi Nakada)
10:16 AM Bug #17011: BigDecimal .to_s should not use ASCII-8BIT
I submitted a PR for it: https://github.com/ruby/ruby/pull/3291 byroot (Jean Boussier)
03:53 AM Bug #17011 (Closed): BigDecimal .to_s should not use ASCII-8BIT
`BigDecimal#to_s` returns a `String` in ASCII-8BIT encoding. This is inconvenient in situations where the encoding determines program behaviour, since ASCII-8BIT is a special encoding that implies binary (non-textual) data, it can requir... david.drakard (David Drakard)
11:53 AM Bug #17010: [patch] backport #16787 for 2.7: allow Dir.home to work for non-login procs when $HOME not set
jeremyevans0 (Jeremy Evans) wrote in #note-2:
> Please don't create issues just for backporting if there is an existing issue. Just update the Backport field in the original issue. I did this for #16787.
Thanks for the info, @jerem...
salewski (Alan Salewski)
10:15 AM Revision 4ea57c2a (git): Escape `#` for GNU make 3
nobu (Nobuyoshi Nakada)
10:00 AM Revision 12b377a9 (git): Updated bundled gems
nobu (Nobuyoshi Nakada)
09:59 AM Revision 358f91bf (git): Skip comment and empty lines in gems/bundled_gems file
nobu (Nobuyoshi Nakada)
08:58 AM Bug #17012: Backport bf1a6771f305ea286a3ae575676924551c03e857
And c1463625555b061a2b94c3b6c5581730b482a285 too. nagachika (Tomoyuki Chikanaga)
08:57 AM Bug #17012 (Closed): Backport bf1a6771f305ea286a3ae575676924551c03e857
This is for backport management.
The issue introduced bf1a6771f305ea286a3ae575676924551c03e857 for [Bug #15807] was fixed with bf1a6771f305ea286a3ae575676924551c03e857.
nagachika (Tomoyuki Chikanaga)
08:27 AM Revision 41168f69 (git): Prefix export symbol prefix to coroutine_transfer
nobu (Nobuyoshi Nakada)
08:12 AM Revision 04c704c5 (git): Removed trailing spaces [ci skip]
nobu (Nobuyoshi Nakada)
01:44 AM Revision 95f5fd9a (git): fix up Primitive.cinit! code
Recent changes break Primitive.cinit!(c_code) so fix it. ko1 (Koichi Sasada)

07/04/2020

11:02 PM Revision e4f7eee0 (git): Check ROBJECT_EMBED on guards-merged ivar access
Fix CI failure like
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3043247
introduced by a69dd699ee630dd1086627dbca15a218a8538b6f
k0kubun (Takashi Kokubun)
10:03 PM Revision 97205910 (git): merge revision(s) 75802bcff1b941818832f0145071f7ce9c843d8d:
configure: suppress icc warnings
Every time a pointer to/from VALUE conversion happens, these two
warnings are issued:
- warning #1684: conversion from pointer to same-sized integral type (potential portability ...
nagachika (Tomoyuki Chikanaga)
08:39 PM Bug #17009 (Closed): [patch] backport #16787 for 2.6: allow Dir.home to work for non-login procs when $HOME not set
jeremyevans0 (Jeremy Evans)
08:08 PM Bug #17009: [patch] backport #16787 for 2.6: allow Dir.home to work for non-login procs when $HOME not set
I created a pull request for this over on GitHub:
https://github.com/ruby/ruby/pull/3287
The integration tests are still running there as I write this.
salewski (Alan Salewski)
07:20 PM Bug #17009 (Closed): [patch] backport #16787 for 2.6: allow Dir.home to work for non-login procs when $HOME not set
The attached patch backports to ruby_2_6 change c15cddd1d515c5bd8dfe8fb2725e3f723aec63b8,
which fixes the issue described in bug #16787.
The original commit message:
Allow Dir.home to work for non-login procs when $HOME not se...
salewski (Alan Salewski)
08:39 PM Bug #17010 (Closed): [patch] backport #16787 for 2.7: allow Dir.home to work for non-login procs when $HOME not set
Please don't create issues just for backporting if there is an existing issue. Just update the Backport field in the original issue. I did this for #16787. jeremyevans0 (Jeremy Evans)
08:09 PM Bug #17010: [patch] backport #16787 for 2.7: allow Dir.home to work for non-login procs when $HOME not set
I created a pull request for this over on GitHub:
https://github.com/ruby/ruby/pull/3288
The integration tests are still running as I write this.
salewski (Alan Salewski)
07:24 PM Bug #17010 (Closed): [patch] backport #16787 for 2.7: allow Dir.home to work for non-login procs when $HOME not set
The attached patch backports to ruby_2_7 change c15cddd1d515c5bd8dfe8fb2725e3f723aec63b8,
which fixes the issue described in bug #16787.
The original commit message:
Allow Dir.home to work for non-login procs when $HOME not se...
salewski (Alan Salewski)
08:34 PM Revision c1463625 (git): Use static variables in Range#minmax
jeremyevans (Jeremy Evans)
05:46 PM Bug #16853: calling bla(hash, **kw) with a string-based hash passes the strings into **kw (worked < 2.7)
FWIW I don't think it was "for Rails" but rather more use cases than that.
I want to note there is also both a performance cost and a semantics complication to only allowing Symbol keys.
If there is a call like `foo(**h)`, and `h` ha...
Eregon (Benoit Daloze)
05:05 PM Feature #17000: 2.7.2 turns off deprecation warnings by default
nagachika (Tomoyuki Chikanaga) wrote in #note-8:
> jeremyevans0 (Jeremy Evans) wrote in #note-7:
> ...
Attached is the patch. It's only a 1 line change to vm_args.c, but it includes all test changes.
jeremyevans0 (Jeremy Evans)
11:34 AM Feature #17000: 2.7.2 turns off deprecation warnings by default
jeremyevans0 (Jeremy Evans) wrote in #note-7:
> No, my proposal only affects keyword arguments. `rb_warn_check` is only called by the three functions that issue deprecation warnings for keyword arguments (all three callers are directly...
nagachika (Tomoyuki Chikanaga)
05:02 PM Revision c4bdb642 (git): * 2020-07-05 [ci skip]
git[bot]
05:02 PM Revision bf1a6771 (git): Fix non-numeric exclusive Range#minmax bug
The implementation of Range#minmax added in d5c60214c45 causes the
following incorrect behaviour:
('a'...'c').minmax => ["a", ["a", "b"]]
instead of
('a'...'c').minmax => ["a", "b"]
This is because the C implementation of Range#m...
sambostock (Sam Bostock)
01:04 PM Revision 9fc564cf (git): Ignore rbenv version file, and moved dot files [ci skip]
nobu (Nobuyoshi Nakada)
08:28 AM Revision 74e1bca7 (git): support all locals for cexpr!, cstmt!
Primitve.cexpr! and .cstmt! can access Ruby's parameter and
*local variables* (note that local parameters are also local
variables). However recent changes only allow to access
parameters. This patch fix it.
For example, the following c...
ko1 (Koichi Sasada)
07:51 AM Feature #17006: Let `Kernel#Hash` take a block to provide the default value
nobu (Nobuyoshi Nakada) wrote in #note-2:
> The description mentions the default value first, but the proposal will solve the default proc only.
Default value is a special (static) case of default proc, so I think having the latter w...
sawa (Tsuyoshi Sawada)
07:35 AM Feature #17006: Let `Kernel#Hash` take a block to provide the default value
The description mentions the default value first, but the proposal will solve the default proc only. nobu (Nobuyoshi Nakada)
04:41 AM Revision 7a5da7d5 (git): Allow hidden files with a hyphen to be source controlled
Latest bundler includes a file named `.gitlab-ci.yml.tt`. Because of
this too specific .gitignore entry, it was failing to be properly
imported.
deivid (David Rodríguez)
01:02 AM Revision 24fa37d8 (git): Make Kernel#then, #yield_self, #frozen? builtin (#3283)
* Make Kernel#then, #yield_self, #frozen? builtin
* Fix test_jit
k0kubun (Takashi Kokubun)
12:52 AM Revision a69dd699 (git): Merge ivar guards on JIT (#3284)
when an ISeq has multiple ivar accesses. k0kubun (Takashi Kokubun)

07/03/2020

08:29 PM Bug #17008: JIT enabled on Windows can cause constant conhost pop-ups
k0kubun (Takashi Kokubun) wrote in #note-1:
> I have my own MinGW environment, but I've never observed such a behavior. Could you provide at least one way to reproduce the issue? I don't know of any GUI mingw32 application embedding Rub...
AWiederin (Aubrey Wiederin)
07:58 PM Bug #17008 (Feedback): JIT enabled on Windows can cause constant conhost pop-ups
I have my own MinGW environment, but I've never observed such a behavior. Could you provide at least one way to reproduce the issue? I don't know of any GUI mingw32 application embedding Ruby 2.6+. k0kubun (Takashi Kokubun)
07:46 PM Bug #17008 (Feedback): JIT enabled on Windows can cause constant conhost pop-ups
I'm unsure of the min requirements for it to happen, but at least for ruby embedded in a gui mingw32 application, enabling JIT causes a conhost.exe popup for every gcc call, repeatedly stealing focus.
The easy fix is to add the CREATE_N...
AWiederin (Aubrey Wiederin)
04:52 PM Revision ccb2e6ea (git): * 2020-07-04 [ci skip]
git[bot]
04:52 PM Revision f3a0d7a2 (git): Rewrite Kernel#tap with Ruby (#3281)
* Rewrite Kernel#tap with Ruby
This was good for VM too, but of course my intention is to unblock JIT's inlining of a block over yield
(inlining invokeyield has not been committed though).
* Fix test_settracefunc
About the :tap deleti...
k0kubun (Takashi Kokubun)
02:49 PM Revision e8010c74 (git): Enhanced RDoc for Array (#3276)
*Methods:
keep_if
delete
delete_at
slice!
burdettelamar (Burdette Lamar)
01:31 PM Feature #16986: Anonymous Struct literal
the problem i have with that is that each time it creates a (cached) struct class.
after taking so long to make frozen literals and making even such frozen objects GC able,
something that creates new (class) objects which then can ne...
Hanmac (Hans Mackowiak)
10:52 AM Feature #16986: Anonymous Struct literal
Hello, this is a great idea. I would just love to have this feature in Ruby, so I thought I may provide some helpful input:
First, I would like to read more ideas about the exact implementation, specially:
1. Will the literal pro...
esquinas (Enrique Esquinas)
12:32 PM Bug #17007 (Closed): SystemStackError when using super inside Module included and lexically inside refinement
```ruby
class C
def foo
["C"]
end
end
refinement = Module.new do
R = refine C do
def foo
["R"] + super
end
include Module.new {
def foo
["M"] + super
end
}
end
en...
Eregon (Benoit Daloze)
08:09 AM Feature #17006 (Open): Let `Kernel#Hash` take a block to provide the default value
Sometimes, we need to create a hash that has explicit key-value pairs as well as a default value, but there has not been a way to do that at once. The most naive way is to do like this:
```ruby
h = {a: 1, b: 2}
h.default_proc = ->(h...
sawa (Tsuyoshi Sawada)
07:56 AM Revision a0f12a02 (git): Use ID instead of GENTRY for gvars. (#3278)
Use ID instead of GENTRY for gvars.
Global variables are compiled into GENTRY (a pointer to struct
rb_global_entry). This patch replace this GENTRY to ID and
make the code simple.
We need to search GENTRY from ID every time (st_lookup)...
ko1 (Koichi Sasada)
07:55 AM Revision 8655c2e6 (git): RUBY_DEBUG_LOG: Logging debug information mechanism (#3279)
* RUBY_DEBUG_LOG: Logging debug information mechanism
This feature provides a mechanism to store logging information
to a file, stderr or memory space with simple macros.
The following information will be stored.
* (1) __FILE__, __LI...
ko1 (Koichi Sasada)
06:16 AM Revision 01776ca1 (git): Ignore conftest.c under the ext directories for CodeQL analysis
hsbt (Hiroshi SHIBATA)
02:47 AM Revision 1e039474 (git): test/json/json_fixtures_test.rb: Prevent an "out of range" warning
```
/home/mame/work/ruby/.ext/common/json/common.rb:263: warning: Float 23456789012E666 out of range
```
mame (Yusuke Endoh)
02:27 AM Revision 05a12297 (git): * 2020-07-03 [ci skip]
git[bot]
02:05 AM Revision e6a8590a (git): Reintroduce c565dfb09ad7d55fa671f65cea7088a914bf1931
mame (Yusuke Endoh)

07/02/2020

11:14 PM Feature #16986: Anonymous Struct literal
Accessing object methods via dots is more convenient than via brackets. And I tend to think of `{a: 1, b: 2}` as of object with properties.
That is why I like `${}` syntax: I see the same object in square brackets and can easily copy/p...
dimasamodurov (Dima Samodurov)
08:56 PM Feature #16986: Anonymous Struct literal
Without expressing an opinion on the proposal (yet), I'd like to point an easy way to avoid having to use `fetch` all the time: the `default_proc`.
```ruby
my_hash = Hash.new { |h, k| raise "Invalid key: #{k}" }.merge(default: 42)
...
marcandre (Marc-Andre Lafortune)
06:58 PM Feature #16986: Anonymous Struct literal
> klass.new(**kwargs).freeze
This proposal doesn't include `freeze`.
I agree it is one option, but need a discussion.
ko1 (Koichi Sasada)
05:02 PM Feature #16986: Anonymous Struct literal
> it was "almost the same" - what differences are there?
The actual implementation is more like this:
```ruby
$structs = {}
def Struct(**kwargs)
klass = $structs[kwargs.keys.sort] ||= Struct.new(*kwargs.keys, keyword_init: tru...
byroot (Jean Boussier)
04:06 PM Feature #16986: Anonymous Struct literal
I'm also +1 for this. The utility of such a feature is obvious and would improve a lot of Ruby code both in readability and in being more bug-free as it helps with the Hash#[] problem of missing/misspelled keys.
I immediately understo...
calebhearth (Caleb Hearth)
11:34 AM Feature #16986: Anonymous Struct literal
+1 for the idea, I'm using my_hash.fetch(:my_key) to ensure consistency in a lot of places.
Concerns:
1. Struct is slow (should not be that hard to improve, though)
2. ${} will be hard to read, search and explain about
3. It woul...
sobrinho (Gabriel Sobrinho)
08:44 AM Feature #16986: Anonymous Struct literal

i think this is more of a confusing feature
IF `${a: 1, b: 2}` is like `Struct.new(:a, :b).new(1, 2)` then my gut is telling me that
```ruby
s1 = ${a: 1, b: 2, c: 3}
s2 = ${a: 1, b: 2, c: 3}
assert s1 == s2
```
...
Hanmac (Hans Mackowiak)
09:11 PM Feature #17004: Provide a way for methods to omit their return value
marcandre (Marc-Andre Lafortune) wrote in #note-19:
> jeremyevans0 (Jeremy Evans) wrote in #note-13:
> ...
Sequel::Dataset#insert already accepts a block, which can be used to iterate over rows returned from the insert statement (when ...
jeremyevans0 (Jeremy Evans)
08:15 PM Feature #17004: Provide a way for methods to omit their return value
jeremyevans0 (Jeremy Evans) wrote in #note-13:
> Due to Sequel::Dataset#insert's flexible API, it would be hard to support this as a method argument.
Seems to be that a better API for this is using a block parameter.
```ruby
# ne...
marcandre (Marc-Andre Lafortune)
05:26 PM Feature #17004: Provide a way for methods to omit their return value
Agreed as well on the point of "if I observe it with `p/puts/IRB` I don't want the method call to behave differently.
Debug printing should avoid having side effects, and this makes a significant way to break that.
Sounds also very con...
Eregon (Benoit Daloze)
04:45 PM Feature #17004: Provide a way for methods to omit their return value
jeremyevans0 (Jeremy Evans) wrote in #note-16:
> soulcutter (Bradley Schaefer) wrote in #note-15:
> ...
That's fair. There's still a warning flag in my head that there's some subtle case where it is trickier to test, but I might be str...
soulcutter (Bradley Schaefer)
04:21 PM Feature #17004: Provide a way for methods to omit their return value
soulcutter (Bradley Schaefer) wrote in #note-15:
> Also, how would you test this behavior?
```ruby
# return value not discarded case
some_method.must_equal :expected_return_value
check_for.must_equal :some_side_effect
# return ...
jeremyevans0 (Jeremy Evans)
04:13 PM Feature #17004: Provide a way for methods to omit their return value
jeremyevans0 (Jeremy Evans) wrote in #note-13:
> ```ruby
> ...
What scares me about this is the idea of using interactive debuggers (or even plan-old puts debugging) changing the behavior of the code. You would have to be an expert (...
soulcutter (Bradley Schaefer)
05:31 AM Feature #17004: Provide a way for methods to omit their return value
Re: other languages with similar concepts.
- Perl has `wantarray`. In spite of its name, the intrinsic can be used to distinguish if a return value is needed or not (can tell you if the needed number of return values is zero, one, or...
shyouhei (Shyouhei Urabe)
01:01 AM Feature #17004: Provide a way for methods to omit their return value
duerst (Martin Dürst) wrote in #note-12:
> - Where there are performance implications, couldn't that be solved by an
> ...
Yes, it could definitely be solved by additional method arguments (or keyword arguments). However, that can com...
jeremyevans0 (Jeremy Evans)
12:18 AM Feature #17004: Provide a way for methods to omit their return value
Additional questions:
- Are there any other languages that have such a feature?
- Where there are performance implications, couldn't that be solved by an
additional parameter to the methods in question? Or by a better design
of i...
duerst (Martin Dürst)
04:31 PM Bug #16853: calling bla(hash, **kw) with a string-based hash passes the strings into **kw (worked < 2.7)
> > The reason why it was changed is because there are some methods that want to accept both symbol and non-symbol keys: where(id: 42) and where("table.id" => 42).
> ...
The idea for that change first appeared in https://bugs.ruby-lang....
Dan0042 (Daniel DeLorme)
01:55 PM Bug #16853: calling bla(hash, **kw) with a string-based hash passes the strings into **kw (worked < 2.7)
Hi Yusuke. Thanks for the long thought-out answer. I really appreciate you taking the time.
> But the behavior was changed to reject non-symbol keys, and it was done without matz's confirmation. So in a sense, this is a bug fix.
It...
sylvain.joyeux (Sylvain Joyeux)
11:53 AM Revision 59ded36c (git): Expose `assert_pattern_list` for drb test with test-unit gem.
hsbt (Hiroshi SHIBATA)
05:51 AM Feature #17002: Extend heap pages to exactly 16KiB
Thank you for your survey. Seems fine! ko1 (Koichi Sasada)
05:34 AM Revision 08ba5bec (git): * 2020-07-02 [ci skip]
git[bot]
05:34 AM Revision bf3f03c9 (git): integer.rbinc: do not generate C functions
This changeset changes for instance Integer#integer? from:
== disasm: #<ISeq:to_i@<internal:integer>:66 (66,2)-(69,5)> (catch: FALSE)
0000 opt_invokebuiltin_delegate_leave <builtin!_bi7/0>, 0 (68)[LiCa]
0003 leav...
shyouhei (Shyouhei Urabe)
01:15 AM Feature #17000: 2.7.2 turns off deprecation warnings by default
nagachika (Tomoyuki Chikanaga) wrote in #note-6:
> jeremyevans0 (Jeremy Evans) wrote in #note-4:
> ...
No, my proposal only affects keyword arguments. `rb_warn_check` is only called by the three functions that issue deprecation warnin...
jeremyevans0 (Jeremy Evans)
01:00 AM Feature #17000: 2.7.2 turns off deprecation warnings by default
mame (Yusuke Endoh) wrote in #note-3:
> Let me confirm: what do you mean "dependent"?
I'm sorry, I just misspelled it. I mean "new *deprecated* category for keyword arguments".
> ...
Thank you for clarifying. The table you show is exac...
nagachika (Tomoyuki Chikanaga)
 

Also available in: Atom