Project

General

Profile

Activity

From 07/17/2018 to 07/23/2018

07/23/2018

10:51 PM Feature #5446: at_fork callback API
normalperson (Eric Wong) wrote:
> eregontp@gmail.com wrote:
> ...
I've experienced a data leak similar to this. Saying the impact was "catastrophic" would be an understatement. :(
> fork is full of caveats; using atfork hook to wo...
tenderlovemaking (Aaron Patterson)
04:17 PM Feature #14915: Deprecate String#crypt
normalperson (Eric Wong) wrote:
> Can you provide pre-defined, accepted-as-secure implementations
> ...
.htpasswd is an Apache-specific format, and Apache currently supports only 5 password formats: bcrypt, MD5, SHA1, crypt, plain tex...
jeremyevans0 (Jeremy Evans)
03:03 PM Feature #14915: Deprecate String#crypt
merch-redmine@jeremyevans.net wrote:
> shyouhei (Shyouhei Urabe) wrote:
> > - Basic authentication itself does not require DES. It is an
> > implementation detail. You can safely migrate to another
> > hash function at will. R...
normalperson (Eric Wong)
02:00 AM Feature #14915: Deprecate String#crypt
shyouhei (Shyouhei Urabe) wrote:
> Maybe this was my misunderstanding. Are BasicAuth and DigestAuth
> ...
No, basic auth and digest auth are very different, you can't just substitute one for the other. Digest auth requires MD5 for o...
jeremyevans0 (Jeremy Evans)
01:32 AM Feature #14915: Deprecate String#crypt
On Fri, Jul 20, 2018 at 5:51 PM, Eric Wong <normalperson@yhbt.net> wrote:
> "Urabe, Shyouhei" <shyouhei@ruby-lang.org> wrote:
>> normalperson (Eric Wong) wrote:
>> > It's only the BasicAuth code and I have no idea how many people
>...
shyouhei (Shyouhei Urabe)
03:52 PM Misc #14921: DevelopersMeeting20180809Japan
> https://bugs.ruby-lang.org/issues/14921

