Project

General

Profile

Activity

From 10/10/2020 to 10/16/2020

10/16/2020

11:39 PM Feature #17176: GC.auto_compact / GC.auto_compact=(flag)
I've updated the patches on the PR to reflect the new API. Now you can do `GC.auto_compact = true/false` and `GC.auto_compact`. tenderlovemaking (Aaron Patterson)
11:18 PM Revision f6661f50 (git): sync RClass::ext::iv_index_tbl
iv_index_tbl manages instance variable indexes (ID -> index).
This data structure should be synchronized with other ractors
so introduce some VM locks.
This patch also introduced atomic ivar cache used by
set/getinlinecache instructions...
ko1 (Koichi Sasada)
11:18 PM Revision 91ec5f9e (git): remove rb_obj_iv_index_tbl
(1) nobody uses it (gem-codesearch)
(2) the data strucuture will be changed.
ko1 (Koichi Sasada)
06:28 PM Revision ff9dc109 (git): keep proc on the stack so it does not move
tenderlovemaking (Aaron Patterson)
03:28 PM Feature #17171: Why is the visibility of constants not affected by `private`?
At the same time it would be worth reconsidering #16276, which would allow `private{ X = 42 }` right now without a deprecation warning or having to use `private_constant` Dan0042 (Daniel DeLorme)
02:49 PM Feature #17171: Why is the visibility of constants not affected by `private`?
If `private` affects constants, are constants private after `protected`?
```ruby
class Foo
protected
P1 = 1 # private constant or not?
private
protected
P2 = 2 # private constant or not?
end
```
znz (Kazuhiro NISHIYAMA)
05:26 AM Feature #17171: Why is the visibility of constants not affected by `private`?
Deprecating on access (first time only) would be less noisy and sounds easier to implement indeed 👍 marcandre (Marc-Andre Lafortune)
04:19 AM Feature #17171: Why is the visibility of constants not affected by `private`?
marcandre (Marc-Andre Lafortune) wrote in #note-7:
> So can we envision issuing a warning for two release cycles?
> ...
I think if we do this, we should only warn on access (i.e. `Foo::X`), not definition. This would require internal ...
jeremyevans0 (Jeremy Evans)
03:55 AM Feature #17171: Why is the visibility of constants not affected by `private`?
So can we envision issuing a warning for two release cycles?
Is it feasible to issue a warning for constants that are currently public that would be made private this way?
Difficult being that call to `private_constant` happens aft...
marcandre (Marc-Andre Lafortune)
03:22 PM Bug #17264 (Closed): BigDecimal exponentiation cannot be used with #** method
As stated in Bug #17214 (https://bugs.ruby-lang.org/issues/17214) when exponentiating a BigDdecimal number even when using small numbers, a precision argument must be passed to the operation or the operation will return wrong result, 222... karatedog (Földes László)
03:08 PM Revision 26e8db6b (git): * 2020-10-17 [ci skip]
git[bot]
03:07 PM Revision ac803ab5 (git): test/rinda/test_rinda.rb: Add more debugging code
in addition to de5e8d0e3bc3cc39487ffc9d9c15642b6881cd54 mame (Yusuke Endoh)
02:24 PM Revision 0d17cdd0 (git): Abort on system stack overflow during GC
Buggy native extensions could have mark functions that cause stack
overflow. When a stack overflow happens during GC, Ruby used to recover
by raising an exception, which runs the interpreter. It's not safe to
run the interpreter during G...
alanwu (Alan Wu)
10:49 AM Bug #17220 (Third Party's Issue): Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
`getaddrinfo_a` seems to create a thread, and it will be lost by `fork`.
I'm not sure if this is a glibc's spec or bug.
This code demonstrates the behavior without Ruby.
```C
#define _GNU_SOURCE
#include <netdb.h>
#include <std...
nobu (Nobuyoshi Nakada)
07:51 AM Revision de5e8d0e (git): test/rinda/test_rinda.rb: try debugging TestRingServer#test_do_reply
https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel8/ruby-master/log/20201016T063003Z.fail.html.gz
```
1) Error:
Rinda::TestRingServer#test_do_reply:
Timeout::Error: timeout
/home/chkbuild/chkbuild/tmp/build/20201016T063003Z/ruby/...
mame (Yusuke Endoh)
06:19 AM Bug #17263: Fiber context switch degrades with number of fibers, limit on number of fibers
I've been meaning to revisit the x64 implementation to make it more memory friendly.
I played around with it today in my spare time. Here is updated implementation:
```
.globl PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer)
PRE...
ioquatix (Samuel Williams)
01:58 AM Bug #17263: Fiber context switch degrades with number of fibers, limit on number of fibers
On my computer, I found the following.
I changed your script to run with the given number of fibers as an argument.
```
> sudo perf stat -e page-faults,cpu-cycles:u,cpu-cycles:k ./ruby ../test.rb 10000
fibers: 10000 rss: 143252 count: ...
ioquatix (Samuel Williams)
05:39 AM Misc #17200: DevelopersMeeting20201026Japan
* [Feature #17171] Have `private` affect constants and singleton methods definitions too (marcandre)
* Privacy is important for gems in particular. `private_constant` is verbose to use.
* The constants and methods affected would ha...
marcandre (Marc-Andre Lafortune)
02:45 AM Bug #17254: ENV.replace may set nil instead of the proper value
Looking at the `ENV.replace` implementation, the reason it doesn't call `clear` is it isn't thread-safe. `ENV.replace` tries to set all ENV keys in the replacement hash (the argument), then remove keys for ENV that aren't in the replace... jeremyevans0 (Jeremy Evans)
02:10 AM Revision 1cbb1f17 (git): test/ruby/test_syntax.rb: avoid "warning: assigned but unused variable"
mame (Yusuke Endoh)
01:38 AM Bug #17255: Installation failed for ruby version 2.7.1: unknown encoding name: binary (ArgumentError)
Does this error also occur when building Ruby 2.7.2 in your environment? jeremyevans0 (Jeremy Evans)

10/15/2020

11:57 PM Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
Here's a small script that reproduces the problem:
```ruby
require "socket"
Socket.getaddrinfo("localhost", nil)
pid = fork do
Socket.getaddrinfo("localhost", nil)
end
Process.wait pid
```
In Rails' test suite, the `...
eugeneius (Eugene Kenny)
11:37 PM Revision c34539d0 (git): * 2020-10-16 [ci skip]
git[bot]
11:37 PM Bug #16695 (Closed): Stack consistency error when using the return value
Applied in changeset commit:git|ce7a053475cbebfb2f3e5ed6614e0ba631541917.
----------
Adjust sp for `x = false; y = (return until x unless x)` [Bug #16695]
wanabe (_ wanabe)
11:37 PM Revision 65ae7f34 (git): Adjust sp for `if true or ...`/`if false and ...`
wanabe (_ wanabe)
11:37 PM Revision ce7a0534 (git): Adjust sp for `x = false; y = (return until x unless x)` [Bug #16695]
wanabe (_ wanabe)
07:10 PM Feature #16986: Anonymous Struct literal
I think a new syntax for this is way too heavy for such a small thing.
```ruby
s = Struct.new(:a, :b).new(0, 0)
```
is easy enough and already works.
And refactoring that to make it efficient for many instances is just giving it...
Eregon (Benoit Daloze)
05:43 PM Feature #16986: Anonymous Struct literal
From the aspect of "writing-well", `${a: 0, b: 0}` was happy with me (but I understand some (many?) people doesn't like `$`), but `%struct{a: 0, b: 0}` is longer. `Struct(a:0, b:0)` is shorter and clearer...
ko1 (Koichi Sasada)
05:40 PM Feature #16986: Anonymous Struct literal
marcandre (Marc-Andre Lafortune) wrote in #note-55:
> Seems to me that `s = {a: 0, b: 0}` is a good solution here. If you mistype `aa`, you *want* an error, so I don't see the issue.
In this case, yes. So IDE support in future? (clea...
ko1 (Koichi Sasada)
04:40 PM Feature #16986: Anonymous Struct literal
ko1 (Koichi Sasada) wrote in #note-54:
> Of course, sometimes I use `s = {a: 0, b: 0}`, but sometimes I mistype as `s[:aa] += val #=> error because of nil+val`
Seems to me that `s = {a: 0, b: 0}` is a good solution here. If you misty...
marcandre (Marc-Andre Lafortune)
03:27 PM Feature #16986: Anonymous Struct literal
Named tuple example:
On my scripting sometimes I use an array as a tuple like that:
```ruby
s = [0, 0] # s is "statistics" and [A's count, B's count]
# I want to prohibit extension of `s` (s[3] = 0), but there is no way.
dat...
ko1 (Koichi Sasada)
11:25 AM Bug #17263: Fiber context switch degrades with number of fibers, limit on number of fibers
I can confirm I can reproduce your problem. As an experiment, I did:
```
first.transfer
count = 0
```
as warmup to see if it was some kind of lazy allocation issue, but it didn't seem to help. I'll have to take a look at the i...
ioquatix (Samuel Williams)
11:13 AM Bug #17263: Fiber context switch degrades with number of fibers, limit on number of fibers
Regarding "can't set a guard page" it's because of your system is limiting the number of memory mapped segments. Each fiber stack requires a guard page and this is considered a separate memory map entry.
Try increasing it:
```
sysctl -...
ioquatix (Samuel Williams)
10:04 AM Bug #17263 (Closed): Fiber context switch degrades with number of fibers, limit on number of fibers
I'm working on developing [Polyphony](https://github.com/digital-fabric/polyphony), a Ruby gem for writing
highly-concurrent Ruby programs with fibers. In the course of my work I have
come up against two problems using Ruby fibers:
...
ciconia (Sharon Rosner)
08:19 AM Revision b68c22b3 (git): Partly reverted test failing with https://github.com/rubygems/rubygems/pull/3921
hsbt (Hiroshi SHIBATA)
08:19 AM Revision d386a58f (git): Merge bundler-2.2.0.rc.2
hsbt (Hiroshi SHIBATA)
08:13 AM Bug #17262 (Closed): Backport encoding fixes
Please backport following fixes for Encoding.
* commit:5f7be6243a5b support multi-run for test/ruby/test_encoding.rb
* commit:921916ff9e29 Isolate the test for Encoding#replicate
* commit:52cdf400efae Workaround of instance variable...
nobu (Nobuyoshi Nakada)
07:48 AM Revision 7ffd14a1 (git): Check encoding name to replicate
https://hackerone.com/reports/954433 nobu (Nobuyoshi Nakada)
05:12 AM Revision ab6c4f8b (git): Merge rubygems-3.2.0.rc.2
hsbt (Hiroshi SHIBATA)

10/14/2020

11:44 PM Revision f0c7a05b (git): * 2020-10-15 [ci skip]
git[bot]
11:43 PM Revision 8a06af5f (git): Mostly recover a Ruby stack trace from a core file
Update the lldb script so it can mostly recover a Ruby stack trace from
a core file. It's still missing line numbers and dealing with CFUNCs,
but you use it like this:
```
(lldb) rbbt ec
rb_control_frame_t TYPE
0x7f6fd6555fa0 EVAL ...
tenderlovemaking (Aaron Patterson)
02:15 PM Revision 2e8b5968 (git): remove uneffective test
RubyVM.stat[:global_method_state] is no longer available so
this test doesn't check any more.
ko1 (Koichi Sasada)
02:15 PM Revision 278450de (git): ruby_vm_global_method_state is no longer needed.
Now ruby_vm_global_method_state is not used so let's remove it. ko1 (Koichi Sasada)
09:31 AM Misc #17200: DevelopersMeeting20201026Japan
* [Feature #17259] Kernel#warn should ignore <internal: entries (eregon)
* Currently, `warn('message', uplevel: n)` can show `<internal:kernel>:90: warning: message` instead of `calling_file.rb:42: warning: message`.
* https://gith...
Eregon (Benoit Daloze)
07:36 AM Revision fad97f1f (git): sync generic_ivtbl
generic_ivtbl is a process global table to maintain instance variables
for non T_OBJECT/T_CLASS/... objects. So we need to protect them
for multi-Ractor exection.
Hint: we can make them Ractor local for unshareable objects, but
no...
ko1 (Koichi Sasada)
07:36 AM Revision ae693fff (git): fix releasing timing.
(1) recorded_lock_rec > current_lock_rec should not be occurred
on rb_ec_vm_lock_rec_release().
(2) should be release VM lock at EXEC_TAG(), not POP_TAG().
(3) some refactoring.
ko1 (Koichi Sasada)
06:16 AM Revision 0714cb76 (git): Remove duplicated line [ci skip]
ref bf3b2a43741e4f72be21bc6acf24d37e7fcff61c znz (Kazuhiro NISHIYAMA)
05:42 AM Revision 9aab9169 (git): Promote pathname to default gems
hsbt (Hiroshi SHIBATA)
05:42 AM Revision 1e316edf (git): Promote drb to the default gems
hsbt (Hiroshi SHIBATA)
05:02 AM Bug #17188 (Closed): Freeze Encoding objects for Ractor
Applied in changeset commit:git|102c2ba65f1fa2a6cdbaaa7d2b466aabfc50e5d7.
----------
freeze Encoding objects
Encoding objects can be accessed in multi-ractors and there is no
state to mutate. So we can mark it as frozen and shareable.
...
ko1 (Koichi Sasada)
05:02 AM Revision 102c2ba6 (git): freeze Encoding objects
Encoding objects can be accessed in multi-ractors and there is no
state to mutate. So we can mark it as frozen and shareable.
[Bug #17188]
ko1 (Koichi Sasada)
05:02 AM Revision 11c2f0f3 (git): sync enc_table and rb_encoding_list
enc_table which manages Encoding information. rb_encoding_list
also manages Encoding objects. Both are accessed/modified by ractors
simultaneously so that they should be synchronized.
For enc_table, this patch introduced GLOBAL_ENC_TABL...
ko1 (Koichi Sasada)
05:02 AM Revision c3ba3fa8 (git): support exception when lock_rec > 0
If a ractor getting a VM lock (monitor) raises an exception,
unlock can be skipped. To release VM lock correctly on exception
(or other jumps with JUMP_TAG), EC_POP_TAG() releases VM lock.
ko1 (Koichi Sasada)

10/13/2020

08:27 PM Bug #17215: Backport for arm64 optimizations that exist for power/x86
Thank you for the explanation. I remember the backporting rule now. I am sorry for disturbing you.
jaruga (Jun Aruga)
05:40 PM Bug #17215: Backport for arm64 optimizations that exist for power/x86
jaruga (Jun Aruga) wrote in #note-6:
> I am asking the backport to Ruby project's 2.7 branch.
> ...
Backport issues are closed after the appropriate backport marker has been set, similarly to how regular bug fixes are closed after the ...
jeremyevans0 (Jeremy Evans)
05:31 PM Bug #17215: Backport for arm64 optimizations that exist for power/x86
I am asking the backport to Ruby project's 2.7 branch.
If you use the patch on Fedora, why does it connect for you to close this ticket's status?
jaruga (Jun Aruga)
04:11 PM Bug #17215 (Closed): Backport for arm64 optimizations that exist for power/x86
I am going to use this patch on Fedora, if it helps:
https://src.fedoraproject.org/rpms/ruby/blob/master/f/ruby-3.0.0-preview1-Enable-arm64-optimizations-that-exist-for-power-x86.patch
vo.x (Vit Ondruch)
06:21 PM Feature #17259: Kernel#warn should ignore <internal: entries
PR: https://github.com/ruby/ruby/pull/3647 Eregon (Benoit Daloze)
06:19 PM Feature #17261: Software transactional memory (STM) for Threads and Ractors
Interesting :)
Having it on `Thread` sounds nice to me.
I wonder how limiting it is to restrict to only shareable values for TVar.
Is there actually any type usable for TVar except Integer?
A frozen String could only be swapped w...
Eregon (Benoit Daloze)
06:18 PM Revision d7de342e (git): * 2020-10-14 [ci skip]
git[bot]
05:36 PM Revision fc8b68a5 (git): remove useless semicolons
ko1 (Koichi Sasada)
04:44 PM Feature #17260: Promote pattern matching to official feature
marcandre (Marc-Andre Lafortune) wrote in #note-8:
> We can document that this constraint is projected in the future.
+1
palkan (Vladimir Dementyev)
04:19 PM Feature #17260: Promote pattern matching to official feature
palkan (Vladimir Dementyev) wrote in #note-7:
> I have a little concern regarding the potential changes to the current specification that we might need to introduce to improve the performance.
> ...
I'm glad to read this, I asked for [...
marcandre (Marc-Andre Lafortune)
01:13 PM Feature #17260: Promote pattern matching to official feature
ktsj (Kazuki Tsujimoto) wrote:
> I propose to promote pattern matching to official feature.
> ...
I have a little concern regarding the potential changes to the current specification that we might need to introduce to improve the perfo...
palkan (Vladimir Dementyev)
05:16 AM Revision a75ab110 (git): Use %VCVARS%
nobu (Nobuyoshi Nakada)
04:41 AM Revision 10e09cca (git): * 2020-10-13 [ci skip]
git[bot]
04:40 AM Revision 76e09815 (git): test/ruby/test_fiber.rb: Suppress "assigned but unused variable" warnings
mame (Yusuke Endoh)

10/12/2020

09:55 PM Feature #17260: Promote pattern matching to official feature
matz (Yukihiro Matsumoto) wrote in #note-1:
> I have a secret plan to make right hand assignment a replacement for single line pattern match.
I find myself liking this idea a lot.
In #13683 nobu suggested pattern matching as a rep...
Dan0042 (Daniel DeLorme)
12:16 PM Feature #17260: Promote pattern matching to official feature
That's true. Hmm.
Matz.
matz (Yukihiro Matsumoto)
07:45 AM Feature #17260: Promote pattern matching to official feature
It disallows assignments to other than local variables.
https://github.com/nobu/ruby/runs/1240626799#step:15:315
```
SyntaxError: (eval):1: syntax error, unexpected instance variable
def self.inc(x) = x + 1 => @x
...
nobu (Nobuyoshi Nakada)
07:17 AM Feature #17260: Promote pattern matching to official feature
Seems like so.
Matz.
matz (Yukihiro Matsumoto)
06:30 AM Feature #17260: Promote pattern matching to official feature
matz (Yukihiro Matsumoto) wrote in #note-1:
> I have a secret plan to make right hand assignment a replacement for single line pattern match. But it's another story.
Maybe, is this the kind of thing?
https://github.com/nobu/ruby/p...
nobu (Nobuyoshi Nakada)
01:00 AM Feature #17260: Promote pattern matching to official feature
Agreed.
I have a secret plan to make right hand assignment a replacement for single line pattern match. But it's another story.
Matz.
matz (Yukihiro Matsumoto)
04:16 PM Bug #17221: Relax the Fiber#transfer's limitation
It seems like both "a" and "the" work here. I might say, "cannot transfer to a yielding Fiber" or "attempted transfer to a yielding Fiber." shan (Shannon Skipper)
01:58 PM Bug #17221 (Closed): Relax the Fiber#transfer's limitation
Applied in changeset commit:git|bf3b2a43741e4f72be21bc6acf24d37e7fcff61c.
----------
relax Fiber#transfer's restriction
Using Fiber#transfer with Fiber#resume for a same Fiber is
limited (once Fiber#transfer is called for a fiber, the ...
ko1 (Koichi Sasada)
09:31 AM Bug #17221: Relax the Fiber#transfer's limitation
BTW I already got Matz's approval so I'll merge it as soon as possible.
ko1 (Koichi Sasada)
12:20 AM Bug #17221: Relax the Fiber#transfer's limitation
Next English question :)
"attempt to transfer to a yielding fiber" or "attempt to transfer to the yielding fiber" (a/the) on error message (error message when calling `fib.transfer` and `fib` is yielding).
ko1 (Koichi Sasada)
12:16 AM Bug #17221: Relax the Fiber#transfer's limitation
Thanks!
ko1 (Koichi Sasada)
02:36 PM Revision 0b1b0f13 (git): spec/ruby/library/socket/socket/listen_spec.rb: Allow both EACCES and EOPNOSUPP
on Android mame (Yusuke Endoh)
01:58 PM Revision bf3b2a43 (git): relax Fiber#transfer's restriction
Using Fiber#transfer with Fiber#resume for a same Fiber is
limited (once Fiber#transfer is called for a fiber, the fiber
can not be resumed more). This restriction was introduced to
protect the resume/yield chain, but we realized that it...
ko1 (Koichi Sasada)
12:26 PM Revision 2fd71112 (git): Make the test suite pass on real Android/Termux environment
Attempting to create a hard link raises EACCES mame (Yusuke Endoh)
12:04 PM Feature #17261: Software transactional memory (STM) for Threads and Ractors
See http://ruby-concurrency.github.io/concurrent-ruby/1.1.4/Concurrent/TVar.html
>A TVar is a transactional variable
hsbt (Hiroshi SHIBATA)
09:29 AM Feature #17261: Software transactional memory (STM) for Threads and Ractors
What does TVar mean? ioquatix (Samuel Williams)
08:24 AM Feature #17261 (Rejected): Software transactional memory (STM) for Threads and Ractors
## Abstract
I propose Software transactional memory (STM) for threads and ractors.
Implementation is here: https://github.com/ruby/ruby/pull/3652
The interface is similar to concurrent-ruby, but not the same.
http://ruby-concur...
ko1 (Koichi Sasada)
06:16 AM Revision 6527411f (git): [ci skip] Minor documentation fix.
Add missing period. Cristian Greco
05:20 AM Revision e8d03c9a (git): change rb_ractor_queue to ring buffer
tompng (tomoya ishida)
04:56 AM Revision c6652f22 (git): ractor.rb - indent comment code [ci skip]
MSP-Greg (Greg L)
04:45 AM Revision eb21e8ad (git): bignum.c (bary_sparse_p): do not comsume Random::DEFAULT
It uses random to determine if the bignum is sparse or not.
It is arguable if three-digit samples are enough or not to determine it,
but anyway, consuming Random source implicitly is not good.
I introduced the random sampling mechanism,...
mame (Yusuke Endoh)
04:44 AM Bug #17257 (Closed): Integer#pow(0, 1) returns 1, which is incorrect
Applied in changeset commit:git|8a39e6d6539bd37100cbbfb88916b853f444f771.
----------
bignum.c (rb_int_powm): Integer#pow(0, 1) should return 0
... instead of 1 because it requires "modulo 1". [Bug #17257]
mame (Yusuke Endoh)
04:35 AM Bug #17257: Integer#pow(0, 1) returns 1, which is incorrect
I agree that it is a bug. The pseudocode of modular exponentiation in Wikipedia includes `if modulus = 1 then return 0` as the first check.
https://en.wikipedia.org/wiki/Modular_exponentiation#Pseudocode
I agree that there are few...
mame (Yusuke Endoh)
04:42 AM Revision 8a39e6d6 (git): bignum.c (rb_int_powm): Integer#pow(0, 1) should return 0
... instead of 1 because it requires "modulo 1". [Bug #17257] mame (Yusuke Endoh)
04:08 AM Revision 13366982 (git): Respectively, instead of respentively
Victor Goff

10/11/2020

06:46 PM Bug #17257: Integer#pow(0, 1) returns 1, which is incorrect
sawa (Tsuyoshi Sawada) wrote in #note-10:
> I cannot follow the discussion because of the expression "multiplying `x % m` to 1 `y` times." What does that mean?
"multiplying `x % m` to 1 `y` times"の意味は、「1に対して`(x % m)`を`y`回乗じること(又は、その値)」で...
universato (Yoshimine Sato)
01:18 PM Bug #17257: Integer#pow(0, 1) returns 1, which is incorrect
The point of undefinition is:
There is nothing definitely right or wrong.
Neither 0 nor 1 is wrong; it is just a different point of view.
You are thinking that 0 ** 0 == 1 is useful because you are looking from the perspective of x ...
midnight (Sarun R)
12:09 PM Bug #17257: Integer#pow(0, 1) returns 1, which is incorrect
I cannot follow the discussion because of the expression "multiplying `x % m` to 1 `y` times." What does that mean? sawa (Tsuyoshi Sawada)
05:54 AM Bug #17257: Integer#pow(0, 1) returns 1, which is incorrect
`x.pow(y, m)` doesn't equal multiplying `x % m` to 1 `y` times.
```ruby
p 3.pow(2, 4) #=> 1
p 1 * (3 % 4) * (3 % 4) #=> 9
```
It is the last to mod.
The result should be less than modulo.
Method `pow` should be simply defined as `(x**...
universato (Yoshimine Sato)
03:41 AM Bug #17257: Integer#pow(0, 1) returns 1, which is incorrect
Wait a minute, I just changed my mind.
Actually since `0.pow(0)` is mathematically undefined.
See WolframAlpha for references:
https://www.wolframalpha.com/input/?i=0%5E0
`0.pow(0, 1)` should be undefined too, so do `1.pow(0, 1)...
midnight (Sarun R)
03:32 AM Bug #17257: Integer#pow(0, 1) returns 1, which is incorrect
So the proposal is to change the document from
"Returns (modular) exponentiation"
to
"multiplying x % m to 1 y times"?
IMHO `% m` is the space, `** y` is the operation performed inside the space, so the result should be within the ...
midnight (Sarun R)
02:48 AM Bug #17257: Integer#pow(0, 1) returns 1, which is incorrect
I agree that the behavior and documentation **may** be inconsistent, and think one option is to fix the latter. nobu (Nobuyoshi Nakada)
04:53 PM Revision 20d78fdd (git): * 2020-10-12 [ci skip]
git[bot]
03:40 PM Revision 4ed0c33d (git): Prohibit setter method names in all kinds of endless methods
Also unwrap NODE_RIPPER to check the method name. nobu (Nobuyoshi Nakada)
12:06 PM Misc #17200: DevelopersMeeting20201026Japan
* [Feature #17260] Promote pattern matching to official feature
* I'd like to remove single line pattern matching and experimental warnings.
ktsj (Kazuki Tsujimoto)
12:03 PM Feature #17260 (Closed): Promote pattern matching to official feature
I propose to promote pattern matching to official feature.
The current specification is basically fine, but I'd like to reconsider single line pattern matching (`expr in pat`) and suggest removing it once in 3.0.
ktsj (Kazuki Tsujimoto)
10:23 AM Feature #17259: Kernel#warn should ignore <internal: entries
nobu (Nobuyoshi Nakada) wrote in #note-3:
> Essentially `uplevel:` option is useless in some cases.
> ...
Yes, some libraries might want to emit warnings and ignore their own `my_gem/lib/`.
That however would need to make `warn` somehow ...
Eregon (Benoit Daloze)
02:43 AM Feature #17259: Kernel#warn should ignore <internal: entries
Essentially `uplevel:` option is useless in some cases.
For instance, it cannot work to skip frames in the same file or directory.
nobu (Nobuyoshi Nakada)
06:42 AM Bug #17211: Test failures in ruby2.7.2 and ruby3.0~preview1
ruby_2_7 d1ba5545513b68d39ca29b578a42bd8d48a7804e merged revision(s) 9718ff62c12c07ecf7f0e234343dca76ee1aa51d,20ad1017017ea736667d86fa0250dc1a39daefa1. nagachika (Tomoyuki Chikanaga)
06:41 AM Revision d1ba5545 (git): merge revision(s) 9718ff62c12c07ecf7f0e234343dca76ee1aa51d,20ad1017017ea736667d86fa0250dc1a39daefa1: [Backport #17211]
Show stdout and stderr when history tests fail
Remove system method for E2E testing because depends on ruby command
nagachika (Tomoyuki Chikanaga)
06:37 AM Bug #17201: Backport webrick patch for CVE-2020-25613
I'm afraid that I did backport the changeset d23d2f3f6fbb5d787b0dd80675c489a692be23e2 solely at 828c34e58b63d64558ec0f2d1d7ae401c5e6b21f.
I applied the remaining part of the patch into ruby_2_7 at 48ac73769772317d6c3f864f087ef930a47120d9.
nagachika (Tomoyuki Chikanaga)
06:33 AM Revision 48ac7376 (git): Bump up webrick version to 1.6.1. [Bug #17201]
nagachika (Tomoyuki Chikanaga)
06:29 AM Revision 0126c7df (git): bump teeny version to 2.7.3.
nagachika (Tomoyuki Chikanaga)
05:22 AM Revision 27b48089 (git): Adjusted indents [ci skip]
nobu (Nobuyoshi Nakada)
03:13 AM Bug #17221: Relax the Fiber#transfer's limitation
Eregon (Benoit Daloze) wrote in #note-11:
> I believe it's `a yielding Fiber` (the first sound in yield-ing is not a vowel sound)
A Yes indeed for this question. (not an yes :-)
duerst (Martin Dürst)
02:57 AM Revision fddffa4c (git): Respect the original styles [ci skip]
nobu (Nobuyoshi Nakada)

10/10/2020

07:28 PM Bug #17257: Integer#pow(0, 1) returns 1, which is incorrect
It's a bug.
Additional tests look good.
marcandre (Marc-Andre Lafortune)
06:12 PM Bug #17257: Integer#pow(0, 1) returns 1, which is incorrect
This is undefined
`0.pow(0, 1)`
https://www.wolframalpha.com/input/?i=0%5E0
This is clearly out of the space (thus a bug)
`1.pow(0, 1)`
https://www.wolframalpha.com/input/?i=%281%5E0%29+mod+1
It is practically pointless to mod ...
midnight (Sarun R)
09:18 AM Bug #17257: Integer#pow(0, 1) returns 1, which is incorrect
According to RDoC, `x.pow(y, m)` equals `(x**y) % m`.
In fact, `x.pow(y, m)` returns same value as `(x**y) % m` except for `x.pow(0, 1)`.
```ruby
p (12**0) % 1 #=> 0
p 12.pow(0, 1) #=> 1
```
universato (Yoshimine Sato)
06:54 AM Bug #17257 (Assigned): Integer#pow(0, 1) returns 1, which is incorrect
I'm not sure if it should be 0.
As `x.pow(y, m)` equals multiplying `x % m` to 1 `y` times, isn't 1 ok when `y == 0`?
nobu (Nobuyoshi Nakada)
06:24 PM Feature #17259: Kernel#warn should ignore <internal: entries
I agree with removing the Rubygems override of `Kernel#warn` (the only Kernel method Rubygems should override is `require`). Skipping `<internal:` entries for `uplevel` makes sense to me. jeremyevans0 (Jeremy Evans)
01:29 PM Feature #17259 (Closed): Kernel#warn should ignore <internal: entries
`Kernel#warn` currently does not skip `<internal:` entries from core library methods defined in Ruby.
This can cause rather unhelpful locations to be used for warnings.
For instance:
```
$ ruby -v --disable=gems -e 'def deprecated;...
Eregon (Benoit Daloze)
05:00 PM Revision 71428ac2 (git): [ruby/io-console] Refined getch warnings
https://github.com/ruby/io-console/commit/f84e6abcce nobu (Nobuyoshi Nakada)
05:00 PM Revision 37259e87 (git): [ruby/io-console] Relaxed min: option warning
When `min: 0` is given to `IO#getch` with `time:` option, it is
expected to return nil if timed out, and needed for source code
the compatibility with unixen platforms.
https://github.com/ruby/io-console/commit/a2afbe72bd
nobu (Nobuyoshi Nakada)
05:00 PM Revision a7996674 (git): [ruby/io-console] Fix timeout type error (#18)
Fixed TypeError when IO#getch timed out
`rb_io_wait` returns a bit-flags Integer representing available
events, or Qfalse if timed out. Also the result of `NUM2INT` is
not a `VALUE`.
```
$ ./bin/ruby -v -rio/console -e "p IO.console.g...
nobu (Nobuyoshi Nakada)
04:28 PM Revision e10d4dce (git): * 2020-10-11 [ci skip]
git[bot]
04:27 PM Revision b59640e1 (git): [ruby/io-console] Fixed "Rework console to use `rb_io_wait`."
* Fixed backward compatibility.
* Added missing `rb_scheduler_timeout` declaration.
https://github.com/ruby/io-console/commit/813806079f
nobu (Nobuyoshi Nakada)
10:48 AM Revision bfc1c720 (git): Add Ractor#receive and Ractor.receive and use it in all places
* Keep Ractor#recv/Ractor.recv as an alias for now. Eregon (Benoit Daloze)
10:14 AM Revision 9eccf071 (git): Update RBS to 0.13.1 (#3645)
soutaro (Soutaro Matsumoto)
08:52 AM Revision 5e120a23 (git): Improve doc in rb_class_real doc (#3637)
S_H_ (Shun Hiraoka)
06:32 AM Revision df250070 (git): Fixed typo in comment
alway -> always Ikko Ashimine
 

Also available in: Atom