Project

General

Profile

Activity

From 03/22/2019 to 03/28/2019

03/28/2019

10:56 PM Bug #15736: r67361 Update to ruby/spec@e81b3cd - spec failures on MinGW ?
@Eregon
> Could you investigate why they fail?
Yes. I haven't had time to check it locally, will check tonite...
MSP-Greg (Greg L)
10:47 PM Bug #15736: r67361 Update to ruby/spec@e81b3cd - spec failures on MinGW ?
@MSP-Greg Could you investigate why they fail?
Those specs look fine and portable from a quick look.
Does "The --enable and --disable flags can be used with frozen-string-literal" passes?
That's very similar, could it be a bug of co...
Eregon (Benoit Daloze)
08:12 PM Bug #15736 (Closed): r67361 Update to ruby/spec@e81b3cd - spec failures on MinGW ?
ruby-loco (MinGW trunk) had the following failures in spec tests as of r67365 (r67357 passed)
```
1)
The --enable and --disable flags can be used with gems FAILED
Expected "nil"
to equal "\"constant\""
/ruby/spec/ruby/command_...
MSP-Greg (Greg L)
10:42 PM Bug #15735: Thread#handle_interrupt does not prevent Thread#kill from interrupting
If that is the case, that might also mean the fix in https://bugs.ruby-lang.org/issues/14998 might not be sufficient. Eregon (Benoit Daloze)
06:46 PM Bug #15735 (Closed): Thread#handle_interrupt does not prevent Thread#kill from interrupting
https://docs.ruby-lang.org/en/trunk/Thread.html#method-c-handle_interrupt
According to the documentation above, `Thread#handle_interrupt(Exception => :never)` would prevent the interrupts from `Thread#kill`.
In the following code, ...
inoueyu (Yuki INOUE)
05:50 PM Feature #15734 (Open): Parsing of shorthand IPv4 addresses compatible with inet_aton
Hi Ruby team!
I've created pull request to ipaddr gem: https://github.com/ruby/ipaddr/pull/12
I want it to be merged and included to the version of gem that bundled in Ruby itself.
---
Many applications (like browsers, `curl`, ...
Envek (Andrey Novikov)
04:25 PM Revision b6c04a7a (git): Guard spec against msys2 shell
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e k0kubun (Takashi Kokubun)
03:37 PM Revision e7477a94 (git): [bug:8215] seems to be still broken on mswin
This test fails on AppVeyor mswin so often:
https://ci.appveyor.com/project/ruby/ruby/builds/23427134/job/rowv0dohwni0xa37
https://ci.appveyor.com/project/ruby/ruby/builds/22970385/job/qdkqus13bhnyyfxf
https://ci.appveyor.com/project/rub...
k0kubun (Takashi Kokubun)
03:25 PM Revision 233267db (git): * 2019-03-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:25 PM Revision 7ce0e963 (git): * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:25 PM Revision 68987d4a (git): Do not fail with --disable-jit-support
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e k0kubun (Takashi Kokubun)
02:22 PM Revision a28aa80c (git): Update to ruby/spec@e81b3cd
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Eregon (Benoit Daloze)
12:35 PM Revision 0f647767 (git): NEWS: Fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e znz (Kazuhiro NISHIYAMA)
12:28 PM Feature #15554: warn/error passing a block to a method which never use a block
This is great! Ignored blocks can be very confusing.
> A method called by super doesnt warn warning even if this method doesn't use a block.
> ...
Would it be possible for a method called by `super` to only ignore an unexpected block...
matthewd (Matthew Draper)
11:44 AM Feature #15554: warn/error passing a block to a method which never use a block
To detect if a block is used, binding would also need to be detected, e.g.: `def b(arg); arg.eval("yield"); end; def a; b(binding); end` localhostdotdev (localhost .dev)
12:25 PM Misc #15723: Reconsider numbered parameters
The reason why this feature was introduced, is that people want a shorthand for `ary.map {|x| x.to_i(16) }` and `ary.map {|x| x.to_i.chr }`.
Vote:
1. Ad-hocly extend `ary.map(&:to_i)`: `ary.map(&:to_i.(16))` and `ary.map(&(:to_i >>...
mame (Yusuke Endoh)
12:14 AM Misc #15723: Reconsider numbered parameters
Eregon (Benoit Daloze) wrote:
> duerst (Martin Dürst) wrote:
> ...
What's easy or hard to read is definitely to quite some extent subjective, but just a few more points:
* You have seen the later many many times over already, but ...
duerst (Martin Dürst)
11:54 AM Bug #15732: Strict mode
So, the main thing I was thinking about is passing blocks that then get silently ignored. I was thinking a good way to solve this would be to have a strict mode, and then I tried to come up with things that could be in a strict mode too.... localhostdotdev (localhost .dev)
07:53 AM Bug #15732: Strict mode
This suggestion confuses me quite a bit. I am not sure of the use case; or
perhaps I don't quite understand it.
I think what you essentially suggest is to be able to run/interprete any
given .rb file with additional restrictions in ...
shevegen (Robert A. Heiler)
11:50 AM Revision b6443c62 (git): Note r67356 in NEWS [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e k0kubun (Takashi Kokubun)
10:19 AM Revision ee5b5482 (git): parse.y: show error line separately
* parse.y: show compile error and the error line separately,
instead of building the error message by snprintf then yyerror.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
08:39 AM Revision fa04b87a (git): [DOC] fix missing paren [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
07:35 AM Bug #15733: Inconsistent __FILE__ and Kernel#__dir__
I have no personal preference here either way but I can also understand Satoshi's
explanation / confusion.
This may be good to suggest for an upcoming developer meeting. __DIR__ might have
an advantage of being faster than a method ...
shevegen (Robert A. Heiler)
02:12 AM Bug #15733 (Rejected): Inconsistent __FILE__ and Kernel#__dir__
This might be duplicated with #7975, #8098 and #3346, but I believe it's worth to revisit.
Now, Ruby has `__FILE__` keyword and `Kernel#__dir__` method. One is of upper-case chars, and the other is of lower-case chars.
I make mistake...
tagomoris (Satoshi Tagomori)
03:46 AM Revision b3507bf1 (git): erb.rb: prohibit marshaling [EXPERIMENTAL]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
03:33 AM Revision 97829051 (git): [DOC] Fix method references to Method instance methods
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
03:33 AM Revision de0ef1a9 (git): [DOC] fix markups [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
03:28 AM Revision d1b82673 (git): merge revision(s) 67332: [Backport #15649]
dir.c: fix Dir.glob starts with brace
* dir.c (ruby_glob0): expand braces if a glob pattern starts with
brace.
[ruby-core:91728] [Bug #15649]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@673...
naruse (Yui NARUSE)
03:26 AM Bug #15670: Ripper treats :"sym" as xstring
ruby_2_6 r67352 merged revision(s) 67270. naruse (Yui NARUSE)
03:26 AM Revision 8bf06cb9 (git): merge revision(s) 67270: [Backport #15670]
dsym should be treated as string [ruby-core:91852] [Bug #15670]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
naruse (Yui NARUSE)
03:25 AM Bug #15666: Backport r67247 (Guard out the test when it is run under root permission)
ruby_2_6 r67351 merged revision(s) 67247. naruse (Yui NARUSE)
03:24 AM Revision a888c50a (git): merge revision(s) 67247: [Backport #15666]
Guard out the test when it is run under root permission
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
naruse (Yui NARUSE)
01:52 AM Feature #15667: Introduce malloc_trim(0) in full gc cycles
@mame / @carlos attached is a screenshot of side by side testing on live traffic patterns
containers run multiple ruby processes (a few unicorn workers and a sidekiq worker)
standard14 = Ruby 2.6.2 + jemalloc
standard14_a = Ruby 2...
sam.saffron (Sam Saffron)
01:19 AM Feature #15730 (Closed): Add map_with_index method
Use `map.with_index`.
Matz.
matz (Yukihiro Matsumoto)

03/27/2019

11:56 PM Revision 832bc507 (git): * 2019-03-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
11:56 PM Revision ede77e64 (git): Fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e znz (Kazuhiro NISHIYAMA)
11:04 PM Bug #15732: Strict mode
localhostdotdev (localhost .dev) wrote:
> A lot of issues could be easily prevented with a strict mode, for instance:
> ...
This is being discussed in #15554.
> - $1, $2, etc. variables when matching with a regex would not be create...
jeremyevans0 (Jeremy Evans)
10:24 PM Bug #15732 (Closed): Strict mode
A lot of issues could be easily prevented with a strict mode, for instance:
- Passing a block to a method that doesn't accept blocks could raise an exception, e.g. methods would be required to explicitly ask for a block (def a(..., &b...
localhostdotdev (localhost .dev)
09:40 PM Misc #15723: Reconsider numbered parameters
matz (Yukihiro Matsumoto) wrote:
> The **possibility** to make code cryptic itself should not be the reason to withdraw a feature.
Agreed. However, so far I think almost every example I saw with more than one @-parameter feels crypti...
Eregon (Benoit Daloze)
09:27 PM Misc #15723: Reconsider numbered parameters
duerst (Martin Dürst) wrote:
> > ``` ruby
> ...
Actually, I would think `@1`, `@2` start to look much like Perl, i.e. cryptic sigils, that someone not already familiar with them would wonder why would people want to use something so un...
Eregon (Benoit Daloze)
10:26 AM Misc #15723: Reconsider numbered parameters
duerst (Martin Dürst) wrote:
> > * The '@n' syntax complicates the idea of what '@' identifies in Ruby, making the language potentially harder to learn.
> ...
Yes, but in my mind it carries misleading hints about the scope of the var...
ahvetm (Erik Madsen)
10:04 AM Misc #15723: Reconsider numbered parameters
ahvetm (Erik Madsen) wrote:
> I signed up just to comment on this thread, because I also feel that this change is rather weird, and I would like to propose an alternative, that I don't think has been discussed.
> ...
In general I'd agr...
duerst (Martin Dürst)
09:51 AM Misc #15723: Reconsider numbered parameters
> I disagree. To only accept uncontroversial features is the death knell for progress. Design by committee is the last thing Ruby needs.
I'm not a fan of design by committee as well. I was referring to the fact he seemed unhappy with ...
bozhidar (Bozhidar Batsov)
09:18 AM Misc #15723: Reconsider numbered parameters
I signed up just to comment on this thread, because I also feel that this change is rather weird, and I would like to propose an alternative, that I don't think has been discussed.
I understand the need for the feature, and it's a wel...
ahvetm (Erik Madsen)
12:32 AM Misc #15723: Reconsider numbered parameters
joanbm (Joan Blackmoore) wrote:
>
> ...
You forgot to complain about `sym: value` hash syntax, `->` lambdas, `foo(&:bar)` proc-blocks, etc. etc.
Personally I find `@1` the least intrusive bit of syntactic magic added to Ruby in the...
phluid61 (Matthew Kerwin)
09:31 PM Feature #15730: Add map_with_index method
I do not have any particularly strong opinion either way. Jabari has made one point,
though, independent of crystal, in that it may make sense to have a corresponding
.map_with_index if .each_with_index exists already. But I think ulti...
shevegen (Robert A. Heiler)
05:15 PM Feature #15730: Add map_with_index method
jzakiya (Jabari Zakiya) wrote:
> I was converting some Ruby code to Crystal on Rosetta Code and came across this Ruby snippet,
> ...
Enumerator#with_index already exists:
```ruby
[1,3,5].map.with_index{ |x, i| (x+i)**2}
=> [1, 16...
jeremyevans0 (Jeremy Evans)
04:58 PM Feature #15730 (Closed): Add map_with_index method
I was converting some Ruby code to Crystal on Rosetta Code and came across this Ruby snippet,
```
arry.each_with_index.map{ |x,y| ......}
```
where ``arry`` is an array of integers.
This wouldn't convert directly into Crystal (w...
jzakiya (Jabari Zakiya)
08:43 PM Feature #15724: Optionally suppress output from IRB for assignment expressions
Thanks to some feedback on the [PR](https://github.com/ruby/irb/pull/12), I've updated it to use [Ripper](https://ruby-doc.org/stdlib-2.6.2/libdoc/ripper/rdoc/Ripper.html), so it doesn't rely on internals of CRuby ([RubyVM](https://ruby-... onlynone (Steven Willis)
08:31 PM Feature #12655: Accessing the method visibility
I know its been two years already.
but do you think we could get those new methods merged into trunk?
mathieujobin (Mathieu Jobin)
06:37 PM Bug #15731: Wrong evaluation of many keyword default arguments in 2.3 - 2.5
Edits:
Print 1 to ... => Print 0 to ...
Ruby 2.4 bug => Ruby 2.2/2.3/24 bug
Ruby 2.6 ok => Ruby 2.1 and 2.6 ok
We => Me and Maxime Lapointe
marcandre (Marc-Andre Lafortune)
05:53 PM Bug #15731 (Closed): Wrong evaluation of many keyword default arguments in 2.3 - 2.5
I don't know if it's worth fixing at this point, but we found a strange bug with evaluation of default keyword arguments when there are many of them (more than 32).
```
def foo(
k0: puts(0), k1: puts(1), k2: puts(2), k3: puts(3), ...
marcandre (Marc-Andre Lafortune)
01:41 PM Bug #15729 (Closed): OpenSSL::SSL::SSLSocket#connect randomly hangs
In a test like test/drb/ut_drb_drbssl.rb, `ossl_ssl_connect` (`OpenSSL::SSL::SSLSocket#connect`) sleeps in `rb_wait_for_single_fd` and sometimes it's never waken up.
I think it's related to timer thread elimination in Ruby 2.6 and so I ...
k0kubun (Takashi Kokubun)
01:31 PM Revision 41d36d2c (git): Skip EBADF spec in MJIT test for now
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e k0kubun (Takashi Kokubun)
01:24 PM Bug #15711: Remove use of _id2ref from DRb
headius (Charles Nutter) wrote:
> @eregon Are you talking about the PR? That has the version of code that should be merged into CRuby. The link in the description was just to show the diff in place in our CRuby fork, but it didn't base ...
Eregon (Benoit Daloze)
01:15 PM Revision 1c5fd2bf (git): Add debug print for random CI failure on osx Travis
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e k0kubun (Takashi Kokubun)
09:51 AM Feature #7148: Improved Tempfile w/o DelegateClass
I guess this is related:
``` ruby
tf = Tempfile.new
tf.unlink
tf2 = tf.dup
puts tf.fileno
# => 10
puts tf2.fileno
# => 11
tf2.close
print tf2.fileno
# => 11
print tf.fileno
IOError: closed stream
from /usr/local/rvm/rub...
sowieso (So Wieso)
08:26 AM Revision b51b9d50 (git): * 2019-03-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
08:26 AM Revision 191b99c8 (git): Merge fileutils-1.2.0 from ruby/fileutils.
It includes the following updates:
* https://github.com/ruby/fileutils/pull/26
* https://github.com/ruby/fileutils/pull/27
* https://github.com/ruby/fileutils/pull/29
* https://github.com/ruby/fileutils/pull/34
git-svn-id: svn+...
hsbt (Hiroshi SHIBATA)
01:44 AM Bug #15727: [BUG] Segmentation fault at 0x0000000000000000 ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
It may be as the same issue as #14553 and fixed at r66130 that is backport of r63040.
Would you please try ruby-2.5.5?
wanabe (_ wanabe)

03/26/2019

10:15 PM Misc #15723: Reconsider numbered parameters
Gray Kemmey summed it up [perfectly](https://bugs.ruby-lang.org/issues/4475#note-20) .
I guess there is really hard to find some adequate counter-argument, defending idea behind #4475 proposal and concluded implementation.
I would ...
joanbm (Joan Blackmoore)
08:35 PM Misc #15723: Reconsider numbered parameters
Syntax-wise I think @1 @2 is better than %1 %2 (see what jeremy wrote, even
the backwards-compatibility issue aside) or \1 \2. But this probably comes
down to aesthetics primarily. We only have a limited subset available in
regards to...
shevegen (Robert A. Heiler)
05:12 PM Misc #15723: Reconsider numbered parameters
sawa (Tsuyoshi Sawada) wrote:
> I remember someone proposing the backslash `\`. Will that have problems? Are there other alternatives?
What about `\1`, `\2`, etc.?
```ruby
numbers.zip(other_numbers).map{ \1 * \2 }
```
Having ...
noniq (Stefan Daschek)
03:24 PM Misc #15723: Reconsider numbered parameters
bozhidar (Bozhidar Batsov) wrote:
> > I definitely prefer @1 over %1 for Ruby, because for me it 'rhymes' with @instance_var and @@class_var, as jeremyevans0 has explained.
> ...
Is there a particular reason why block argument access s...
jeremyevans0 (Jeremy Evans)
02:20 PM Misc #15723: Reconsider numbered parameters
> I definitely prefer @1 over %1 for Ruby, because for me it 'rhymes' with @instance_var and @@class_var, as jeremyevans0 has explained.
That's why I dislike it so much. Block vars would ideally not look like class/instance vars. Apar...
bozhidar (Bozhidar Batsov)
12:20 PM Misc #15723: Reconsider numbered parameters
I believe a bare `@` should still be implemented as it reconciles the original need of the ticket of “hard to read code” and “a readable named variable to refer to the first argument“, as well as matz’s “not fully satisfied with the beau... maedi (Maedi Prichard)
08:52 AM Misc #15723: Reconsider numbered parameters
Answering to 4 different posts in one go, sorry.
bozhidar (Bozhidar Batsov) wrote:
> Btw, using `%1`, `%2`, `%3` is fine, right? How do people feel about that one in general. I'm kind of used to it, because that's how Clojure doe...
duerst (Martin Dürst)
08:16 AM Misc #15723: Reconsider numbered parameters
bozhidar (Bozhidar Batsov) wrote:
> Btw, using `%1`, `%2`, `%3` is fine, right? How do people feel about that one in general. I'm kind of used to it, because that's how Clojure does it, but I'm curious if it feels very weird in general....
decuplet (Nikita Shilnikov)
07:57 AM Misc #15723: Reconsider numbered parameters
> $it can already be defined, so this is not backwards compatible.
It can, but that's extremely unlikely, so I think the impact to backwards compatibility would be negligible. I've almost never seen anyone define globals themselves. I...
bozhidar (Bozhidar Batsov)
06:13 PM Bug #15711: Remove use of _id2ref from DRb
PR for the reference queue version is here: https://github.com/ruby/ruby/pull/2104
Won't pass CI because of the missing `weakling` dependency, but should be easy to test locally.
headius (Charles Nutter)
06:01 PM Bug #15711: Remove use of _id2ref from DRb
I have not written up a patch based on a reference queue, but it would basically just use the `IdWeakRef` class and the `_cleanup` method from the `IdHash` example collection in my "weakling" library:
https://github.com/headius/weakli...
headius (Charles Nutter)
05:37 PM Bug #15711: Remove use of _id2ref from DRb
@eregon Are you talking about the PR? That has the version of code that should be merged into CRuby. The link in the description was just to show the diff in place in our CRuby fork, but it didn't base that diff against a moment-in-time ... headius (Charles Nutter)
07:24 AM Bug #15728 (Closed): error compiling C - file under Ruby
Compiler message
/usr/local/include/ruby-2.6.0/ruby/intern.h:506:10: error: expected ‘,’ or ‘;’ before ‘void’
COLDFUNC NORETURN(void rb_memerror(void));
The specified line contains:
COLDFUNC NORETURN(void rb_memerror(void));
And so...
Shved (Aleksandr Shved)
07:24 AM Bug #15727 (Closed): [BUG] Segmentation fault at 0x0000000000000000 ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
/home/rails/.rvm/gems/ruby-2.5.3@manage_storage_units/gems/bootsnap-1.3.2/lib/bootsnap/compile_cache/iseq.rb:12: [BUG] Segmentation fault at 0x0000000000000000
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
-- Control fram...
brajput (Bhagwan Singh)
06:12 AM Feature #15626: Manual Compaction for MRI's GC (`GC.compact`)
Okay. Second benchmark run gives essentially the same results:
unpatched: 187.9 reqs/sec, variance 4.1
patched: 179.2 reqs/sec, variance 4.8
So yeah, I'm seeing a performance regression with the patched code with *no* call to GC.c...
noahgibbs (Noah Gibbs)
03:00 AM Feature #15626: Manual Compaction for MRI's GC (`GC.compact`)
I'm trying to run this and check speed and stability with Rails Ruby Bench. I'm having an odd bug when I try to use GC.compact. But it may be my fault so I won't post it (yet).
However, I *do* notice a speed regression when running w/...
noahgibbs (Noah Gibbs)

03/25/2019

10:50 PM Feature #14183: "Real" keyword argument
Since I think it is best to back proposed behavior changes with a proposed implementation, attached is a patch based on mame's keyword-argument-separation branch that implements my proposal:
* Same behavior as mame's for methods that ...
jeremyevans0 (Jeremy Evans)
08:53 PM Feature #15438: Threads can't switch faster than TIME_QUANTUM_(NSEC|USEC|MSEC)
sylvain.joyeux (Sylvain Joyeux) wrote:
> > Does it matter what the exact timeslice is in absolute units, or what matters is how often is a high-priority Thread executed compared to a low-priority Thread?
> ...
OK, then I think it would...
Eregon (Benoit Daloze)
12:32 PM Feature #15438: Threads can't switch faster than TIME_QUANTUM_(NSEC|USEC|MSEC)
> Does it matter what the exact timeslice is in absolute units, or what matters is how often is a high-priority Thread executed compared to a low-priority Thread?
The actual underlying behavior matters, actually. If I'm using Linux sc...
sylvain.joyeux (Sylvain Joyeux)
07:38 PM Misc #15723: Reconsider numbered parameters
Great explanation, thanks :)
If it will be multiple params `@1`, `@2`, etc. Can we also have `@` aliasing `@1`? I think it's going to be a common use case to just have the one param.
maedi (Maedi Prichard)
07:18 PM Misc #15723: Reconsider numbered parameters
maedi (Maedi Prichard) wrote:
> jeremyevans0, is it possible to have method/property calls that when without an object, reference the "current item" of the block they are in?
> ...
Think about handling:
```ruby
posts.each { puts .a...
jeremyevans0 (Jeremy Evans)
06:59 PM Misc #15723: Reconsider numbered parameters
jeremyevans0, is it possible to have method/property calls that when without an object, reference the "current item" of the block they are in?
```ruby
posts.each { .author = 'Santa Clause' }
```
This stops the range situation (`..`)....
maedi (Maedi Prichard)
06:19 PM Misc #15723: Reconsider numbered parameters
pascalbetz (Pascal Betz) wrote:
> Aren't there any other symbols we can use? paragraph, backtick, caret, (double-)dagger, ...?
We should not add any sigils that are non-ASCII. That removes paragraph, dagger, double-dagger.
`^` (c...
jeremyevans0 (Jeremy Evans)
05:43 PM Misc #15723: Reconsider numbered parameters
Why not a single dot? (`.`) It mirrors the UNIX concept of "current directory":
```ruby
[1, 2, 3].each { puts . }
```
With a method/property:
```ruby
posts.each { ..author = 'Santa Clause' }
```
Keeps it simple. Makes it easier...
maedi (Maedi Prichard)
04:48 PM Misc #15723: Reconsider numbered parameters
> While I'm not totally against your opinion, I would like you to understand that this feature was not made out of thin air; it was feature requested. People think this is a neat feature. If you are against the feature itself not against... bozhidar (Bozhidar Batsov)
12:37 PM Misc #15723: Reconsider numbered parameters
@sawa Obsoleting and recycling `?` or ` sigils sounded like a nice idea at first, but incompatibility caused by the obsoletion remains years (or even decades). It seems nearly impossible.
Matz.
matz (Yukihiro Matsumoto)
12:12 PM Misc #15723: Reconsider numbered parameters
shyouhei (Shyouhei Urabe) wrote:
> pascalbetz (Pascal Betz) wrote:
> ...
I know that this feature was not made out of thin air. But out of a 8 year old request that does not show a real benefit (other than "it's a bit shorter").
The h...
pascalbetz (Pascal Betz)
07:47 AM Misc #15723: Reconsider numbered parameters
Here are some alternative sigils.
Provided that we obsolete the character literal notation `?a # => "a"`, which is rarely used, then we may use the `?` sigil like:
```ruby
[1, 2, 3].each { puts ?1}
```
Provided that we obsolet...
sawa (Tsuyoshi Sawada)
06:22 AM Misc #15723: Reconsider numbered parameters
As the person who suggested the `@1` syntax, I guess I should give my opinion.
First, any approach that did not use a sigil (e.g. `this` or `it`) would probably break backwards compatibility, and that is not considered acceptable. ...
jeremyevans0 (Jeremy Evans)
05:53 AM Misc #15723: Reconsider numbered parameters
I think the usefulness of this feature is when there's only one parameter. When there's multiple parameters it becomes more confusing to read `@1`, `@2`, `@3` and less confusing to just name the variables.
I think limiting the "magic ...
maedi (Maedi Prichard)
04:47 AM Misc #15723: Reconsider numbered parameters
I think there has been strong desire over the years for a shorthand feature like this, and it is unrealistic to ask for the feature to be withdrawn completely.
However, it is true that there is controversy regarding the use of the sig...
sawa (Tsuyoshi Sawada)
01:33 AM Misc #15723: Reconsider numbered parameters
pascalbetz (Pascal Betz) wrote:
> `{@1 * @2}` could easily be written as `{|a, b| a * b}` some chars more, yes. But IMHO more readable. I don't think that the language should be extended for something that does not have any benefit besi...
shyouhei (Shyouhei Urabe)
02:26 PM Revision c92c0a59 (git): Prefer using vm_base_ptr rather than cfp->bp
in MJIT implementation.
This allows us to drop cfp->bp by just modifying vm_base_ptr in the
future.
No performance impact:
$ benchmark-driver benchmark.yml --rbenv='before::before --disable-gems --jit;bp_::after --disable-gems --jit;v...
k0kubun (Takashi Kokubun)
06:58 AM Revision 7976d0d1 (git): * 2019-03-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
06:58 AM Revision 8dd0fb90 (git): use cfp->bp more.
cfp->bp was (re-)introduced by Kokubun san, but VM doesn't use it
because I (ko1) want to remove it in a future. But using it make
leave instruction fast because of sp consisntency check.
So now VM uses cfp->bp.
To use cfp->bp, I checke...
ko1 (Koichi Sasada)
02:52 AM Feature #15626: Manual Compaction for MRI's GC (`GC.compact`)
> I'll take a look at the core file, but can you give more info so I can try locally?
I just start my current project with passenger installed
I will create a sample project to reproduce this issue
Takes time though (stealing work t...
PikachuEXE (Pikachu EXE)
01:54 AM Feature #15626: Manual Compaction for MRI's GC (`GC.compact`)
@duerst: looks like he's updated his approach a bit since I last saw the talk (quite awhile ago!) But here's a 2017 version: https://www.youtube.com/watch?v=ptG5HtmvQx8
At around 19:45 he's talking about compacting before fork.
Whe...
noahgibbs (Noah Gibbs)
12:52 AM Feature #15667: Introduce malloc_trim(0) in full gc cycles
@mame / @carlos, absolutely, I just need a few more days here, mounting this kind of test is not trivial even with docker containers. sam.saffron (Sam Saffron)

03/24/2019

06:02 PM Bug #15726 (Closed): Error compiling Ruby
Hello,
I'm sorry if I'm reporting that to the wrong place but the errors are so meaningless that it's hard to know where the issue really comes from.
Trying to install Ruby by compiling it, several errors happen. The process follow...
robin850 (Robin Dupret)
05:38 PM Feature #15438: Threads can't switch faster than TIME_QUANTUM_(NSEC|USEC|MSEC)
> I guess we could ... but on MRI we would still have to "guess" what are both the lowest and highest time slices we want to support forever and embed that in the value. Not really a very good prospect IMO.
Does it matter what the exa...
Eregon (Benoit Daloze)
04:19 PM Misc #15723: Reconsider numbered parameters
matz (Yukihiro Matsumoto) wrote:
>
> ...
A compromise does not sound like something that should be added to the language.
`{@1 * @2}` could easily be written as `{|a, b| a * b}` some chars more, yes. But IMHO more readable. I don...
pascalbetz (Pascal Betz)
05:51 AM Misc #15459: DevelopersMeeting before/after RubyKaigi2019
[Feature #15553] `Addrinfo.getaddrinfo` supports timeout
* I would like to have your opinion for patch2.diff
Glass_saga (Masaki Matsushita)
05:39 AM Feature #15553: Addrinfo.getaddrinfo supports timeout
I updated the patch.
* get rid of Timeout from ext/socket/lib/socket.rb. If getaddrinfo_a() is not available, timeout is ignored.
Glass_saga (Masaki Matsushita)
12:28 AM Revision 9f05891c (git): * 2019-03-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
12:28 AM Revision 831e93d9 (git): Update power_assert to 1.1.4
This update fixes a failure of test-bundled-gems, so we revert r67275.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ktsj (Kazuki Tsujimoto)

03/23/2019

09:50 PM Feature #15626: Manual Compaction for MRI's GC (`GC.compact`)
@naruse:
> I want to introduce this feature in Ruby 2.7.0-preview1.
> ...
Yes. I need to fix a bug with THEAP integration and I'll commit this along with NEWS.
@ko1:
> I'm not sure we can accept the "Known Issue". GC.verify_co...
tenderlovemaking (Aaron Patterson)
12:57 AM Feature #15626: Manual Compaction for MRI's GC (`GC.compact`)
noahgibbs (Noah Gibbs) wrote:
> Aaron has commented on this in his talks -
Any pointers?
> ...
duerst (Martin Dürst)
09:43 PM Bug #15558: Should Exception#exception copy the backtrace?
BTW, MRuby 2.0.0 also copies the backtrace (because it implements Exception#exception as clone + setting the message):
```
$ mruby -e 'begin raise "foo"; rescue => e; c=e.exception "bar"; p c.backtrace; end'
["-e:1"]
```
...
Eregon (Benoit Daloze)
08:02 PM Feature #15438: Threads can't switch faster than TIME_QUANTUM_(NSEC|USEC|MSEC)
OK ... since it seems that everyone is camping on their own position, I have an alternative proposal: initialize the min and max priority values using environment variables on MRI, defaults to -3 and 3. Would that be alright ? sylvain.joyeux (Sylvain Joyeux)
02:03 PM Feature #15725: Proposal: Add Array#reverse_sort, #revert_sort!, #reverse_sort_by, and #reverse_sort_by!
As this is a duplicate it may be best to discuss it in #12648.
I have not yet commented so just briefly; I am mostly neutral, can see
both ways. I think a slight problem is that the method names can be
a bit long and clumsy, especi...
shevegen (Robert A. Heiler)
10:13 AM Feature #15725 (Rejected): Proposal: Add Array#reverse_sort, #revert_sort!, #reverse_sort_by, and #reverse_sort_by!
Hello,
I would like to propose four new methods: `#reverse_sort`, `#revert_sort!`, `#reverse_sort_by`, and `#reverse_sort_by!` to Array.
These methods provides the most efficient way for user to get a reversed sorted array by calli...
sikachu (Prem Sichanugrist)
10:41 AM Misc #15615 (Closed): File.birthtimeがLinux環境で有効なファイル作成時刻を得られなかった場合の挙動について
Applied in changeset trunk|r67338.
----------
file.c: raise NotImplementedError instread of Errno::ENOSYS
[Misc #15615]
Glass_saga (Masaki Matsushita)
10:41 AM Revision 7e421044 (git): * 2019-03-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
10:41 AM Revision 0bd50e95 (git): file.c: raise NotImplementedError instread of Errno::ENOSYS
[Misc #15615]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Glass_saga (Masaki Matsushita)
07:52 AM Bug #12667: full_gem_path is incorrect for core modules
See https://github.com/bundler/bundler/issues/6930#issuecomment-475848401
hsbt (Hiroshi SHIBATA)
07:48 AM Feature #11140 (Closed): Allow rubygems' `require` to handle `autoload` calls
This patch was already applied. hsbt (Hiroshi SHIBATA)
01:10 AM Feature #14982: Improve namespace system in ruby to avoiding top-level names chaos
I like this idea (and the other suggestions and implementations). I proposed something similar for Crystal a while back [here](https://github.com/crystal-lang/crystal/issues/4439). chocolateboy (Chocolate Boy)

03/22/2019

10:41 PM Bug #15558: Should Exception#exception copy the backtrace?
@nobu and other MRI committers: what do you think?
It's somewhat inconsistent with Exception#clone which does copy the backtrace.
Would it make sense to follow JRuby and TruffleRuby's behavior, by copying the backtrace too, here?
Eregon (Benoit Daloze)
09:18 PM Feature #15724: Optionally suppress output from IRB for assignment expressions
shevegen (Robert A. Heiler) wrote:
> I don't know if the original suggestion is good as is, but I think it is an interesting idea to support
> ...
The only option is `@context.echo` which turns all echo-ing on or off.
> I don't thin...
onlynone (Steven Willis)
09:14 PM Feature #15724: Optionally suppress output from IRB for assignment expressions
alanwu (Alan Wu) wrote:
> You can type `a = 1; nil` to stop irb from calling inspect on the assignment expression result, just FYI.
Yes, this feature is so that one doesn't have to remember to do that after each expression they would...
onlynone (Steven Willis)
05:05 PM Feature #15724: Optionally suppress output from IRB for assignment expressions
While I use a similar approach suggested by Alan Wu - and there is nothing wrong with that - I think
it may still be useful to have a simpler toggle-way for silencing output by default (or, via a toggle).
I don't know if the original...
shevegen (Robert A. Heiler)
03:49 PM Feature #15724: Optionally suppress output from IRB for assignment expressions
You can type `a = 1; nil` to stop irb from calling inspect on the assignment expression result, just FYI. alanwu (Alan Wu)
02:42 PM Feature #15724 (Open): Optionally suppress output from IRB for assignment expressions
Most REPLs I've used don't print out the output of assignment expressions like `a = 1`. Being able to suppress this output is very useful when you have a string which is essentially a blob, an object with a large string representation, ... onlynone (Steven Willis)
08:51 PM Feature #15626: Manual Compaction for MRI's GC (`GC.compact`)
One problem with automatically compacting on full GC: compaction appears to require two full GCs to do its thing. It might be possible to integrate this into Ruby's normal cycle. But I don't think this is designed for that as-is.
Aaro...
noahgibbs (Noah Gibbs)
09:21 AM Feature #15626: Manual Compaction for MRI's GC (`GC.compact`)
I got segfault with this patch
I added 1 extra change to fix compile error on MacOS
https://github.com/ruby/ruby/compare/trunk...PikachuEXE:feature/gc-compact/15626
Installed via
rvm install ruby-head --reconfigure --repo https://g...
PikachuEXE (Pikachu EXE)
07:22 PM Misc #15723: Reconsider numbered parameters
@matz wrote:
> I am not fully satisfied with the beauty of the code with numbered parameters, so I call it a compromise.
@shevegen wrote:
> ...
Sorry, but it sounds like the new feature is an ugly compromise ...
I learned Ruby – ...
sos4nt (Stefan Schüßler)
04:06 PM Misc #15723: Reconsider numbered parameters
alanwu (Alan Wu) wrote:
> The feature isn't even release[d] and we have confusion already #15708.
That is because it has not been documented yet. After the comments from the developers, now I understand it. There is no problem unders...
sawa (Tsuyoshi Sawada)
03:38 PM Misc #15723: Reconsider numbered parameters
I don't like this feature because it adds a special case to the meaning of `@`.
Before this, I can look at `@` and understand that it's an instance variable, now there is extra mental overhead.
Every new feature added to the language...
alanwu (Alan Wu)
02:18 PM Misc #15723: Reconsider numbered parameters
@sos4nt, I agree with you. Naming a parameter is good, I think.
By the way, The Ruby Style Guide that you mentioned says:
```
# bad
names.map { |name| name.upcase }
# good
names.map(&:upcase)
```
I dislike this style too...
mame (Yusuke Endoh)
02:12 PM Misc #15723: Reconsider numbered parameters
I personally like the change. I think it is good for quick debugging.
Stefan picked only one example, though:
Hash.new { @1[@2] = "Go Fish: #{@2}" }
But who is to say that ruby users have to (only) write code like the above?...
shevegen (Robert A. Heiler)
01:54 PM Misc #15723 (Feedback): Reconsider numbered parameters
Yes, I admit `{ @1[@2] = "Go Fish: #{@2}" }` is cryptic. But `{@1 * @2}` is not. So use numbered parameters with care (just like other features in Ruby). The **possibility** to make code cryptic itself should not be the reason to withdra... matz (Yukihiro Matsumoto)
01:11 PM Misc #15723 (Feedback): Reconsider numbered parameters
I just learned that *numbered parameters* have been merged into Ruby 2.7.0dev.
For readers not familiar with this feature: it allows you to reference block arguments solely by their *index*, e.g.
```ruby
[1, 2, 3].each { |i| puts ...
sos4nt (Stefan Schüßler)
05:36 PM Bug #15712: DateTime#=== should be defined and compare date and time instead of just the date
@nobu Not sure why I wrote false (maybe I confused === with == in my testing), I'm getting `true` on ruby 2.5.3, 2.6.1, 2.6.2 and ruby-head (2.7.0 (same as the one registered in the issue)).
```
rvm ruby-head do ruby -e 'require "dat...
localhostdotdev (localhost .dev)
05:11 PM Feature #15722: `Kernel#case?`
This is an interesting idea. I have not thought through all implications but not withholding
that, I like it so +1 from me. I think matz has to decide whether this may be useful. Since
I love `case`/`when` in ruby in general, any extens...
shevegen (Robert A. Heiler)
04:25 PM Feature #15722: `Kernel#case?`
If such method, if any, should be rather defined on `Object`, that would be fine. I was not sure whether I should have requested this for `Kernel` or for `Object`. sawa (Tsuyoshi Sawada)
10:04 AM Feature #15722: `Kernel#case?`
osyo (manga osyo) wrote:
> How about `Enumerable#case?` ?
> ...
What is to be evaluated is `bar`, not the objects that you put in the arrays. `bar` has to be the receiver. That also matches with how `case`-construction works. Furtherm...
sawa (Tsuyoshi Sawada)
09:13 AM Feature #15722: `Kernel#case?`
How about `Enumerable#case?` ?
Comparing with `===` like `Enumerable#include?`.
```ruby
bar # => "bar"
["foo", "bar", "baz"].case? bar # => true
["qux"].case? bar # => false
[Symbol, String].case? bar # => tru...
osyo (manga osyo)
07:12 AM Feature #15722 (Feedback): `Kernel#case?`
I often want to use `===` to match a single object on the right side against multiple objects on the left, as is used in `case`-constructions, just to return a truth value, and end up writing like this:
```ruby
bar # => "bar"
flag1 ...
sawa (Tsuyoshi Sawada)
03:32 PM Misc #15610: Could bundler & rubygems be shipped in site_ruby?
Just for completeness, this is my proposal:
https://bugs.ruby-lang.org/issues/5617
vo.x (Vit Ondruch)
02:19 PM Feature #15371: IRB with ARGV
svnpenn (Steven Penny) wrote:
> shevegen (Robert A. Heiler) wrote:
> ...
It's actually only 1 way. The `--` is just a command line option/argument parsing convention to mark an explicit break between options and arguments. It's useful ...
onlynone (Steven Willis)
01:11 PM Feature #4475: default variable name for parameter
Since this ticket is closed, I've opened a new one to express my concerns:
https://bugs.ruby-lang.org/issues/15723
sos4nt (Stefan Schüßler)
06:56 AM Feature #4475: default variable name for parameter
gkemmey (Gray Kemmey) wrote:
> Is there a reason to do this other than to save some typing? I'm not sure we've proposed any terribly real-world cases here where this made code better.
Exactly my thought: Why? what will this make bett...
pascalbetz (Pascal Betz)
12:31 AM Feature #4475: default variable name for parameter
For those who want to change anything, I suggest to create new feature issues. It doesn't make sense to continue discussing a closed issue.
duerst (Martin Dürst)
12:19 AM Feature #4475: default variable name for parameter
As I'm reading through this I am warming up to this idea. However, I would prefer to keep `@` for instance variables.
Ruby currently does not allow naming variables or methods starting with a number. Could we utilize this?
```ruby...
HarlemSquirrel (Kevin McCormack)
11:04 AM Revision 56557ec2 (git): [DOC] fix markups [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
10:22 AM Bug #15384: ssl_certs are duplicated in RubyGems and Bundler
I did update the latest patch: https://github.com/bundler/bundler/pull/7035 hsbt (Hiroshi SHIBATA)
10:10 AM Feature #15657: Make webrick to bundled gems
Attached the patch for this feature. hsbt (Hiroshi SHIBATA)
09:08 AM Bug #15490: socket.rb - recurring segmentation faults
I might got a similar issue with 2.6.2 (also crash at os_log_type_enabled + 627)
https://bugs.ruby-lang.org/issues/15623#note-2
See update #2
PikachuEXE (Pikachu EXE)
07:57 AM Revision c671f836 (git): add debug counters to count call cache fastpath.
Add counters to count ccf (call cache fastpath) usage.
These counters will help which kind of method dispatch
is important to optimize.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ko1 (Koichi Sasada)
06:52 AM Feature #13303: String#any? as !String#empty?
I came up with the method name:
```ruby
solid?
```
sawa (Tsuyoshi Sawada)
06:25 AM Feature #15721 (Open): optimize comparison of special const
## Description
optimize comparison between special consts in `comparable_by_identity`.
it is called from `==` .
## Benchmark
```ruby
num_array = Array.new(1_000_000) { 1 }
num_array.include? nil
# 0.156 => 0.0089 ...
masarakki (masaki yamada)
03:58 AM Feature #7252 (Closed): version number of 2.0 release
2.0.0 リリース時のディスカッションなので閉じておきます。 hsbt (Hiroshi SHIBATA)
12:21 AM Revision 4d2bac1f (git): * 2019-03-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
12:21 AM Revision a433f2c5 (git): * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
12:21 AM Revision 79ddbe9d (git): optimize method dispatch for lead/kw params.
similar idea to r67315, provide the following optimization
for method dispatch with lead and kw parameters.
(1) add a special branch to check passing kw arguments to
a method which has lead and kw parameters.
ex) def foo(x, k:1)...
ko1 (Koichi Sasada)
 

Also available in: Atom