Project

General

Profile

Activity

From 11/11/2020 to 11/17/2020

11/17/2020

11:24 PM Feature #17326: Add Kernel#must! to the standard library
jeremyevans0 (Jeremy Evans) wrote in #note-14:
> But the fact that there should be a high bar is something I would hope we all understand.
I hope that something I wrote didn't make you think I disagree there! I was just genuinely curiou...
jez (Jake Zimmerman)
09:46 PM Feature #17326: Add Kernel#must! to the standard library
jez (Jake Zimmerman) wrote in #note-13:
> jeremyevans0 (Jeremy Evans) wrote in #note-12:
> ...
The cost to adding a method to a core class is in the conceptual overhead, backwards compatibility, and need to support in perpetuity, since...
jeremyevans0 (Jeremy Evans)
09:12 PM Feature #17326: Add Kernel#must! to the standard library
jeremyevans0 (Jeremy Evans) wrote in #note-12:
> the benefit of adding it is smaller than the cost of adding another method to Kernel
Can you speak more on the const of adding a method to Kernel? While I understand the costs of somethi...
jez (Jake Zimmerman)
08:50 PM Feature #17326: Add Kernel#must! to the standard library
This method is trivial to write in Ruby. While it can be useful even in codebases that do not use static typing, I think the benefit of adding it is smaller than the cost of adding another method to Kernel. I think it should probably b... jeremyevans0 (Jeremy Evans)
07:46 PM Feature #17326: Add Kernel#must! to the standard library
I really don't want to add new syntax for something that can already be expressed in normal Ruby code.
I wanted to bump this suggestion from Ufuk:
ufuk (Ufuk Kayserilioglu) wrote in #note-5:
> As for the matching `must` method, I thin...
jez (Jake Zimmerman)
03:44 PM Feature #17326: Add Kernel#must! to the standard library
Just an aside note: not saying something against, or for the proposal, I can't help noticing that abandoned "method reference" idea solved at least (1) and (2) of original ticket, removing some of the necessity of constantly extending co... zverok (Victor Shepelev)
03:20 PM Feature #17326: Add Kernel#must! to the standard library
I don't think I can agree with the `|.` operator, but having the raise in a block would make a lot of sense to me.
task.or{raise}.mailing_params.or{raise}.fetch('template_context')
This could also be used to return a default va...
Dan0042 (Daniel DeLorme)
06:35 AM Feature #17326: Add Kernel#must! to the standard library
I like this syntax :
`task|.raise.mailing_params|.raise.fetch('template_context')`
As you said it's consistent with `&.`
nrodriguez (Nicolas Rodriguez)
11:13 PM Revision 64926d50 (git): test/net/smtp - use TCPSocket when UNIXSocket unavailable
MSP-Greg (Greg L)
10:17 PM Revision 2ef3b979 (git): NEWS: Add --backtrace-limit option [ci skip]
Junichi Ito
09:58 PM Revision 898aff95 (git): Remove NEWS entry about taint deprecation warnings [ci skip]
JunichiIto on GitHub correctly pointed out this is no longer
accurate due to the change to not display deprecation warnings by
default.
jeremyevans (Jeremy Evans)
08:30 PM Misc #17329 (Closed): Doc for pattern match?
Ah, I confused both sites. Closing this then. marcandre (Marc-Andre Lafortune)
06:32 PM Misc #17329: Doc for pattern match?
> Who has access to do that?
If you mean access to ruby-doc.org, I believe it is one-person project. Last time I wanted something to be fixed there I've just contacted maintainer on Twitter: https://twitter.com/zverok/status/121051255...
zverok (Victor Shepelev)
06:09 PM Misc #17329: Doc for pattern match?
Ohh, glad to see it's there, not updated.
There have been many improvements by @BurdetteLamar, we should definitely update the published doc as it is today.
Who has access to do that?
marcandre (Marc-Andre Lafortune)
10:02 AM Misc #17329: Doc for pattern match?
(As an aside note, I really believe Ruby needs some kind of "Documentation working group", the current state of things is errrrm sub-optimal.) zverok (Victor Shepelev)
10:00 AM Misc #17329: Doc for pattern match?
Funny.
Here: https://docs.ruby-lang.org/en/master/doc/syntax/control_expressions_rdoc.html#label-case+Expression we have
> Since Ruby 2.7, case expressions also provide ....
I [added the docs](https://github.com/ruby/ruby/pull/2...
zverok (Victor Shepelev)
01:59 AM Misc #17329 (Closed): Doc for pattern match?
Is there an official doc for pattern matching?
I note that `case` in https://ruby-doc.org/core-2.7.2/doc/syntax/control_expressions_rdoc.html does not mention it, and `in` does not appear.
marcandre (Marc-Andre Lafortune)
07:04 PM Feature #17278: On-demand sharing of constants for Ractor
In #17323#note-5, ko1 mentioned there is a possibility to provide "fork" model. So I tried thinking if it could apply here.
We can imagine that accessing an auto-shareable constant
a) from non-main ractor: is made shareable
b) from ...
Dan0042 (Daniel DeLorme)
06:53 PM Revision 0829f147 (git): * 2020-11-18 [ci skip]
git[bot]
06:52 PM Revision 5e3259ea (git): fix public interface
To make some kind of Ractor related extensions, some functions
should be exposed.
* include/ruby/thread_native.h
* rb_native_mutex_*
* rb_native_cond_*
* include/ruby/ractor.h
* RB_OBJ_SHAREABLE_P(obj)
* rb_ractor_shareable_p(ob...
ko1 (Koichi Sasada)
06:37 PM Feature #17325: Adds Fiber#cancel, which forces a Fiber to break/return
n.b. I consider this to be related, at least in spirit, to https://bugs.ruby-lang.org/issues/595. I consider this analogous to IO#open and IO#close. We ought to have a structured/standard way to "close" fibers that have been "opened". (T... nevans (Nicholas Evans)
04:25 PM Feature #17325: Adds Fiber#cancel, which forces a Fiber to break/return
Like I wrote above, I think I'd like to change my PR so that `terminated_fiber.cancel` returns `nil` or `false` instead of raising `FiberError`. That way any fiber on the current thread, except for the root fiber, can be canceled without... nevans (Nicholas Evans)
03:45 PM Feature #17325: Adds Fiber#cancel, which forces a Fiber to break/return
one more update to alternatives nevans (Nicholas Evans)
03:40 PM Feature #17325: Adds Fiber#cancel, which forces a Fiber to break/return
added more to alternatives nevans (Nicholas Evans)
03:20 PM Feature #17325: Adds Fiber#cancel, which forces a Fiber to break/return
Added some other alternatives to the description. nevans (Nicholas Evans)
03:02 PM Feature #17325: Adds Fiber#cancel, which forces a Fiber to break/return
Thanks for taking a look at this, Benoit. I agree it's not obvious why this is necessary with Fiber#raise, so I'll try to explain my reasoning in more detail:
Yes, a library (e.g. `async`) could write a "suspend" function that wraps r...
nevans (Nicholas Evans)
04:28 PM Feature #17312: New methods in Enumerable and Enumerator::Lazy: flatten, product, compact
> But even with Enumerator the recursive aspect still represents a compatibility problem.
I am not sure about its severity, though. I mean, Universe is big and sure somewhere in it there should be a code which has an *array of enumera...
zverok (Victor Shepelev)
04:14 PM Feature #17312: New methods in Enumerable and Enumerator::Lazy: flatten, product, compact
I understand the thinking behind #flatten; if `ary.flatten` is possible then why not `ary.to_enum.flatten`? It should be isomorphic. But even with Enumerator the recursive aspect still represents a compatibility problem. So as long as th... Dan0042 (Daniel DeLorme)
03:50 PM Feature #17312: New methods in Enumerable and Enumerator::Lazy: flatten, product, compact
@mame @Dan0042 Oh, you are right, starting to think from `Enumerable::Lazy` perspective I've missed a huge incompatibility introduced by `flatten`.
@mame I'll split into several proposals+patches: `Enumerable#compact`, and, I am start...
zverok (Victor Shepelev)
04:07 PM Feature #17276: Ripper stops tokenizing after keyword as a method parameter
Eregon (Benoit Daloze) wrote in #note-2:
> jeremyevans0 (Jeremy Evans) wrote in #note-1:
> ...
Yes, the same is possible with `Ripper.sexp/sexp_raw`. I've updated the pull request to handle those as well.
jeremyevans0 (Jeremy Evans)
10:10 AM Feature #17276: Ripper stops tokenizing after keyword as a method parameter
jeremyevans0 (Jeremy Evans) wrote in #note-1:
> Maybe we could support keyword arguments in `Ripper.lex` and `Ripper.tokenize` to raise SyntaxError for errors? Here's a pull request for that approach: https://github.com/ruby/ruby/pull/...
Eregon (Benoit Daloze)
05:17 AM Feature #17276: Ripper stops tokenizing after keyword as a method parameter
Ripper records errors, but `Ripper.tokenize` and `Ripper.lex` cannot return them. Here's how you can handle errors with Ripper (for tokenize, lex is similar):
```ruby
require 'ripper'
r = Ripper::Lexer.new('def req(true) end', 'a',...
jeremyevans0 (Jeremy Evans)
02:24 PM Bug #17197: Some Hash methods still have arity 2 instead of 1
Ah, I was wrong.
mame (Yusuke Endoh) wrote in #note-6:
> IMO, this is a bug since 1.9.0 because `Hash#select` looks like a faster version of `Enumerable#select`, so it should behave as possible as like `Enumerable#select`.
Hash#select ...
mame (Yusuke Endoh)
01:37 PM Bug #17197: Some Hash methods still have arity 2 instead of 1
Eregon (Benoit Daloze) wrote in #note-8:
> Check if the block uses arity 1 and warn that it should instead use `|k,v|` or `|k,|`?
Yes. It seems obvious, am I missing something? I'm aware that `proc{ |k,| }.arity == 1` (imho a bug) bu...
Dan0042 (Daniel DeLorme)
12:55 PM Feature #17330: Object#non
It reminded me https://bugs.ruby-lang.org/issues/12075#change-57152. nobu (Nobuyoshi Nakada)
12:49 PM Feature #17330 (Open): Object#non
(As always "with core" method proposals, I don't expect quick success, but hope for a fruitful discussion)
### Reasons:
Ruby always tried to be very chainability-friendly. Recently, with introduction of `.then` and `=>`, even more ...
zverok (Victor Shepelev)
12:45 PM Bug #17021: "arm64" and "arm" are mixed in RbConfig on Apple silicon
Maybe, `uname -m` (and tool/config.guess) returns "arm", then `RUBY_UNIVERSAL_ARCH` replaces target_cpu only? nobu (Nobuyoshi Nakada)
12:35 PM Bug #17021: "arm64" and "arm" are mixed in RbConfig on Apple silicon
As I have no access to Apple silicon machines, can anyone share config.log file on that platform? nobu (Nobuyoshi Nakada)
10:20 AM Bug #17021: "arm64" and "arm" are mixed in RbConfig on Apple silicon
This seems a clear bug, at least `host_cpu` and `build_cpu`.
`arm` means 32-bit and is already used e.g. on Linux to mean that.
So it should be `arm64` or `aarch64`.
`target_cpu` is already `arm64` interestingly.
@nobu Do you kno...
Eregon (Benoit Daloze)
12:20 PM Bug #11213: defined?(super) ignores respond_to_missing?
https://github.com/ruby/ruby/pull/3777 nobu (Nobuyoshi Nakada)
10:25 AM Feature #17314: Provide a way to declare visibility of attributes defined by attr* methods in a single expression
phluid61 (Matthew Kerwin) wrote in #note-9:
> ``` ruby
> ...
This is exactly why I created this feature request. Improved `attr_accessor` returns array of defined methods and `private/protected/public` receives single array as argument.
radarek (Radosław Bułat)
10:23 AM Feature #17314: Provide a way to declare visibility of attributes defined by attr* methods in a single expression
marcandre (Marc-Andre Lafortune) wrote in #note-8:
> I would also like `alias_method x, y` to return `x` so we could write `protected alias_method :foo, :bar`
Additionaly both activesupport's `delegate` and ruby's `def_delegators` me...
radarek (Radosław Bułat)
07:55 AM Feature #17314: Provide a way to declare visibility of attributes defined by attr* methods in a single expression
Dan0042 (Daniel DeLorme) wrote in #note-7:
> +1
> ...
``` ruby
attr_accessor :x, :y #=> ?
```
phluid61 (Matthew Kerwin)
04:30 AM Feature #17314: Provide a way to declare visibility of attributes defined by attr* methods in a single expression
I would also like `alias_method x, y` to return `x` so we could write `protected alias_method :foo, :bar` marcandre (Marc-Andre Lafortune)
09:05 AM Revision 0683912d (git): Skip tests related TLS with Windows platform.
hsbt (Hiroshi SHIBATA)
05:17 AM Revision cada6d85 (git): Import net-smtp-0.2.0 from https://github.com/ruby/net-smtp
hsbt (Hiroshi SHIBATA)
02:32 AM Bug #17305 (Closed): rb_rescue2() seems to loop forever if given a non-module for rescued exceptions on <= 2.6.6
I bisected the fix to commit:a569bc09e25a2ba813d0bec1228d9ff65330a3db. We definitely don't want the entire commit. Attached is a minimal subset of the commit that doesn't introduce a new external function, in case @nagachika would like... jeremyevans0 (Jeremy Evans)
12:41 AM Revision fcc88da5 (git): configure.ac: fix for upcoming autoconf-2.70
The failure initially noticed on `autoconf-2.69d` (soon to become 2.70):
```
$ ./configure
./configure: line 8720: syntax error near unexpected token `fi'
./configure: line 8720: `fi'
```
Before the change generated `./configure ` snip...
Sergei Trofimovich
12:39 AM Feature #13381 (Closed): [PATCH] Expose rb_fstring and its family to C extensions
Applied in changeset commit:git|ef19fb111a8c8bf1a71d46e6fcf34b227e086845.
----------
Expose the rb_interned_str_* family of functions
Fixes [Feature #13381]
byroot (Jean Boussier)
12:39 AM Revision ef19fb11 (git): Expose the rb_interned_str_* family of functions
Fixes [Feature #13381] byroot (Jean Boussier)
12:08 AM Feature #17328 (Rejected): Extend `un.rb` to be usable by everyone
You can run it as `ruby run.rb`. nobu (Nobuyoshi Nakada)

11/16/2020

10:41 PM Revision 68ffc8db (git): Set allocator on class creation
Allocating an instance of a class uses the allocator for the class. When
the class has no allocator set, Ruby looks for it in the super class
(see rb_get_alloc_func()).
It's uncommon for classes created from Ruby code to ever have an
al...
alanwu (Alan Wu)
10:41 PM Revision ebb96fa8 (git): Fix singleton class cloning
Before this commit, `clone` gave different results depending on whether the original object
had an attached singleton class or not.
Consider the following setup:
```
class Foo; end
Foo.singleton_class.define_method(:foo) {}
obj = Foo.n...
alanwu (Alan Wu)
10:37 PM Bug #17197: Some Hash methods still have arity 2 instead of 1
@Dan0042 How would we warn that case? Check if the block uses arity 1 and warn that it should instead use `|k,v|` or `|k,|`?
I think we should fix `Hash#map` at least, that's also a clear optimization bug like `Hash#each`, and it forc...
Eregon (Benoit Daloze)
02:04 PM Bug #17197: Some Hash methods still have arity 2 instead of 1
So when you have a bug that is troublesome to fix because it may result in large incompatibility... rather than "just fix it" and wait to see if other people's code explodes, wouldn't the Industry-Standard Best Practice™ here be to just ... Dan0042 (Daniel DeLorme)
07:59 AM Bug #17197: Some Hash methods still have arity 2 instead of 1
This story is rather different from `Hash#each` in #14015.
`Hash#each` has yielded an array that has a key and a value since a long time ago:
```
# 2.7
{ a: 1 }.each {|a| p a } #=> [:a, 1]
```
BTW, `Hash#each` has an optimization to s...
mame (Yusuke Endoh)
10:34 PM Bug #17302 (Closed): The TracePoint API does not allow setting multiple line traces within the same method (ISEQ)
Applied in changeset commit:git|084e7e31b257f6ac859769553b4c1c6ca2930152.
----------
remain enabled and line specified trace points
If two or more tracepoints enabled with the same target and with
different target lines, the only last ...
ko1 (Koichi Sasada)
10:33 PM Revision 084e7e31 (git): remain enabled and line specified trace points
If two or more tracepoints enabled with the same target and with
different target lines, the only last line is activated.
This patch fixes this issue by remaining existing trace instructions.
[Bug #17302]
ko1 (Koichi Sasada)
08:14 PM Feature #16786: Light-weight scheduler for improved concurrency.
I am happy with `Fiber.set_scheduler`. I'm also happy with `Fiber.scheduler=` (canonical Ruby style) but I accept and agree with Matz's reasoning behind the former.
I originally preferred `Thread.current.scheduler=` because it seemed lo...
ioquatix (Samuel Williams)
05:38 PM Revision 1271782f (git): * 2020-11-17 [ci skip]
git[bot]
05:38 PM Revision 1ee8d4b0 (git): Fix typo on Proc docs
Tomás Coêlho
04:00 PM Feature #17328: Extend `un.rb` to be usable by everyone
This has the potential to introduce security issues. Avoiding security issues by not automatically loading files in the current directory is the reason `.` was removed from the default `$LOAD_PATH` in Ruby 1.9. jeremyevans0 (Jeremy Evans)
02:37 PM Feature #17328 (Rejected): Extend `un.rb` to be usable by everyone
I've opened the PR here: https://github.com/ruby/ruby/pull/3771, although if you need me to submit a patch just let me know.
Basically I want to be able to use `ruby -run` for more than just running a http server, and thought it could r...
sdwolfz (Codruț Gușoi)
03:55 PM Feature #17314: Provide a way to declare visibility of attributes defined by attr* methods in a single expression
+1
Ever since ruby 2.1 when `def` was improved to return a Symbol, I've always wondered why the same was not done for `attr_*` methods.
Dan0042 (Daniel DeLorme)
01:30 PM Misc #16778: Should we stop vendoring default gems code?
Not that I'm no longer interested, but it sounds like it'd be wasted work.
Even if the reason for rejection doesn't make sense, I think it can be read between lines that the ruby-core team is not interested in this.
deivid (David Rodríguez)
01:14 PM Revision 0f37f384 (git): [DOC] Fixed a typo [ci skip]
nobu (Nobuyoshi Nakada)
12:53 PM Feature #17326: Add Kernel#must! to the standard library
Since this feature is reminiscent of the safe navigation operator `&.`, I think it would be good if we can make the notation similar to the latter notation or use some variant of it. I suggest to make the following two changes to the cur... sawa (Tsuyoshi Sawada)
12:25 PM Feature #17326: Add Kernel#must! to the standard library
Given that Ruby 3 will ship with RBS which will be supplanted with a type-checker based on RBS (Steep) soon, I expect more people to experiment with types adoption in their codebases. Our early adoption of type checking at Shopify has sh... ufuk (Ufuk Kayserilioglu)
07:33 AM Feature #17326: Add Kernel#must! to the standard library
I like this feature as a tiny tool for debugging and assertion.
When I encounter `undefined method 'foo' for nil:NilClass` on `x.foo`, I insert `Kernel#p` to many places, such as `x = expr` to `x = p(expr)`, to try identifying where the...
mame (Yusuke Endoh)
06:25 AM Feature #17326: Add Kernel#must! to the standard library
There is `not_nil!` in Crystal https://github.com/crystal-lang/crystal/blob/master/src/object.cr#L223 nrodriguez (Nicolas Rodriguez)
12:31 AM Feature #17326: Add Kernel#must! to the standard library
- Yes I think we need this feature (except the name)
- Re: naming, the rule of a bang method is:
> A bang method cannot exist alone. If there is `#must!`, there shall also be `#must` which is a "safer" variant of it.
...
shyouhei (Shyouhei Urabe)
12:12 PM Feature #17327: The Queue constructor should take an initial set of items
Agreed with @byroot (actually I was going to note the same, he beat me to it).
I would also like to note that different from `Set`, for example, the order of items in the supplied parameter matters in the `Queue` case. Even though th...
ufuk (Ufuk Kayserilioglu)
09:11 AM Feature #17327: The Queue constructor should take an initial set of items
I agree that the constructor should take an enumerable rather than variadic arguments, as it would be consistent with `Set.new([1, 2, 3])`, and `Array.new([1, 2, 3])` byroot (Jean Boussier)
08:44 AM Revision 8985add9 (git): Update TypeProf to 0.5.2
mame (Yusuke Endoh)
08:44 AM Revision bcd29fed (git): Update TypeProf to 0.5.1
soutaro (Soutaro Matsumoto)
08:44 AM Revision 57ab779a (git): Update RBS to 0.17.0
soutaro (Soutaro Matsumoto)
08:24 AM Feature #17312: New methods in Enumerable and Enumerator::Lazy: flatten, product, compact
I think `Enumerable#compact` is trivial and maybe useful.
In regard to `Enumrable#flatten`, I agree with @Dan0042's concern. I think that it should flatten only `Array` elements, but it might look unnatural.
I'm unsure if `Enumerable#p...
mame (Yusuke Endoh)
07:59 AM Feature #17323: Ractor::LVar to provide ractor-local storage
Dan0042 (Daniel DeLorme) wrote in #note-4:
> The problem with the example above is that it's too magical to have a variable or constant return an object different from what was assigned.
Absolutely. By ractor's design, there is a pos...
ko1 (Koichi Sasada)
02:01 AM Revision 0ba096df (git): Fix a link [ci skip]
znz (Kazuhiro NISHIYAMA)
01:59 AM Revision ef82a0ef (git): Fix links [ci skip]
znz (Kazuhiro NISHIYAMA)

11/15/2020

11:25 PM Bug #17124 (Closed): Wrong "ambiguous first argument" warning
Applied in changeset commit:git|f5bb9115a7f69c32089b9b970933c3507fb9f82b.
----------
Use more specific warning for ambiguous slash
Fixes [Bug #17124]
jeremyevans (Jeremy Evans)
08:28 AM Bug #17124: Wrong "ambiguous first argument" warning
I think your wording is a big improvement 👍
I think you've paid the cost already with your diff, we should reap the benefit by committing it!
marcandre (Marc-Andre Lafortune)
06:11 AM Bug #17124 (Feedback): Wrong "ambiguous first argument" warning
marcandre (Marc-Andre Lafortune) wrote in #note-3:
> I hadn't thought of `method /a /x` or `method /a /<newline>other_method`, indeed.
> ...
No, the warning is used for `+` and `-` in addition to `/`.
> If so, could we reword the wa...
jeremyevans0 (Jeremy Evans)
11:25 PM Revision f5bb9115 (git): Use more specific warning for ambiguous slash
Fixes [Bug #17124] jeremyevans (Jeremy Evans)
10:59 PM Feature #17325: Adds Fiber#cancel, which forces a Fiber to break/return
This sounds like Thread#kill but for Fiber.
However, Fiber is cooperative so it seems this shouldn't be needed.
What's a concrete issue with Fiber#raise? It seems redundant with it to me.
If the application swallows Exception I thin...
Eregon (Benoit Daloze)
08:48 PM Feature #17325: Adds Fiber#cancel, which forces a Fiber to break/return
I've updated the description to 1) better describe the motivation and 2) match the PR's current behavior when a Fiber is canceled multiple times. nevans (Nicholas Evans)
05:35 AM Feature #17325: Adds Fiber#cancel, which forces a Fiber to break/return
updated description and github PR nevans (Nicholas Evans)
10:50 PM Feature #17327: The Queue constructor should take an initial set of items
That all makes sense to me. ioquatix (Samuel Williams)
10:13 PM Feature #17327: The Queue constructor should take an initial set of items
I'm not worried about `Queue.new(worklist)` or `Queue.new(*worklist)`, so that's fine if more people feel that way. I think the key thing is conciseness in text source code, and also avoiding needing to synchronise while adding each indi... chrisseaton (Chris Seaton)
10:11 PM Feature #17327: The Queue constructor should take an initial set of items
What about a way to bulk add items, e.g. `q.concat` or whatever is the same for Array, and maybe it would be best to have the first argument as an array, e.g. `Queue.new(worklist)`? I think it's more expensive to expand it in CRuby when ... ioquatix (Samuel Williams)
10:07 PM Feature #17327: The Queue constructor should take an initial set of items
https://github.com/ruby/ruby/pull/3768 chrisseaton (Chris Seaton)
10:06 PM Feature #17327 (Closed): The Queue constructor should take an initial set of items
I often create a `Queue` and then process it with a set of concurrent workers in threads. I end up writing:
```ruby
q = Queue.new
worklist.each do |work|
q.push work
end
```
I'd rather be able to write
```ruby
q = Queue....
chrisseaton (Chris Seaton)
10:45 PM Revision 45fd53e0 (git): * 2020-11-16 [ci skip]
git[bot]
10:44 PM Revision fd46ff9d (git): NEWS: merge Range and Regexp being frozen [doc]
Marc-Andre Lafortune
05:51 AM Bug #17146 (Closed): Queue operations are allowed after it is frozen
jeremyevans0 (Jeremy Evans)
05:48 AM Bug #17158 (Closed): Ractor Segfault when using shell and puts
jeremyevans0 (Jeremy Evans)
05:48 AM Bug #17304 (Closed): Ruby stuck calling sched_yield on fork
jeremyevans0 (Jeremy Evans)
01:04 AM Revision cd50ff80 (git): * 2020-11-15 [ci skip]
git[bot]
12:59 AM Revision 0433f5ae (git): Functions defined in headers should be static inline
nobu (Nobuyoshi Nakada)

11/14/2020

11:15 PM Feature #17326 (Closed): Add Kernel#must! to the standard library
# Abstract
We should add a method `Kernel#must!` (name TBD) which raises if `self` is `nil` and returns `self` otherwise.
# Background
Ruby 3 introduces type annotations for the standard library.
Type checkers consume these a...
jez (Jake Zimmerman)
10:45 PM Feature #17325: Adds Fiber#cancel, which forces a Fiber to break/return
I also created a github PR at https://github.com/ruby/ruby/pull/3766. nevans (Nicholas Evans)
10:43 PM Feature #17325: Adds Fiber#cancel, which forces a Fiber to break/return
This is my first big foray into the ruby C API, so I hope it makes sense what I was trying to do. Did I handle `vm_fiber_break` and `fiber_start` appropriately? Is there is somewhere more appropriate to save the cancel reason than a new ... nevans (Nicholas Evans)
10:43 PM Feature #17325 (Closed): Adds Fiber#cancel, which forces a Fiber to break/return

Calling `Fiber#cancel` will force a fiber to return, skipping rescue and catch blocks but running all ensure blocks. It behaves as if a `break` or `return` were used to jump from the last suspension point to the top frame of the fiber....
nevans (Nicholas Evans)
09:34 PM Feature #14781: Enumerator.generate
@chrisseaton I do!
Everything that is good for the community is good by me.
zverok (Victor Shepelev)
08:55 PM Feature #14781: Enumerator.generate
@zverok are you making available the code in https://github.com/zverok/enumerator_generate available under the same licence as Ruby? We'd like to just run that proof-of-concept code as-is in TruffleRuby (it still passes all the specs.) chrisseaton (Chris Seaton)
10:22 AM Revision 311a66b7 (git): Update TypeProf to 0.5.0
mame (Yusuke Endoh)
01:41 AM Bug #17318: Raising float to the power of other issue
That depends on your purpose or background of the problem. In non-math situations, `power(a, b)` should not return any ordinary number for given `a`<0 where `power(a, b)` stands for "`a` to the power of `b`" over real, just identical to ... gotoken (Kentaro Goto)

11/13/2020

11:26 PM Feature #17100: Ractor: a proposal for a new concurrent abstraction without thread-safety issues
`send` is a term traditionally used in the actor context. We'd like to experiment how it works well (or bad) for Rubu3.0.
Matz.
matz (Yukihiro Matsumoto)
10:18 AM Feature #17100: Ractor: a proposal for a new concurrent abstraction without thread-safety issues
Thank you for the detailed explanation, that makes sense to me.
I am sure it will result in some confusion, but hopefully it will be rare in practice.
ko1 (Koichi Sasada) wrote in #note-45:
> * Matz agreed that `__send__` is ugly (*2), ...
Eregon (Benoit Daloze)
08:15 AM Feature #17100: Ractor: a proposal for a new concurrent abstraction without thread-safety issues
# `Ractor#send` naming issue
Recent weeks I'm thinking about the name of `Ractor#send`.
Matz and I discussed possibilities long time (this discussions and considerations stop my developments), and we agree to remain the name `Ractor#...
ko1 (Koichi Sasada)
11:17 PM Bug #17318: Raising float to the power of other issue
deXterbed (Manoj Mishra) wrote in #note-3:
>
> ...
Don't raise a negative number to a non-Integer power. That's just maths.
phluid61 (Matthew Kerwin)
05:09 PM Bug #17318: Raising float to the power of other issue
deXterbed (Manoj Mishra) wrote in #note-3:
> ```
> ...
I don't think that this should be the default behavior because `raise(-1, 2)` returns `-1` but I expect the square of `-1` to be `1`.
mame (Yusuke Endoh)
04:59 PM Bug #17318: Raising float to the power of other issue
Also see #16677 w/r edge cases.
-0.4**0.9 #=> -0.4383832905540869
-0.4.to_f**0.9 #=> (-0.416927285116376+0.13546788683122327i)
-(0.4).to_f**0.9 #=> -0.4383832905540869
Dan0042 (Daniel DeLorme)
03:43 PM Bug #17318: Raising float to the power of other issue
mame (Yusuke Endoh) wrote in #note-2:
> It is due to precedence of operators unary minus and `**`.
> ...
Thanks for the explanation Yusuke Endoh,
that still raises the question, how exactly am i supposed to calculate x**y without ending...
deXterbed (Manoj Mishra)
08:38 PM Feature #17315: Hash #transform
to_h works for me even though it is unintuitive a name for monadic mapping a hash. I wish we had a common name function name in Enumerable for monadic mapping that would return the same Class that we map over. dsisnero (Dominic Sisneros)
07:53 PM Feature #17323: Ractor::LVar to provide ractor-local storage
Would it be possible to somehow have ractor-local variables that are automatically dereferenced instead of having to append `.value` everywhere?
I'm thinking of cases like this where a class-level mutable constant (or classvar) makes ...
Dan0042 (Daniel DeLorme)
07:13 PM Feature #17322: Deprecate `Random::DEFAULT` and introduce `Random.default()` method to provide Ractor-supported default random generator
Eregon (Benoit Daloze) wrote in #note-6:
> I think `rand`, etc should use a thread-local `Random` instance (and thread-local implies Ractor-local, of course).
> ...
Bypassing the need for synchronization is a very good idea.
> Is there ...
Dan0042 (Daniel DeLorme)
05:23 PM Feature #16786: Light-weight scheduler for improved concurrency.
Dan0042 (Daniel DeLorme) wrote in #note-71:
> Fiber.schedulers[Thread.current] = sch
It seems weird to me to use a Thread as a key for some state on "Fiber".
I think there is no point to hide the fact this state is per-thread....
Eregon (Benoit Daloze)
05:17 PM Feature #16786: Light-weight scheduler for improved concurrency.
Would this be too crazy?
Fiber.schedulers #=> Hash
Fiber.schedulers.default = sch
Fiber.schedulers[Thread.current] = sch
Dan0042 (Daniel DeLorme)
05:20 PM Bug #17310: Closed ractors should die
Sorry for the side discussion.
I think this is the important point to discuss:
Eregon (Benoit Daloze) wrote in #note-6:
> I think (2) is a better solution.
> ...
I think in some actor models `send` is considered safe and never ra...
Eregon (Benoit Daloze)
05:17 PM Bug #17310: Closed ractors should die
ko1 (Koichi Sasada) wrote in #note-9:
> > It is convenient to Ractor.new { ... }.take, but we could have Ractor#join for that purpose, and that would also work more reliably, independent of intermediate Ractor.yield calls.
> ...
I was ...
Eregon (Benoit Daloze)
05:07 PM Misc #17319: Rename Random.urandom to os_random and document random data sources
zofrex (James Sanderson) wrote in #note-6:
> I think that people reading "raw_seed" are likely to think that either this returns the seed for the RNG or perhaps that this method is only suitable for seeding another RNG, rather than usin...
Eregon (Benoit Daloze)
01:20 PM Misc #17319: Rename Random.urandom to os_random and document random data sources
I don't think `raw_seed` is name that does a good job of communicating what this method does and what it can be used for. I know this method is *used* to seed the OpenSSL random number generator, but its functionality is more broad than ... zofrex (James Sanderson)
03:14 AM Misc #17319: Rename Random.urandom to os_random and document random data sources
How about `Random.raw_seed(size)`? nobu (Nobuyoshi Nakada)
04:46 PM Revision 78262105 (git): Use rb_attr_get() for hidden ivar
rb_ivar_get() can issue an uninitialized ivar warning. We never want to
issue warnings about hidden ivars as they are not actionable for users.
alanwu (Alan Wu)
04:32 PM Feature #17312: New methods in Enumerable and Enumerator::Lazy: flatten, product, compact
What would be the interaction between Array#flatten and Enumerable#flatten ?
It's a big compatibility problem if flatten recursively applies to any Enumerable object within an array.
```ruby
x = Struct.new(:a).new(1) #=> #<struct a...
Dan0042 (Daniel DeLorme)
04:16 PM Feature #17298: Ractor's basket communication APIs
A comment about naming... my first impression was that a "basket" is a container with multiple objects to transmit between Ractors. Something like
```ruby
basket = Ractor::Basket.new
basket.to_move << a
basket.to_copy << b
basket....
Dan0042 (Daniel DeLorme)
03:06 PM Bug #14726 (Closed): wrong message when superclass is not a Class
Applied in changeset commit:git|ce9beb9d20187c861462282460b998684759e5e7.
----------
Improve error message when subclassing non-Class
Fixes [Bug #14726]
jeremyevans (Jeremy Evans)
03:06 PM Revision 1bd98ee2 (git): * 2020-11-14 [ci skip]
git[bot]
03:06 PM Revision ce9beb9d (git): Improve error message when subclassing non-Class
Fixes [Bug #14726] jeremyevans (Jeremy Evans)
12:17 PM Revision 6d059674 (git): Update to ruby/spec@b0b7f53
Eregon (Benoit Daloze)
12:17 PM Revision acbe7aa1 (git): Update to ruby/mspec@f8b0618
Eregon (Benoit Daloze)
05:19 AM Bug #17324: You may have encountered a bug in the Ruby interpreter or extension libraries.
gundamseedw (J Wong) wrote in #note-1:
> gundamseedw (J Wong) wrote:
> ...
jeremyevans0 (Jeremy Evans) wrote in #note-2:
> The crash information includes:
> ...
It's indeed postgres related. Thanks for the clue!
adding the below in data...
gundamseedw (J Wong)
04:19 AM Revision 69c5474e (git): Fixup 957efa95cc12c608705a5663256226f022ea6c7f
hsbt (Hiroshi SHIBATA)
04:01 AM Feature #14922: Resolv getaddresses ignores AAAA records for IPv6
I've submitted my patch as a pull request: https://github.com/ruby/resolv/pull/1 jeremyevans0 (Jeremy Evans)
03:52 AM Feature #11322: OpenUri: RuntimeError: HTTP redirection loop
I've submitted the patch as a pull request, with a test: https://github.com/ruby/open-uri/pull/1 jeremyevans0 (Jeremy Evans)
03:06 AM Revision e70a1d9b (git): Revert https://github.com/ruby/webrick/pull/44
Because the test for this change was still broken. hsbt (Hiroshi SHIBATA)
02:38 AM Revision c046cc1d (git): * 2020-11-13 [ci skip]
git[bot]
02:36 AM Revision 37e5b367 (git): [ruby/webrick] add mime type of extention .mjs
https://github.com/ruby/webrick/commit/45d68f9eba hisanori
02:35 AM Revision 957efa95 (git): [ruby/webrick] Allow empty POST and PUT requests without content length
RFC 7230 section 3.3.3 allows for this.
Fixes #30
https://github.com/ruby/webrick/commit/069e9b1908
jeremyevans (Jeremy Evans)

11/12/2020

09:31 PM Feature #17322: Deprecate `Random::DEFAULT` and introduce `Random.default()` method to provide Ractor-supported default random generator
In JRuby and in TruffleRuby, Random instances are thread-safe (i.e., they use synchronization internally).
Also, `rand`, etc, use a per-Thread Random instance to avoid needless contention when calling `rand` in multiple threads concurren...
Eregon (Benoit Daloze)
02:39 AM Feature #17322: Deprecate `Random::DEFAULT` and introduce `Random.default()` method to provide Ractor-supported default random generator
It sounds rather intuitive to me that `rand` etc. are not sharable among ractors. It is their nature to mutate process-global state of executions.
If a programmer wants randomness inside of a ractor they needs special care to separat...
shyouhei (Shyouhei Urabe)
02:26 AM Feature #17322: Deprecate `Random::DEFAULT` and introduce `Random.default()` method to provide Ractor-supported default random generator
> Maybe Ractor#[] (like Thread#[]) ?
yes, it is one option (but I don't like this, make a new ticket soon about it with reasons).
However, if we choose `Ractor#[]`, `Ractor.current[:DEFAULT_RANDOM]` seems not good idea (not imposs...
ko1 (Koichi Sasada)
02:24 AM Feature #17322: Deprecate `Random::DEFAULT` and introduce `Random.default()` method to provide Ractor-supported default random generator
ko1 (Koichi Sasada) wrote in #note-2:
> > Why not introduce general-purpose per-ractor variables first, instead of magical method that interacts with the crrent ractor behind-the-scene.
> ...
Both :)
But I understand that new syntax nee...
shyouhei (Shyouhei Urabe)
02:15 AM Feature #17322: Deprecate `Random::DEFAULT` and introduce `Random.default()` method to provide Ractor-supported default random generator
> Why not introduce general-purpose per-ractor variables first, instead of magical method that interacts with the crrent ractor behind-the-scene.
Do you mean new syntax or method?
Just now i'm writing the per-ractor storage class (...
ko1 (Koichi Sasada)
01:58 AM Feature #17322: Deprecate `Random::DEFAULT` and introduce `Random.default()` method to provide Ractor-supported default random generator
Why not introduce general-purpose per-ractor variables first, instead of magical method that interacts with the crrent ractor behind-the-scene. shyouhei (Shyouhei Urabe)
01:48 AM Feature #17322 (Closed): Deprecate `Random::DEFAULT` and introduce `Random.default()` method to provide Ractor-supported default random generator
`Random::DEFAULT` a default random generator used by `rand`, `srand`, `Array#shuffle` without a given random generator, and so on.
Random generators are not thread-safe, so they are not ractor safe, and they are not shareable.
So a p...
ko1 (Koichi Sasada)
07:17 PM Bug #17324 (Third Party's Issue): You may have encountered a bug in the Ruby interpreter or extension libraries.
The crash information includes:
```
Crashed Thread: 4 thread_pool.rb* Dispatch queue: com.apple.security.keychain-cache-queue
```
From what I can find, this can be caused by attempting to access the Mac OS X keychain aft...
jeremyevans0 (Jeremy Evans)
07:08 PM Bug #17324: You may have encountered a bug in the Ruby interpreter or extension libraries.
gundamseedw (J Wong) wrote:
> i've attached the crash report log.
> ...
im using macbook pro 2019. mac os catalina 10.15.7
gundamseedw (J Wong)
07:04 PM Bug #17324 (Third Party's Issue): You may have encountered a bug in the Ruby interpreter or extension libraries.
i've attached the crash report log.
im using
Rails 5.2.4.4
Puma 5.0.4
Ruby 2.5.8
gundamseedw (J Wong)
06:44 PM Feature #17323: Ractor::LVar to provide ractor-local storage
marcandre (Marc-Andre Lafortune) wrote in #note-2:
> - deep-copying the cache is probably faster than having to recalculate part of it
> ...
it depends on the problem. per-ractor cache is faster to access because there are no synchroni...
ko1 (Koichi Sasada)
06:24 PM Feature #17323: Ractor::LVar to provide ractor-local storage
I'm curious for better use cases.
The above example is not very convincing:
- there's no much use in sending this object to a Ractor to start with
- deep-copying the cache is probably faster than having to recalculate part of it
- more...
marcandre (Marc-Andre Lafortune)
05:07 PM Feature #17323: Ractor::LVar to provide ractor-local storage
Another advantages compare with current API is,
* we don't need to care about variable name.
* we can make ractor-local constants and instance variables like that:
```ruby
class Fib
attr_reader :cache
def initialize
...
ko1 (Koichi Sasada)
04:55 PM Feature #17323 (Closed): Ractor::LVar to provide ractor-local storage
Ruby supports thread and fiber local storage:
* `Thread#[sym]` provides *Fiber* local storage
* `Thread#thread_variable_get(sym)`
These APIs can access other threads/fibers like that:
```ruby
th = Thread.new{
Thread.current...
ko1 (Koichi Sasada)
02:39 PM Revision 63258664 (git): spec/ruby/core/file/utime_spec.rb: XFS seems to have Year 2038 problem
https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel8/ruby-master/log/20201112T123004Z.fail.html.gz
```
1)
File.utime allows Time instances in the far future to set mtime and
atime (but some filesystems limit it up to 2446-05-10) FAILED
...
mame (Yusuke Endoh)
12:35 PM Revision 028d52bb (git): [ruby/date] Numeric already includes Comparable
https://github.com/ruby/date/commit/f6140df0ad matsuda (Akira Matsuda)
12:35 PM Revision 33574d57 (git): [ruby/date] Updated timezones from timeanddate.com
https://github.com/ruby/date/commit/f08175e34d nobu (Nobuyoshi Nakada)
12:34 PM Revision 81dece54 (git): [ruby/date] Honor timezones from timeanddate.com
https://github.com/ruby/date/commit/d20380fc55 nobu (Nobuyoshi Nakada)
12:34 PM Revision d65f1140 (git): [ruby/date] Fixed the script file name to update zonetab.list
https://github.com/ruby/date/commit/3c002b1daa nobu (Nobuyoshi Nakada)
12:34 PM Revision 0fdcb947 (git): [ruby/date] [DOC] declate DateTime class is deprecated
https://github.com/ruby/date/commit/58ca6e6a3e naruse (Yui NARUSE)
12:05 PM Revision e8f8e63f (git): Backport cosmetic changes from upstream repo that is ruby/rdoc
hsbt (Hiroshi SHIBATA)
12:05 PM Revision ffc8cf12 (git): Fixed typo
hsbt (Hiroshi SHIBATA)
10:27 AM Revision 0d52dce3 (git): strip trailing spaces and adjusted indents [ci skip]
nobu (Nobuyoshi Nakada)
10:16 AM Bug #17320 (Closed): Is 'make realclean' supposed to work?
Of course `configure` must be execute prior trying to run `make something`. Oh my. Sorry for the noise. vo.x (Vit Ondruch)
08:40 AM Misc #17319: Rename Random.urandom to os_random and document random data sources
I hear what you're saying about communicating that it is not coming from `/dev/random`. It's hard to communicate all of that in a method name, because it will be a different source on different OSes or OS versions.
> If we rename the me...
zofrex (James Sanderson)
12:20 AM Misc #17319: Rename Random.urandom to os_random and document random data sources
Also until very recently (until version 5.6), Linux kernel has had distinct /dev/random and /dev/urandom. Some people argued the difference between those two are important. If we rename the method to `os_random`, that loses information... shyouhei (Shyouhei Urabe)
12:06 AM Misc #17319: Rename Random.urandom to os_random and document random data sources
+1 for doc update. Naming wise, ruby is rather POSIX-centric. For instance it has IO.select which works on Windows as well. shyouhei (Shyouhei Urabe)
08:00 AM Revision 98de98fb (git): * 2020-11-12 [ci skip]
git[bot]
07:59 AM Revision a237617a (git): array.rb: Remove unnecessary phrase from rdoc
A fix to 54fb8fb62a30c7b60ab6443a62821f6f8bc479c4 mame (Yusuke Endoh)
07:59 AM Revision a02ba604 (git): array.rb: show examples whether `Array#shuffle!` has side effect or not
Partially revert 54fb8fb62a30c7b60ab6443a62821f6f8bc479c4 mame (Yusuke Endoh)
05:35 AM Feature #17316: On memoization
marcandre (Marc-Andre Lafortune) wrote in #note-5:
> > What about allowing Kernel#instance_variable_set to take a block instead of the second argument, in which case the assignment should be done only when the instance variable is not d...
sawa (Tsuyoshi Sawada)
01:19 AM Bug #17310: Closed ractors should die
Ractor is designed to manage blocking operations by
* receive
* yield and take
and they can be multiplex with `Ractor.select`. I don't want to introduce more.
I think yielder/taker can communicate on the protocol which contains...
ko1 (Koichi Sasada)
01:07 AM Bug #17310: Closed ractors should die
> It is convenient to Ractor.new { ... }.take, but we could have Ractor#join for that purpose, and that would also work more reliably, independent of intermediate Ractor.yield calls.
When do you need `Ractor#join`?
ko1 (Koichi Sasada)

11/11/2020

11:51 PM Feature #16786: Light-weight scheduler for improved concurrency.
I had a call with @ioquatix .
He doesn't like `Thread.current.fiber_scheduler=` (mixing too many things).
He says `Fiber.set_scheduler` or `Thread.current.scheduler=` are the best options in his view.
The method names `Fiber.set_schedul...
Eregon (Benoit Daloze)
10:32 PM Bug #17321 (Closed): Having a singleton class makes cloning imperfect

## Problem
---
Running the following reproduction script:
```ruby
class Foo
def self.foo; end
end
def report(klass, name)
puts " #{name}.instance_methods(false): #{klass.instance_methods(false)}"
end
def clone_and_co...
ufuk (Ufuk Kayserilioglu)
07:27 PM Feature #17267: Remove Win32API at Ruby 3.0
@hsbt Was it extracted to a gem?
BTW:
```
$ gem-codesearch "require.+Win32API" | wc -l
339
$ gem-codesearch -i "require.+win32api" | wc -l
355
```
Eregon (Benoit Daloze)
12:28 AM Feature #17267 (Closed): Remove Win32API at Ruby 3.0
hsbt (Hiroshi SHIBATA)
07:18 PM Bug #17310: Closed ractors should die
Eregon (Benoit Daloze) wrote in #note-7:
> Also, it seems a big issue if exceptions in Ractor are silently ignored.
> ...
Sorry, I should have checked before, that's already the case.
Eregon (Benoit Daloze)
07:14 PM Bug #17310: Closed ractors should die
Also, it seems a big issue if exceptions in Ractor are silently ignored.
If we can't `Ractor.yield` the exception, then I think we should print it much like `Thread.report_on_exception`.
Not having `Ractor#close_outgoing` seems to so...
Eregon (Benoit Daloze)
07:12 PM Bug #17310: Closed ractors should die
I think (2) is a better solution.
A Ractor should always be able to send messages while it's alive.
Another thought: maybe `Ractor.new { 42 }` should not automatically Ractor.yield the result?
Because `Ractor.new {}` does not wait f...
Eregon (Benoit Daloze)
09:11 AM Bug #17310 (Closed): Closed ractors should die
Applied in changeset commit:git|deed21bb08170431891b65fda26f4a3557c9ffd4.
----------
ignore yield_atexit if outgoing port is closed
If outgoing_port is closed, Ractor.yield never successes.
[Bug #17310]
ko1 (Koichi Sasada)
07:29 AM Bug #17310: Closed ractors should die
At least, I merged (1) patch.
`Ractor#kill` is not acceptable to avoid non-deterministic behavior like introduced by `Thread#kill`.
----
I'm not sure we need `Ractor#close_outgoing`.
One possibility is to make a ractor detached (indep...
ko1 (Koichi Sasada)
07:11 PM Feature #17316: On memoization
> What about allowing Kernel#instance_variable_set to take a block instead of the second argument, in which case the assignment should be done only when the instance variable is not defined?
I would like `Kernel#instance_variable_get`...
marcandre (Marc-Andre Lafortune)
06:36 PM Feature #17316: On memoization
marcandre (Marc-Andre Lafortune) wrote in #note-3:
> I just released a small gem to deal with memoization
Looks interesting.
sawa (Tsuyoshi Sawada)
05:55 PM Feature #17316: On memoization
Memoization is tricky, not just for `nil`/`false` values. What about freezing that object? What about calling `Ractor.make_shareable` on it?
I just released a small gem to deal with memoization that:
- works with `nil`/`false` result...
marcandre (Marc-Andre Lafortune)
10:22 AM Feature #17316 (Open): On memoization
I have seen so many attempts to memoize a value in the form:
```ruby
@foo ||= some_heavy_calculation(...)
```
improperly, i.e., even when the value can potentially be falsy. This practice is wide spread, and since in most cases m...
sawa (Tsuyoshi Sawada)
06:54 PM Feature #17307: A way to mark C extensions as thread-safe, Ractor-safe, or unsafe
I talked this over with Eregon yesterday in the context of doing this work in TruffleRuby, and we came to the conclusion that there is a real advantage in being able to selectively mark methods and procedures as thread safe or not. For e... aardvark179 (Duncan MacGregor)
05:40 PM Bug #17320: Is 'make realclean' supposed to work?
Sorry, hit the enter. Prematurealy.
The DeveloperHowto [1] mentions `make realclean` to remove everything pregenerated. Trying that, it does not work:
~~~
$ make realclean
make: *** No rule to make target 'realclean'. Stop.
~~~...
vo.x (Vit Ondruch)
05:35 PM Bug #17320 (Closed): Is 'make realclean' supposed to work?
https://github.com/ruby/ruby/blob/fa3670e6e48a8553ad1f37bbfbd112911da497d1/common.mk#L649 vo.x (Vit Ondruch)
04:04 PM Feature #17315: Hash #transform
I didn't suggest anything, as I don't see a good name, and I don't see the appeal of this method:
- it can not be more efficient than `update` + `to_h`
- there's not a frequent usecase that I know of
- seems like avoidable mutation
-...
marcandre (Marc-Andre Lafortune)
09:54 AM Feature #17315: Hash #transform
marcandre (Marc-Andre Lafortune) wrote in #note-2:
> I'll reopen this, as you are asking for a mutating version of `to_h`.
It might be strange to have `transform!` as the destructive counterpart to `to_h`. Perhaps, the naming should be ...
sawa (Tsuyoshi Sawada)
03:49 PM Misc #17319: Rename Random.urandom to os_random and document random data sources
[PR here](https://github.com/ruby/ruby/pull/3760) zofrex (James Sanderson)
03:47 PM Misc #17319 (Rejected): Rename Random.urandom to os_random and document random data sources
SecureRandom gets randomness from `Random.urandom`, which is a confusing name because `urandom` only uses /dev/urandom in some circumstances. On reading the `secure_random.rb` code this morning I got very confused how it was supporting "... zofrex (James Sanderson)
03:23 PM Bug #17318 (Rejected): Raising float to the power of other issue
It is due to precedence of operators unary minus and `**`.
`x**y` calculates `(-0.4790529833050308)**0.9918032786885246`, and `-0.4790529833050308**0.9918032786885246` calculates `-(0.4790529833050308**0.9918032786885246)`.
```
ir...
mame (Yusuke Endoh)
12:34 PM Bug #17318: Raising float to the power of other issue
Formatting replaced the double * with a single * i put in the snippet above, please ignore deXterbed (Manoj Mishra)
12:31 PM Bug #17318 (Rejected): Raising float to the power of other issue
Raising a negative float to another float results in a complex number. Interestingly, doing the same thing without using variables works fine!
Sample Snippet:
$ irb
2.6.3 :001 > x=-0.4790529833050308
=> -0.4790529833050308
2.6....
deXterbed (Manoj Mishra)
02:19 PM Feature #17314: Provide a way to declare visibility of attributes defined by attr* methods in a single expression
>> The idea behind private attribute methods (which I've seen used in a lot of codebases, and use myself) is uniformity of the call-sequence of different values. I believe Avdi Grimm had a nice article on this point of view (will try to ... zverok (Victor Shepelev)
12:54 PM Feature #17314: Provide a way to declare visibility of attributes defined by attr* methods in a single expression
sawa (Tsuyoshi Sawada) wrote in #note-2:
> Private attribute methods defeat the purpose of attribute methods. If you want to access them within the class, you can directly access the instance variables.
> ...
What kind of resource, cpu? ...
radarek (Radosław Bułat)
07:56 AM Feature #17314: Provide a way to declare visibility of attributes defined by attr* methods in a single expression
> Private attribute methods defeat the purpose of attribute methods. If you want to access them within the class, you can directly access the instance variables.
The idea behind private attribute methods (which I've seen used in a lot...
zverok (Victor Shepelev)
07:12 AM Feature #17314: Provide a way to declare visibility of attributes defined by attr* methods in a single expression
> Private attribute methods defeat the purpose of attribute methods
I should have mentioned it, but it is more useful for `protected` than `private`.
marcandre (Marc-Andre Lafortune)
07:04 AM Feature #17314: Provide a way to declare visibility of attributes defined by attr* methods in a single expression
Private attribute methods defeat the purpose of attribute methods. If you want to access them within the class, you can directly access the instance variables.
>[I]t's convenient to see what kind of attributes [a] class has
For tha...
sawa (Tsuyoshi Sawada)
02:17 PM Bug #17317: In 2.7.2, Hash#except doesn't seem to exist, but is in the documentation
Actually, situation with documentation sites is kind of weird now (to say the least).
* "Official" docs.ruby-lang.org always renders correctly, but other than that is not very usable (because of mixing all the lang and standard librar...
zverok (Victor Shepelev)
02:11 PM Bug #17317: In 2.7.2, Hash#except doesn't seem to exist, but is in the documentation
Thanks, and apologies for raising this in the wrong place! I've emailed the site owner. Anonymous
01:01 PM Bug #17317: In 2.7.2, Hash#except doesn't seem to exist, but is in the documentation
If I recall correctly, we have received some issue reports about ruby-doc.org maybe because the site looks official to many people. The site is undoubtedly valuable to Ruby ecosystem, but the confusion is a bit unfortunate. I wonder if w... mame (Yusuke Endoh)
12:53 PM Bug #17317 (Third Party's Issue): In 2.7.2, Hash#except doesn't seem to exist, but is in the documentation
Thanks for the report, but ruby-doc.org is a third-party project that the ruby-core team is not maintaining. Could you contact on the admin of the site? mame (Yusuke Endoh)
10:54 AM Bug #17317 (Third Party's Issue): In 2.7.2, Hash#except doesn't seem to exist, but is in the documentation
According to https://ruby-doc.org/core-2.7.2/Hash.html#method-i-except, Hash#except is available in 2.7.2, but it doesn't appear to actually be there.
Run the following on the command line:
```
ruby -v -e 'h={a:1,b:2}; puts h, h.exc...
Anonymous
09:11 AM Revision fa3670e6 (git): remove Ractor#close
close_incoming by antoher ractor means there is no other messages
will be sent to the ractor, so Ractor.receive will block forever,
and it should raise and stop.
close_outgoing by antoher ractor means, ... I don't have good idea
to use ...
ko1 (Koichi Sasada)
09:10 AM Revision deed21bb (git): ignore yield_atexit if outgoing port is closed
If outgoing_port is closed, Ractor.yield never successes.
[Bug #17310]
ko1 (Koichi Sasada)
06:49 AM Revision db31ace9 (git): Threads in a ractor will be killed with the ractor
If a terminating ractor has child threads, then kill all child
threads.
ko1 (Koichi Sasada)
06:49 AM Revision 1e8abe5d (git): introduce USE_VM_CLOCK for windows.
The timer function used on windows system set timer interrupt
flag of current main ractor's executing ec and thread can detect
the end of time slice. However, to set all ec->interrupt_flag for
all running ractors, it is requires to synch...
ko1 (Koichi Sasada)
12:52 AM Misc #17309: URI.escape being deprecated, yet there is no replacement
chucke (Tiago Cardoso) wrote in #note-5:
> I wonder why `uri` can't do the same. [punycode IDN domains are a standard](https://tools.ietf.org/html/rfc3492), and although `uri` doesn't support it, it could at least return a URI object wi...
shyouhei (Shyouhei Urabe)
12:29 AM Misc #17309: URI.escape being deprecated, yet there is no replacement
I may not be in position of the full details of the decision, and what is exactly the full of the deprecated URI.escape . I do have seen previous discussions on what is a URI, what's stated in the RFC, and what's the scope of the `uri` l... chucke (Tiago Cardoso)
12:27 AM Revision dd07354f (git): Use Fiddle::Importer directly
hsbt (Hiroshi SHIBATA)
12:27 AM Revision 5081bd96 (git): Removed win32/resolv.rb for 32bit env
hsbt (Hiroshi SHIBATA)
12:27 AM Revision ff67aac1 (git): Removed win32api
hsbt (Hiroshi SHIBATA)
 

Also available in: Atom