[Feature #14717] thread: allow disabling preempt
normalperson (Eric Wong)
03:06 PM Bug #14933 (Closed): Time.strptime with ordinal dates
Using `Time`, I cannot parse an ordinal date (https://en.wikipedia.org/wiki/ISO_8601#Ordinal_dates).
It should work with `%j` according to the documentation: https://ruby-doc.org/stdlib-2.5.1/libdoc/time/rdoc/Time.html#method-c-strptime...
v49564 (Victor Bruley)
09:56 AM Revision c7894575 (git): * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
09:56 AM Revision 0a5c78b9 (git): Revert previous commit and split lib/tracer/version.rb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e znz (Kazuhiro NISHIYAMA)
09:49 AM Revision 043e17db (git): Revert partially to avoid test error temporarily
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e znz (Kazuhiro NISHIYAMA)
09:49 AM Revision 5b666803 (git): Fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e znz (Kazuhiro NISHIYAMA)
06:22 AM Revision 7ca648e9 (git): 60 sec is not enough at all
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e U.Nakamura
06:08 AM Revision b2f9deee (git): increase timeout seconds.
* test/ruby/test_io.rb (test_select_leak): increase timeout seconds
to pass this test on a high-load machine.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ko1 (Koichi Sasada)
03:18 AM Feature #14924 (Rejected): // floor division operator
Closing this ticket as per OP's request. Thank you for your understanding. mame (Yusuke Endoh)
03:10 AM Feature #14183: "Real" keyword argument
Jeremy, thank you for discussing this issue seriously.
jeremyevans0 (Jeremy Evans) wrote:
> If that was the only change, it wouldn't be a big deal. However, in addition to `foo(:key => val)` calls, there are also `foo(hsh)` calls. S...
mame (Yusuke Endoh)
01:49 AM Feature #14183: "Real" keyword argument
mame (Yusuke Endoh) wrote:
> jeremyevans0 (Jeremy Evans) wrote:
> ...
If that was the only change, it wouldn't be a big deal. However, in addition to `foo(:key => val)` calls, there are also `foo(hsh)` calls. So all callers that pass ...
jeremyevans0 (Jeremy Evans)
01:20 AM Feature #14183: "Real" keyword argument
Sorry, it seems my original description was unclear. I think it can be rephased very simply:
* keyword argument MUST be always received as a keyword parameter
* non-keyword argument MUST be always received as a non-keyword parameter...
mame (Yusuke Endoh)
01:06 AM Feature #14183: "Real" keyword argument
jeremyevans0 (Jeremy Evans) wrote:
> For a method definition like:
> ...
No, it will not work. You need to rewrite the definition to `def foo(**hsh)`.
> One performance issue with keyword arguments is that keyword splats allocate...
mame (Yusuke Endoh)
01:54 AM Feature #14912: Introduce pattern matching syntax
ktsj (Kazuki Tsujimoto) wrote:
> Thanks for the feedback.
> ...
Hm. I didn't explan my intent well.
My intent is deconstructing pattern is not well correspondence to
pattern matching of functional languages.
In functional langu...
akr (Akira Tanaka)
12:24 AM Feature #14912: Introduce pattern matching syntax
ktsj (Kazuki Tsujimoto) wrote:
> > - Deconstruction seems fragile; For instance the following case statement matches, which is very counter-intuitive.
> ...
Do you really think they are worth trading off?
What is, then, the purpose...
shyouhei (Shyouhei Urabe)
01:07 AM Revision 8a3ed368 (git): Revert "thread.c (rb_thread_fd_select): remove unnecessary rb_fd_resize calls"
This reverts commit r64017
(git commit 2ff85621690f4f5b0dff9226ac68418a950a6919).
Nevermind, haven't had enough coffee, yet :x
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Eric Wong
12:51 AM Revision 2ff85621 (git): thread.c (rb_thread_fd_select): remove unnecessary rb_fd_resize calls
There's no need to resize each rb_fdset_t to match the size of
the biggest one. This can allow some small memory savings if
watching several sets of FDs simultaneously.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64017 b2dd03c8-3...
Eric Wong

07/22/2018

10:55 PM Feature #12306: Implement String #blank? #present? and improve #strip and family to handle unicode
> I've proposed String#space_only?, like String#ascii_only?.
I very much support `#space_only?`, it still fills the original goal of the ticket which is to eliminate the the fast_blank gem!
sam.saffron (Sam Saffron)
10:45 PM Feature #14932 (Open): Dynamically adjust method cache size at runtime
I am not sure exactly how we can pull this off, but this very much fits into our mission of making Ruby fast
http://engineering.appfolio.com/appfolio-engineering/2018/7/18/rubys-global-method-cache
https://engineering.shopify.com/1...
sam.saffron (Sam Saffron)
09:59 PM Bug #14928: [BUG] Segmentation fault | Fiddle with Windows APIs
> The second argument of RtlMoveMemory is source pointer, not the size.
> ...
While troubleshooting, I tried to allocate a memory, returns a pointer as the following:
~~~ ruby
buf = Pointer.malloc(Fiddle::SIZEOF_CHAR * shellcode.size...
KINGSABRI (KING SABRI)
02:55 PM Bug #14928 (Rejected): [BUG] Segmentation fault | Fiddle with Windows APIs
nobu (Nobuyoshi Nakada)
02:55 PM Bug #14928 (Feedback): [BUG] Segmentation fault | Fiddle with Windows APIs
This is a bug in your code, not ruby's.
```
rtl_move_memory.call(ptr.to_i, buf.size.to_i, shellcode_calc.size.to_i)
```
The second argument of `RtlMoveMemory` is source pointer, not the size.
And, `buf` is an array of single cha...
nobu (Nobuyoshi Nakada)
06:42 PM Feature #14924: // floor division operator
> Out of curiosity what are you doing that needs integer division? :)

For example in my window manager I have some rules to determine how
windows should be sized and positioned (tiling).

~~~ ruby
# how many windows with 484px wi...
Anonymous
04:03 PM Revision 0c32ffc7 (git): * 2018-07-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
04:03 PM Revision 02cae85e (git): object.c: prefer base optarg
* object.c (rb_f_integer): prefer `base` optional argument over
keyword arguments. this issue should be resolved more generally
by separating keyword arguments from hashes in the future.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/...
nobu (Nobuyoshi Nakada)
10:47 AM Bug #14926 (Closed): Different results between Enumerable#sum and #reduce when Float::INFINITY present
Applied in changeset trunk|r64014.
----------
fix sum on infinity
* array.c (rb_ary_sum): consider non-finite floats.
[ruby-core:88024] [Bug #14926]
* enum.c (sum_iter): ditto.
nobu (Nobuyoshi Nakada)
10:47 AM Revision 67cacdb8 (git): fix sum on infinity
* array.c (rb_ary_sum): consider non-finite floats.
[ruby-core:88024] [Bug #14926]
* enum.c (sum_iter): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
10:02 AM Revision b22352af (git): Remove needless `nacl` check
`nacl` support already removed by https://github.com/ruby/ruby/pull/1726.
[Fix GH-1920]
From: yuuji.yaginuma <yuuji.yaginuma@gmail.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
znz (Kazuhiro NISHIYAMA)
08:53 AM Feature #14931 (Open): [DOC] exception keyword argument is not documented in some methods
Some methods accept exception keyword argument since 2.6.0, but it is not documented in rdoc yet.
In NEWS,
* Kernel.#Complex takes :exception option to specify the way of error handling [Feature #12732]
* Kernel.#Float take...
znz (Kazuhiro NISHIYAMA)
07:42 AM Feature #14859: [PATCH] implement Timeout in VM
funny.falcon@gmail.com wrote:
> normalperson (Eric Wong) wrote:
> > Yes. The "timeout scheduler" is the same idea I used for auto-fiber.
> > It uses ccan/list to manage a sorted list of timeouts.
>
> Still wonder, why you don't...
normalperson (Eric Wong)
04:39 AM Feature #14930: sample/trick2018
sample/trick2018/03-tompng ですが、trunk では動かないようです。
* `Gemfile` で `ruby '2.5.0'` に固定されているので、そのままだと trunk で bundle install できない
* `source 'https://rubygems.org'` がないので `bundle install` できないことがある (bundler の挙動がよくわかっていなくてできる場合とできない場合の違いがよくわ...
znz (Kazuhiro NISHIYAMA)
02:53 AM Revision 0cc4bb7d (git): * 2018-07-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
02:53 AM Revision 4e1f2067 (git): test_rubyoptions.rb: allow passing test_verbose
with --jit.
`./ruby --jit -Itest/lib test/ruby/test_rubyoptions.rb -n "TestRubyOptions#test_verbose"`
has failed without -DMJIT_FORCE_ENABLE like:
1) Failure:
TestRubyOptions#test_verbose [/home/travis/build/k0kubun/mjit-test/test/ru...
k0kubun (Takashi Kokubun)

07/21/2018

10:37 PM Bug #14926: Different results between Enumerable#sum and #reduce when Float::INFINITY present
Yes, definitely a bug in the algorithm trying to minimize floating errors. Result must be `Float::INFINITY`.
shevegen (Robert A. Heiler) wrote:
> I am a bit surprised about infinity though:
> ...
Using `p` instead of `puts` will sho...
marcandre (Marc-Andre Lafortune)
01:07 PM Feature #14930 (Closed): sample/trick2018
Applied in changeset trunk|r64008.
----------
sample/trick2018/: adds the top-five entries of TRICK 2018
See https://github.com/tric/trick2018 for TRICK 2018.
Fixes #14930.
mame (Yusuke Endoh)
12:54 PM Feature #14930 (Closed): sample/trick2018
まだ TRICK FINAL の上位作品が sample に追加されていないようです。
https://github.com/tric/trick2018
過去の回も含めて情報を探してみると以下のように、何作品を追加するのかは、以下の情報しかみつけられなかったので、以前の回の上位作品を追加した @mame さんに assign しておきます。
https://magazine.rubyist.net/articles/0043/0043-TRICK2013...
znz (Kazuhiro NISHIYAMA)
01:07 PM Revision 85402fa3 (git): * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
01:07 PM Revision c5229a94 (git): * append newline at EOF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
01:07 PM Revision e613cdd5 (git): sample/trick2018/: adds the top-five entries of TRICK 2018
See https://github.com/tric/trick2018 for TRICK 2018.
Fixes #14930.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
mame (Yusuke Endoh)
12:49 PM Feature #14924: // floor division operator
~~~ text
I think it may be subjective, 99 % of the time I do want integer
~~~
Out of curiosity what are you doing that needs integer division? :)
Still I think that 99% of people expect that when you divide 3 / 2 you get 1.5 (i...
Anonymous
09:29 AM Misc #14917 (Assigned): Add RDoc documents to tar ball
We welcomed your feature. But We have some concerns.
The bundled documents increases tarball size caused by many of inode.
We need to resolve the problem of package size and other issues before accepting your proposal.
hsbt (Hiroshi SHIBATA)
08:09 AM Feature #14859: [PATCH] implement Timeout in VM
normalperson (Eric Wong) wrote:
> Yes. The "timeout scheduler" is the same idea I used for auto-fiber.
> ...
Still wonder, why you don't use binary min-heap for timers - most commonly used datastructure for this task.
It has guaran...
funny_falcon (Yura Sokolov)
04:19 AM Feature #14915: Deprecate String#crypt
normalperson (Eric Wong) wrote:
> merch-redmine@jeremyevans.net wrote:
> ...
I think that a single iteration of MD5 is not a significant security improvement on DES:
```
class DigestAuth
def self.make_passwd(realm, use...
jeremyevans0 (Jeremy Evans)
03:26 AM Bug #14929 (Closed): [PATCH] thread.c (do_select): fix leak on exception
Applied in changeset trunk|r64007.
----------
thread.c (do_select): fix leak on exception
When do_select is interrupted and raise happens from
RUBY_VM_CHECK_INTS_BLOCKING, the original FD sets we copied
do not get freed, leading to a m...
normalperson (Eric Wong)
03:04 AM Bug #14929 (Closed): [PATCH] thread.c (do_select): fix leak on exception
```
thread.c (do_select): fix leak on exception
When do_select is interrupted and raise happens from
RUBY_VM_CHECK_INTS_BLOCKING, the original FD sets we copied
do not get freed, leading to a memory leak. Wrap up all the
FD sets ...
normalperson (Eric Wong)
03:26 AM Revision 8d0f5f1b (git): thread.c (do_select): fix leak on exception
When do_select is interrupted and raise happens from
RUBY_VM_CHECK_INTS_BLOCKING, the original FD sets we copied
do not get freed, leading to a memory leak. Wrap up all the
FD sets into a Ruby object to ensure the GC can release an
allo...
Eric Wong
12:34 AM Feature #14912: Introduce pattern matching syntax
Thanks for the feedback.
> But I feel the deconstruct method of Struct in the sample code is tricky
> ...
It is trade-off with duck typing.
Consider following case.
```ruby
class MyA
def deconstruct
dummy = A[nil, nil]...
ktsj (Kazuki Tsujimoto)

07/20/2018

10:30 PM Revision 33c74657 (git): * 2018-07-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
10:30 PM Revision 8f78430d (git): test/-ext-/gvl/test_last_thread.rb: skip under MJIT
Spurious wakeup is unavoidable with MJIT; and any real
code must be able to deal with spurious wakeup anyways.
[ruby-core:87882] https://bugs.ruby-lang.org/issues/14901
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64005 b2dd03c8-3...
Eric Wong
09:06 PM Bug #14928 (Rejected): [BUG] Segmentation fault | Fiddle with Windows APIs
Hello guys
I need help in `Fiddle` it's really missing documentation and examples
I have the following code (https://gist.github.com/KINGSABRI/1871e748b51b6ef5c8f61a49a909b8c3)
The full error is right down the code
I'm trying to c...
KINGSABRI (KING SABRI)
08:52 PM Feature #5446: at_fork callback API
eregontp@gmail.com wrote:
> normalperson (Eric Wong) wrote:
> > It's been a known problem for decades, now (at least since the
> > days of mod_perl + DBI on Apache 1.x); and AFAIK there's no data
> > leaks from it. Anybody who m...
normalperson (Eric Wong)
12:06 PM Feature #5446: at_fork callback API
normalperson (Eric Wong) wrote:
> It's been a known problem for decades, now (at least since the
> ...
Yes, it's not a new problem.
I disagree about no production leaks, because it happened to me on a website running for a national p...
Eregon (Benoit Daloze)
10:22 AM Feature #5446: at_fork callback API
eregontp@gmail.com wrote:
> IMHO, this is is still very much needed for cases using plain fork().
> The default close-on-exec behavior is irrelevant for fork() without exec() and does not help.

Agreed.

> Inheriting, e.g., a data...
normalperson (Eric Wong)
08:23 PM Feature #14927: Loading multiple files at once
Dir glob has to find all files, sort them, create objects.
Then require loads them again from the filesystem...
I think Dir.glob + require is a very common pattern and if we have a function like require_directory / require_tree? some...
ahorek (Pavel Rosický)
07:17 PM Feature #14927: Loading multiple files at once
I wanted to propose a more sophisticated load-process in ruby some time ago, but I never got
around it. I am even thinking of being able to load files based on abbreviations/shortcuts,
without necessiting a hardcoded path (e. g. requir...
shevegen (Robert A. Heiler)
06:13 PM Feature #14927 (Assigned): Loading multiple files at once
Just a proof concept I wanted to share. Maybe it could be useful?
Say you want to load all the .rb files in your lib directory:
~~~ ruby
Dir['lib/**/*.rb'].each { |file| load(file) }
~~~
This approach may not work if your ...
Anonymous
07:26 PM Bug #14926: Different results between Enumerable#sum and #reduce when Float::INFINITY present
I sort of agree; I would have expected the same result.
Other arrays with numbers output the same result:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10].reduce(0, &:+) # => 55
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10].sum # => 55
So ...
shevegen (Robert A. Heiler)
04:25 PM Bug #14926 (Closed): Different results between Enumerable#sum and #reduce when Float::INFINITY present
When `Float::INFINITY` is present in array, `Enumerable#sum` and `Enumerable#reduce(0, &:+)` are giving different results.
```
puts [Float::INFINITY].sum
puts [Float::INFINITY].reduce(0, &:+)
```
results in
```
NaN
Infinity...
swistak35 (Rafał Łasocha)
05:32 PM Feature #14924: // floor division operator
> In my job, I have to do many math operations. And it's kind of a pain because of integer division (3 / 2 == 1). I have to constantly cast integers to floats.

I'm not sure if this is better for your use case, but as an
alternative ...
Anonymous
01:45 PM Feature #14924: // floor division operator
Oh too bad regular expressions use the same synthax. :(
Yes, it's a big breaking change to always return a float when dividing two integers. I understand that Matz doesn't want that.
So you can close this ticket then.
Thanks guys!
Anonymous
01:35 PM Feature #14924: // floor division operator
Changing the behavior of Integer#/ has been already rejected.
https://bugs.ruby-lang.org/issues/5512#note-12
> Too big incompatibility. Abandoned.
> ...
It might be possible to add a new operator // as an alias to Integer#quo, but...
mame (Yusuke Endoh)
01:32 PM Feature #14924: // floor division operator
There was an exactly same proposal (I can't remember the issue number), but rejected because it conflicted with a Regexp literal. nobu (Nobuyoshi Nakada)
01:13 PM Feature #14924 (Rejected): // floor division operator
Hello!
In my job, I have to do many math operations. And it's kind of a pain because of integer division (3 / 2 == 1). I have to constantly cast integers to floats.
Would it be a good idea to always return a float when you divide t...
Anonymous
05:31 PM Bug #14923: Segmentation fault when running tests
Please, disregard this bug. diegoj (Diego J. Romero-López)
02:39 PM Feature #14925: Kernel#assert(expression)
I can't say whether it is necessary or not; I test my ruby code
quite differently (and really sparingly) compared to many other
ruby hackers so I am not a good candidate to ask for any test
or assertion system/framework.
Some testi...
shevegen (Robert A. Heiler)
01:27 PM Feature #14925 (Open): Kernel#assert(expression)
Sometimes, you want to quickly test your code, but it's overkill to reach for a unit test library.
So could it be useful to add this method to Ruby?
~~~ ruby
def assert(expression)
expression or raise AssertionError, 'assertion...
Anonymous
10:53 AM Feature #12306: Implement String #blank? #present? and improve #strip and family to handle unicode
I've proposed `String#space_only?`, like `String#ascii_only?`. nobu (Nobuyoshi Nakada)
09:04 AM Feature #14915: Deprecate String#crypt
merch-redmine@jeremyevans.net wrote:
> Personally, I think it's best to punt and require the user
> provide implementations for creating a password hash and
> checking the password hash via two callable options (e.g.
> :create_passw...
normalperson (Eric Wong)
08:52 AM Feature #14915: Deprecate String#crypt
"Urabe, Shyouhei" <shyouhei@ruby-lang.org> wrote:
> normalperson (Eric Wong) wrote:
> > It's only the BasicAuth code and I have no idea how many people
> > use it; probably not many, but I don't want to break a single
> > user se...
normalperson (Eric Wong)
02:24 AM Revision d6ec1241 (git): Promote Shell library to default gems.
* doc/*: Move entry to default gems category from standard library.
* lib/shell/*: Added `Shell::VERSION` and re-used it with @RELEASE_VERSION.
* test/shell/test_command_processor.rb: added missing require for test library.
* tool/...
hsbt (Hiroshi SHIBATA)
01:48 AM Revision 6d4a5caa (git): Fixed wrong library patFixed wrong library pathh
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e hsbt (Hiroshi SHIBATA)
01:40 AM Revision 5e4ab84d (git): Do not use `git ls-files` for file listing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e znz (Kazuhiro NISHIYAMA)
01:26 AM Revision 997830cd (git): * 2018-07-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
01:25 AM Revision 43fbdfe8 (git): Promote Tracer to default gems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e hsbt (Hiroshi SHIBATA)

07/19/2018

11:27 PM Bug #14923 (Closed): Segmentation fault when running tests
Dear developers.
When running minitest tests on my project https://github.com/diegojromerolopez/babik on branch feature/method-chaining there is a crash on the Ruby Virtual Machine.
To reproduce this problem:
- git clone git@githu...
diegoj (Diego J. Romero-López)
08:16 PM Feature #5446: at_fork callback API
IMHO, this is is still very much needed for cases using plain fork().
The default close-on-exec behavior is irrelevant for fork() without exec() and does not help.
Inheriting, e.g., a database connection in such a case is extremely har...
Eregon (Benoit Daloze)
05:42 PM Feature #5446: at_fork callback API
ashe@kivikakk.ee wrote:
> Are we still interested in pursuing something like this? I'd
> be happy to push it forward.

I'm not sure it's necessary, anymore. Most programs and libs
already have workarounds at this point. pthread_a...
normalperson (Eric Wong)
06:29 AM Feature #5446: at_fork callback API
Are we still interested in pursuing something like this? I'd be happy to push it forward. kivikakk (Asherah Connor)
07:09 PM Feature #14922 (Closed): Resolv getaddresses ignores AAAA records for IPv6
I'd like some feedback here as I'm not totally convinced this is a bug quite yet. I may have done something silly with my DNS configuration.
I have a local DNS server set up with the following /etc/resolv.conf
~~~
[root@ip-10-20-0-1...
dlampa (Donovan Lampa)
06:34 PM Bug #14920: Backport r63857 to fix performance problem on Time class in MacOs systems
Thank you for changing the status and the backport information.
Yes, that patch seems safer, but when I applied only r63994 on top of v2_4_4 tag I still see the same results running the following script.
```
require 'benchmark'
...
rafaelfranca (Rafael França)
08:13 AM Bug #14920: Backport r63857 to fix performance problem on Time class in MacOs systems
Maybe r63994 is better to backport. naruse (Yui NARUSE)
12:33 AM Bug #14920 (Closed): Backport r63857 to fix performance problem on Time class in MacOs systems
(Changing status to closed; which triggers backporting process. This doesn't mean the request was rejected.) shyouhei (Shyouhei Urabe)
01:25 PM Revision c86fc2bb (git): mjit_compile.c: reduce sp motion on JIT
This retries r62655, which was reverted at r63863 for r63763.
tool/ruby_vm/views/_mjit_compile_insn.erb: revert the revert.
tool/ruby_vm/views/_mjit_compile_insn_body.erb: ditto.
tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb: ditto.
to...
k0kubun (Takashi Kokubun)
11:22 AM Revision 33f2c894 (git): * 2018-07-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
11:22 AM Revision 5ad205b8 (git): renamed ruby_tz_update as ruby_tz_uptodate_p
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
09:15 AM Misc #14907: [PATCH] io.c: do not close inherited FDs by default
I understand that FD inheritance dependent program doesn't work well with Ruby.
But I doubt that all external library create FDs with close-on-exec now.
spawn's close_others option would be useful workaround to avoid FD leak
with su...
akr (Akira Tanaka)
08:11 AM Bug #14435 (Closed): Time#gettime slow performance in forked process
Handle backport on #14920, close this ticket. naruse (Yui NARUSE)
06:07 AM Feature #14915: Deprecate String#crypt
shyouhei (Shyouhei Urabe) wrote:
> - Basic authentication itself does not require DES. It is an
> ...
Note that OpenSSL::KDF.scrypt is only defined if the OpenSSL library defines EVP_PBE_scrypt, so it isn't always available. I belie...
jeremyevans0 (Jeremy Evans)
02:12 AM Feature #14915: Deprecate String#crypt
normalperson (Eric Wong) wrote:
> It's only the BasicAuth code and I have no idea how many people
> use it; probably not many, but I don't want to break a single
> user setup without adequate notice.

Understand your concern. T...
shyouhei (Shyouhei Urabe)
04:04 AM Feature #14859: [PATCH] implement Timeout in VM
```
ko1@atdot.net wrote:
> Hi,
>
> Could you explain your algorithm in pseudo code (or English)?
> Current `timeout` method call makes a thread and use `Thread#raise`.
>
> I assume that your idea is creating "timeout scheduler"...
normalperson (Eric Wong)
01:53 AM Feature #14859: [PATCH] implement Timeout in VM
Hi,
Could you explain your algorithm in pseudo code (or English)?
Current `timeout` method call makes a thread and use `Thread#raise`.
I assume that your idea is creating "timeout scheduler" in VM and it manages `timeout` calls an...
ko1 (Koichi Sasada)
12:48 AM Misc #14861 (Closed): DevelopersMeeting20180718Japan
shyouhei (Shyouhei Urabe)
12:47 AM Misc #14921 (Closed): DevelopersMeeting20180809Japan
Please comment your favorite ticket numbers you want to ask to discuss with your *SHORT* comment or summary.
(your summary/comment will help us because we don't need to read all of ticket comments)
*DO NOT* discuss then on this ticke...
shyouhei (Shyouhei Urabe)
12:37 AM Feature #14877: Calculate age in Date class
derosm2 (Mike DeRosa) wrote:
> `Date.new(2016, 3, 6).age #=> 2`
It might be nice to be able to specify a unit of time other than year.
~~~ ruby
Date.new(2016, 3, 6).age #=> 2
Date.new(2016, 3, 6).age(:year) #=> 2
Date.new(2016,...
shan (Shannon Skipper)
12:33 AM Bug #6282: strptime and fractions of seconds
The docs at ruby-doc.org doesn't seem to reflect the fact that this functionality isn't available. mhsver (Michael S)
12:03 AM Feature #14473: Add Range#subrange?
Thank you for your proposal Matz, having thought about it over the last few months, I agree.
I have updated my patch accordingly (which has greatly simplified/improved it), I welcome any comments.
owst (Owen Stephens)

07/18/2018

05:54 PM Bug #14920 (Closed): Backport r63857 to fix performance problem on Time class in MacOs systems
Related to https://bugs.ruby-lang.org/issues/14435.
Both 2.4 and 2.5 are affected by this issue. Naruse-san commit fix it by not calling tzset() more than once when we know the year doesn't have leap seconds.
rafaelfranca (Rafael França)
02:41 PM Feature #14914: Add BasicObject#instance_exec_with_block
matz (Yukihiro Matsumoto) wrote:
> Real-world use-case, please?
This is needed when you don't control the block you want to instance_exec, because it comes from another library or the user. If such a block requires a block argument,...
jeremyevans0 (Jeremy Evans)
06:23 AM Feature #14914: Add BasicObject#instance_exec_with_block
Real-world use-case, please?
Any problem with the following code?
```
blk = proc{|x| self * x}
1.instance_exec(42, 2) do |a, b|
(self + a).instance_exec(b, &blk)
end
# => 86
```
Matz.
matz (Yukihiro Matsumoto)
01:29 PM Feature #14919: Add String#byteinsert
I don't have a specific opinion on the suggestion itself; Martin raised some valid
points, in my opinion. But I wanted to comment on something else.
There have been some suggestions to the developer meeting, as recently as 8 hours
a...
shevegen (Robert A. Heiler)
09:20 AM Feature #14919: Add String#byteinsert
aycabta (aycabta .) wrote:
> duerst (Martin Dürst) wrote:
> ...
On the lowest level, characters indeed come in as a string of bytes. But it would be wrong to insert individual bytes into a string unless these bytes are also characters....
duerst (Martin Dürst)
07:25 AM Feature #14919: Add String#byteinsert
duerst (Martin Dürst) wrote:
> Editing of code points is easily possible with String#[]=; there is no need to use byteinsert.
## Input from CLI
In CLI tool, all characters come as each of the bytes. All multibyte characters are sp...
aycabta (aycabta .)
06:41 AM Feature #14919: Add String#byteinsert
aycabta (aycabta .) wrote:
> It's important for multibyte String editing. Unicode grapheme characters sometimes have plural code points. In text editing, software sometimes should add a new code point to an existing grapheme character. ...
duerst (Martin Dürst)
05:18 AM Feature #14919 (Closed): Add String#byteinsert
It's important for multibyte String editing. Unicode grapheme characters sometimes have plural code points. In text editing, software sometimes should add a new code point to an existing grapheme character. String#byteinsert is important... aycabta (aycabta .)
01:11 PM Revision 1adbbc3f (git): test_rubyoptions.rb: skip testing JIT on mswin
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e k0kubun (Takashi Kokubun)
12:46 PM Feature #14878: Add command line argument to deactivate JIT
Now --enable-jit, --enable=jit, --disable-jit, --disable=jit are available. k0kubun (Takashi Kokubun)
12:46 PM Feature #14878 (Closed): Add command line argument to deactivate JIT
Applied in changeset trunk|r63995.
----------
ruby.c: accept --disable-jit option
by promoting jit to feature flag.
mjit.h: update comment about mjit_opts.on
test_rubyoptions.rb: add test for switching JIT enablement
"--jit" flag us...
k0kubun (Takashi Kokubun)
07:41 AM Feature #14878: Add command line argument to deactivate JIT
There is already --enable=... and --disable=...
```
% ruby --help
...
--enable={gems|rubyopt|...}[,...], --disable={gems|rubyopt|...}[,...]
enable or disable features. see below for available features
...
```...
akr (Akira Tanaka)
12:45 PM Revision 053cdaf7 (git): ruby.c: accept --disable-jit option
by promoting jit to feature flag.
mjit.h: update comment about mjit_opts.on
test_rubyoptions.rb: add test for switching JIT enablement
"--jit" flag usage may be deprecated later, but not discussed yet.
[Feature #14878]
git-svn-id: s...
k0kubun (Takashi Kokubun)
10:30 AM Revision 4bc16691 (git): reduce tzset
* time.c (rb_localtime_r): call tzset() only after TZ environment
variable is changed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
10:07 AM Feature #14912: Introduce pattern matching syntax
We had some in-detail discussuion about the possibility of this issue in todays developer meeting. Though it seemed a rough cut that needs more brush-ups, the proposal as a whole got positive reactions. So please continue developing.
...
shyouhei (Shyouhei Urabe)
07:14 AM Feature #14912: Introduce pattern matching syntax
I expect deconstrocut methods will be defined for core classes if this proposal is accepted.
But I feel the deconstruct method of Struct in the sample code is tricky
because it duplicates values.
(s.deconstruct[0][0] and s.deconstru...
akr (Akira Tanaka)
08:52 AM Feature #14915: Deprecate String#crypt
mame@ruby-lang.org wrote:
> We first need to remove the usage of String#crypt from WEBrick. @normalperson, the maintainer of WEBrick, what do you think? Is it possible and acceptable? If it is not, we can't deprecate String#crpyt as...
normalperson (Eric Wong)
08:18 AM Feature #14915: Deprecate String#crypt
This ticket has been discussed at the developers' meeting today.
Some committers had a skeptic opinion against the removal, but agreed with it in some conditions.
We first need to remove the usage of String#crypt from WEBrick. @no...
mame (Yusuke Endoh)
08:16 AM Revision a22232cd (git): zlib (rb_gzreader_getc): localize and return cbuf directly
No point in having a long-lived cbuf in "struct gzfile"
since GZFILE_CBUF_CAPA is smaller than RSTRING_EMBED_LEN_MAX
(even on 32-bit). We can also have rb_econv_convert write
directly to the return value instead of an intermediate buffe...
Eric Wong
07:33 AM Feature #14913 (Closed): Extend case to match several values at once
We will discuss the pattern matching in #14912.
Matz.
matz (Yukihiro Matsumoto)
06:24 AM Feature #12306: Implement String #blank? #present? and improve #strip and family to handle unicode
If the requirement is adding a predicate method to check if a string contains only characters with space property (defined by Unicode), it's OK to add the method. I am not fully satisfied with the name `blank?` because it can cause confu... matz (Yukihiro Matsumoto)
06:04 AM Feature #14473 (Assigned): Add Range#subrange?
tarui (Masaya Tarui)
06:03 AM Feature #14473 (Open): Add Range#subrange?
The method name `subrange?` may cause confusion that which includes which.
I propose `cover?` to accept ranges.
Matz.
matz (Yukihiro Matsumoto)
05:45 AM Feature #14784: Comparable#clamp with a range
I feel this proposal is needlessly big: it needs range support for `Comparable#clamp` and startless range.
I think just supporting `nil` for 1st and 2nd argument of `Comparable#clamp` is enough.
akr (Akira Tanaka)
04:52 AM Misc #14861: DevelopersMeeting20180718Japan
- [Feature #13626] Add `String#byteslice!`
- [Feature #14618] Add display width method to String for CLI
- [Misc #14917] Add RDoc documents to tar ball
- [Feature #14918] Use Reline for fallback of ext/readline
- [Feature #14919] Add...
aycabta (aycabta .)
04:48 AM Bug #14918 (Closed): Use Reline for fallback of ext/readline
Ruby loses readline standard library when the system doesn't have libreadline during Ruby installation, At https://bugs.ruby-lang.org/issues/11084, @hsbt proposed pure Ruby implementation. But I think that rb-readline is not good for Rub... aycabta (aycabta .)
04:08 AM Misc #14917 (Assigned): Add RDoc documents to tar ball
I guess that distribution packages should include RDoc documents' files because RDoc documents installation step needs too long time.
There is the other reason. RDoc sometimes fails during "generating RDoc documentation" phase of inst...
aycabta (aycabta .)

07/17/2018

10:27 PM Revision f705c529 (git): Include the alternative malloc header instead of malloc.h
This commit fixes a build error on systems that have
`malloc_usable_size` but also enable jemalloc via `--with-jemalloc`.
For example, Ubuntu Precise defines `malloc_usable_size` in malloc.h, so
gc.c will include malloc.h. This definiti...
tenderlovemaking (Aaron Patterson)
05:55 PM Bug #14435: Time#gettime slow performance in forked process
Looks like [r63857](https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/63857) fix this issue.
Naruse-san, can we backport it to 2.4 and 2.5? It is causing some massive performance problems on MacOS.
rafaelfranca (Rafael França)
05:00 PM Feature #14916 (Open): Proposal to add Array#===
## 概要
`Array#===` を追加する提案になります。
基本的な動作は『`Array#==` の `===` で比較する版』になります。
## 仕様
配列の各要素をそれぞれ順に `===` で比較し、全要素が `true` の場合に `true` を返す。そうでない場合は `false` を返す。
### 動作例
```ruby
# 配列の各要素を #=== を使用して比較する
[ String, /\w/ ] ...
osyo (manga osyo)
04:20 PM Revision 80dac806 (git): revert r63988
Due to trunk-mjit CI failures:
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1130097
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1130196
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63991 b2dd03c8-39d4-4d8f-98ff-823fe69...
k0kubun (Takashi Kokubun)
03:15 PM Revision 5aa52587 (git): insns.def: remove redundant ifndef in r63988
By the way, the original patch of r63988 was provided by wanabe:
https://github.com/wanabe/ruby/tree/local-stack
but I forgot to add his credit in the previous commit message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63990 b2d...
k0kubun (Takashi Kokubun)
03:09 PM Revision 941bc1a6 (git): * 2018-07-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:09 PM Revision 6a4bb345 (git): mjit_compile.c: resurrect local variable stack
This optimization was reverted on r63863, but this commit resurrects the
optimization to skip some sp motions on JIT execution.
tool/ruby_vm/views/_mjit_compile_insn_body.erb: ditto
tool/ruby_vm/views/_mjit_compile_insn.erb: ditto
insn...
k0kubun (Takashi Kokubun)
12:21 PM Revision e749134f (git): Promote Synchronizer to default gems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e hsbt (Hiroshi SHIBATA)
11:39 AM Revision c982cbd1 (git): Unified common workflow for default gems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e hsbt (Hiroshi SHIBATA)
09:00 AM Feature #14913: Extend case to match several values at once
Perhaps, you can redefine `Array#===` and use arrays in the following way:
```ruby
case [x, y]
when [0..10, 0..10]
...
when [Array, nil]
...
when [Numeric, nil], [nil, Numeric]
...
end
```
sawa (Tsuyoshi Sawada)
05:43 AM Feature #14915: Deprecate String#crypt
mame (Yusuke Endoh) wrote:
> I agree with deprecation and removal of String#crypt. If it were not included in the core, and if it were proposed today, the proposal would be definitely rejected as "it should be implemented as a gem".
>...
jeremyevans0 (Jeremy Evans)
05:17 AM Feature #14915: Deprecate String#crypt
I can list up 10+ more reasons why using String#crypt is a bad idea today, but it seems we all agree on that point. The problem is how to let programmers avoid uisng it.
In addition to deprecate the method, how about removing DES fro...
shyouhei (Shyouhei Urabe)
04:42 AM Feature #14915: Deprecate String#crypt
merch-redmine@jeremyevans.net wrote:
> normalperson (Eric Wong) wrote:
> > While I don't care for #crypt, I'd like to move some tiny exts
> > like fiber, io/wait, io/nonblock directly into core; because
> > DSOs increase memory u...
normalperson (Eric Wong)
04:39 AM Feature #14915: Deprecate String#crypt
I agree with deprecation and removal of String#crypt. If it were not included in the core, and if it were proposed today, the proposal would be definitely rejected as "it should be implemented as a gem".
> This moves the String#crypt...
mame (Yusuke Endoh)
02:22 AM Feature #14915: Deprecate String#crypt
shyouhei (Shyouhei Urabe) wrote:
> I agree that crypt(3) is too difficult to use correctly. Properly avoiding traditional modes to generate adequate hash are up to users, which is not how we do security these days. OpenBSD splits the ...
jeremyevans0 (Jeremy Evans)
02:05 AM Feature #14915: Deprecate String#crypt
I agree that crypt(3) is too difficult to use correctly. Properly avoiding traditional modes to generate adequate hash are up to users, which is not how we do security these days. OpenBSD splits the functionality into crypt_checkpass(3... shyouhei (Shyouhei Urabe)
01:55 AM Feature #14915: Deprecate String#crypt
normalperson (Eric Wong) wrote:
> merch-redmine@jeremyevans.net wrote:
> ...
I agree that would be easiest and safest. However, at some point it should be moved out, and I think it's better to start that process early.
> While I do...
jeremyevans0 (Jeremy Evans)
05:42 AM Feature #14859: [PATCH] implement Timeout in VM
> Feature #14859: [PATCH] implement Timeout in VM
> https://bugs.ruby-lang.org/issues/14859

Note: I'm still working on this. [Feature #13618] (auto-fiber)
basically has an implementation of timeouts in the VM, too,
because of tim...
normalperson (Eric Wong)
01:26 AM Revision d459572c (git): test for wrong order: option
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
01:22 AM Revision 98596176 (git): Fix message when `order` was an invalid value
The symbol that can be used is `:bottom`, not `:down`.
Ref: https://github.com/ruby/ruby/blob/e39b2cff8ac2dc93b35bd43ffcce3ded8e3b4c25/error.c#L1061
[Fix GH-1916]
From: yuuji.yaginuma <yuuji.yaginuma@gmail.com>
git-svn-id: svn+ssh://c...
nobu (Nobuyoshi Nakada)
01:00 AM Revision 25510c1c (git): ruby-runner.c: show the failed path
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
12:47 AM Revision 71120953 (git): dir.c: fix glob with base when no DT_UNKNOWN
* dir.c (do_stat, do_lstat): need the length of the base path for
fstatat() when fd is valid.
* dir.c (glob_helper): fix for platforms where DT_UNKNOWN is not
available, e.g. Solaris.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tru...
nobu (Nobuyoshi Nakada)
 

Also available in: Atom