Project

General

Profile

Activity

From 04/30/2021 to 05/06/2021

05/06/2021

09:11 PM Feature #17831 (Third Party's Issue): add slice method to Fiddle::MemoryView
Could you file this to https://github.com/ruby/fiddle/ ? kou (Kouhei Sutou)
09:10 PM Feature #17832 (Third Party's Issue): allow IO write to write memoryview object without copying or add IO#write_memoryview
We can implement this by adding `Fiddle::MemoryView#to_s` with `rb_str_new_static()`.
Could you file this to https://github.com/ruby/fiddle/ ?
kou (Kouhei Sutou)
07:00 PM Feature #17844: Support list of methods to test with respond_to?
@byroot You're right of course, I'm so tuned in to keyword arguments. :-) Can be done in Ruby as `def respond_to?(*args)`, but you'd have to check the last args member for type. It might be more ore less ugly in C, I honestly know zilch ... svoop (Sven Schwyn)
12:23 PM Feature #17844: Support list of methods to test with respond_to?
I think `raise ArgumentError unless recipient.respond_to?(:email) && recipient.respond_to?(:name)` is good enough.
It's also likely to be significantly faster than `recipient.respond_to_all?(:email, :name)` since that has variable argume...
Eregon (Benoit Daloze)
12:17 PM Feature #17844: Support list of methods to test with respond_to?
@svoop, you seem to have missed that `include_all` is a positional parameter, not a named one. byroot (Jean Boussier)
08:18 AM Feature #17844: Support list of methods to test with respond_to?
@byroot You're right, breaking backward compatibility of the signature is out of the question. Not sure for C, but in plain Ruby, it's not a problem:
```ruby
def just_checkin(*methods, include_all: false)
puts methods.inspect, inc...
svoop (Sven Schwyn)
08:05 AM Feature #17844: Support list of methods to test with respond_to?
Currently the method signature is `respond_to?(symbol, include_all=false)`, so changing it to what you suggest might break backward compatibility. e.g.:
```ruby
>> Object.new.respond_to?(:puts, :bar)
=> true
```
Of course the ab...
byroot (Jean Boussier)
07:22 AM Feature #17844: Support list of methods to test with respond_to?
Fair point, but I don't think `respond_to_any?` is a real use case given `respond_to?` is mostly used to check whether an object implements the necessary interface: The information "it implements method1 OR method2" has little practical ... svoop (Sven Schwyn)
04:54 PM Revision 578e6416 (git): lldb: convert heap_page_obj_limit from a float to int
peterzhu2118 (Peter Zhu)
03:59 PM Bug #17854 (Assigned): Crash with certain "case" expressions on FreeBSD
Thank you for the detailed report.
I confirm the issue on Ubuntu by adding logging code before `UNREACHABLE_RETURN(-1)`.
```diff
diff --git a/compile.c b/compile.c
index 1cabb8cccd..826d9c6f4a 100644
--- a/compile.c
+++ b/compi...
mame (Yusuke Endoh)
12:30 PM Bug #17854 (Closed): Crash with certain "case" expressions on FreeBSD
## Affected version
* Ruby 2.6, 2.7, 3.0 compiled with **clang on FressBD**
No tested with other versions. Ruby compiled with GCC doesn't have this issue.
## Snippet to reproduce
```
ruby -e 'case 1; when 2r; 3; end'
```
## ...
meta@vmeta.jp (Koichiro Iwao)
03:37 PM Bug #17846: Percent mode changes the output from ERB beyond what is documented
k0kubun (Takashi Kokubun) wrote in #note-6:
> Maybe not. Now I did https://github.com/ruby/erb/commit/b58b188028fbb403f75d48d62717373fc0908f7a.
Thank you :)
graywolf (Gray Wolf)
06:14 AM Bug #17846: Percent mode changes the output from ERB beyond what is documented
Maybe not. Now I did https://github.com/ruby/erb/commit/b58b188028fbb403f75d48d62717373fc0908f7a. k0kubun (Takashi Kokubun)
03:20 PM Feature #17837: Add support for Regexp timeouts
I noticed there is a reply in [ruby-core:103730] by @normalperson that unfortunately doesn't seem to be mirrored on Redmine:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/103730
Eregon (Benoit Daloze)
01:30 PM Feature #17837: Add support for Regexp timeouts
duerst (Martin Dürst) wrote in #note-14:
> In a backtracking regular expression engine, backtracking occurs very often. There are many cases of backtracking that are still totally harmless.
Even if backtracking occurs very often, my thi...
Dan0042 (Daniel DeLorme)
03:13 PM Revision 550b02e4 (git): * 2021-05-07 [ci skip]
git[bot]
03:04 PM Revision 0bbab1e5 (git): Protoized old pre-ANSI K&R style declarations and definitions
nobu (Nobuyoshi Nakada)
02:53 PM Revision 99644514 (git): Conditionally used functions
nobu (Nobuyoshi Nakada)
01:18 PM Revision b0b7751f (git): lldb: teach rp about T_PAYLOAD
eightbitraptor (Matt V-H)
01:18 PM Revision d1bd4e23 (git): Store rb_classext_t next to RClass slots on the heap
eightbitraptor (Matt V-H)
01:18 PM Revision 8bbd3198 (git): Allow newobj_of0 and newobj_slowpath to allocate into multiple heap slots
eightbitraptor (Matt V-H)
01:04 PM Revision ddc29e29 (git): net-http no longer requires stringio
nobu (Nobuyoshi Nakada)
10:02 AM Revision f2d6fa16 (git): Use assert_ractor for separating test processes
hsbt (Hiroshi SHIBATA)
08:19 AM Feature #17853 (Closed): Add Thread#thread_id
# Abstract
New method `Thread#thread_id` to get associated native thread id (LWP.) It might return `nil` if OS doesn't support thread id or equivalent.
# Background
When I tried to investigate which Ruby thread of an application...
komamitsu (Mitsunori Komatsu)
07:51 AM Revision 120b835f (git): [ruby/timeout] Only run timeout_after hook on fiber scheduler if scheduler exists
https://github.com/ruby/timeout/commit/4893cde0ed jeremyevans (Jeremy Evans)
07:50 AM Revision 44e8575c (git): [ruby/timeout] Avoid unnecessary object allocation
Idea from nobu.
https://github.com/ruby/timeout/commit/aecdaa23b3
jeremyevans (Jeremy Evans)
07:49 AM Revision 33b5e179 (git): [ruby/timeout] Make Timeout::Error#exception with multiple arguments not ignore arguments
This makes:
raise(Timeout::Error.new("hello"), "world")
raise a TimeoutError instance with "world" as the message instead
of "hello", for consistency with other Ruby exception classes.
This required some internal changes to keep the...
jeremyevans (Jeremy Evans)
07:45 AM Bug #17756 (Closed): StringScanner#charpos makes segmentation fault when target.byteslice returns non string value
Applied in changeset commit:git|564ccd095a9d7fbe869031dbf666d61dadfdcb03.
----------
[ruby/strscan] Fix segmentation fault of `StringScanner#charpos` when `String#byteslice` returns non string value [Bug #17756] (#20)
https://github.co...
kachick (Kenichi Kamiya)
07:21 AM Revision a42b7de4 (git): [ruby/strscan] Replace "iff" with "if and only if" (#18)
iff means if and only if, but readers without that knowledge might
assume this to be a spelling mistake. To me, this seems like
exclusionary language that is unnecessary. Simply using "if and only if"
instead should suffice.
https://git...
gmcgibbon (Gannon McGibbon)
07:20 AM Revision 564ccd09 (git): [ruby/strscan] Fix segmentation fault of `StringScanner#charpos` when `String#byteslice` returns non string value [Bug #17756] (#20)
https://github.com/ruby/strscan/commit/92961cde2b kachick (Kenichi Kamiya)
07:18 AM Revision 822eb945 (git): Import from https://github.com/ruby/strscan/pull/19
* Use Gemfile instead of Gem::Specification#add_development_dependency.
* Use pend instead of skip for test-unit.
hsbt (Hiroshi SHIBATA)
06:58 AM Revision 364044e0 (git): [ruby/net-http] Do not require stringio
It is not used in net/http library code since commit 15ccd0118c13
(r36473 in ruby svn trunk, 2012).
require's in test suite are also cleaned up.
https://github.com/ruby/net-http/commit/996d18a43f
rhenium (Kazuki Yamaguchi)
06:24 AM Revision 965719f5 (git): Fixed the file path for net-imap.gemspec
hsbt (Hiroshi SHIBATA)
06:20 AM Revision 5de6f1ab (git): Move net-imap.gemspec to under the lib/net/imap directory.
hsbt (Hiroshi SHIBATA)
06:20 AM Revision 5a02281f (git): [ruby/net-imap] Many documentation improvements
* updated obsoleted RFCs to current versions
* linked most references to their RFCs
* linked extension commands to their RFCs
* removed unidiomatic `()` from instance method links
* escaped `IMAP` in a few places
* converted all response...
nevans (Nicholas Evans)
06:20 AM Revision b0de2e7f (git): [ruby/net-imap] Move send_*_data into net/imap/command_data
Partially implements #10.
https://github.com/ruby/net-imap/commit/64d1080d63
nevans (Nicholas Evans)
06:20 AM Revision deae61e9 (git): [ruby/net-imap] Move flags to net/imap/flags
Partially implements #10.
https://github.com/ruby/net-imap/commit/2a9afa83bf
nevans (Nicholas Evans)
06:20 AM Revision 337c0e31 (git): [ruby/net-imap] Move UTF7 & datetime formatting to net/imap/data_encoding
Partially implements #10.
https://github.com/ruby/net-imap/commit/0d43c5e856
nevans (Nicholas Evans)
06:20 AM Revision 4dc7b824 (git): [ruby/net-imap] move command data formatters to net/imap/command_data
Partially implements #10.
https://github.com/ruby/net-imap/commit/24e929fdd2
nevans (Nicholas Evans)
06:20 AM Revision affb5104 (git): [ruby/net-imap] move response data structs to net/imap/response_data
Partially implements #10.
https://github.com/ruby/net-imap/commit/746757b936
nevans (Nicholas Evans)
06:20 AM Revision 395a2877 (git): [ruby/net-imap] move ResponseParser to lib/net/imap/response_parser
Partially implements #10.
https://github.com/ruby/net-imap/commit/c2408aac9a
nevans (Nicholas Evans)
06:20 AM Revision 2fc91da8 (git): [ruby/net-imap] Clean up authenticators rdoc
Added RFC links to all SASL mechanism specifications.
https://github.com/ruby/net-imap/commit/53ff4b0c09
nevans (Nicholas Evans)
06:20 AM Revision 912f39b2 (git): [ruby/net-imap] Update AUTH=PLAIN to be a little closer to RFC4616
* Add authzid support
* must not contain NULL chars
* improve rdoc
https://github.com/ruby/net-imap/commit/a587fc71b7
nevans (Nicholas Evans)
06:20 AM Revision 33100581 (git): [ruby/net-imap] Move each authenticator to its own file
Also updates rdoc with SASL specifications and deprecations. Of these
four, only `PLAIN` isn't deprecated!
+@@authenticators+ was changed to a class instance var
+@authenticators+. No one should have been using the class variable
dire...
nevans (Nicholas Evans)
06:13 AM Revision a7f74798 (git): [ruby/erb] Document that `<% #` doesn't work
[Bug #17846]
https://github.com/ruby/erb/commit/b58b188028fbb403f75d48d62717373fc0908f7a
k0kubun (Takashi Kokubun)
03:10 AM Revision f941dd5a (git): Reuse sysconf result
nobu (Nobuyoshi Nakada)
02:39 AM Revision 0dd9ac77 (git): Revised PAGE_MAX_SIZE case
nobu (Nobuyoshi Nakada)
02:30 AM Revision a1fdc5f7 (git): Check only whether PAGE_SIZE is compile-time const
nobu (Nobuyoshi Nakada)
12:39 AM Revision 921d8ac9 (git): Get rid of including sys/user.h on macOS
LIST_HEAD in ccan/list conflicts with sys/queue.h.
```
./ccan/list/list.h:75:9: warning: 'LIST_HEAD' macro redefined [-Wmacro-redefined]
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/queue.h:465:9: note: ...
nobu (Nobuyoshi Nakada)

05/05/2021

10:28 PM Feature #17844: Support list of methods to test with respond_to?
I would be confused whether it should respond to ALL of the params, or just ANY of them. It could be just me, though.
Maybe adding a `respond_to_any?` would solve that.
matheusrich (Matheus Richard)
09:54 PM Revision b655a3fa (git): Fall back to sysconf to determine page size during runtime
On some platforms the PAGE_SIZE macro does not exist so we can fall back
to `sysconf` to determine the page size at runtime.
peterzhu2118 (Peter Zhu)
07:31 PM Revision 23a98237 (git): Fix PAGE_SIZE macro detection in autoconf
The current fix for PAGE_SIZE macro detection in autoconf does not work
correctly. I see the following output with running configure on Linux:
```
checking PAGE_SIZE is defined... no
```
Linux has PAGE_SIZE macro. This is happening bec...
peterzhu2118 (Peter Zhu)
05:12 PM Bug #15928: Constant declaration does not conform to JIS 3017:2013
jeremyevans0 (Jeremy Evans) wrote in #note-11:
> Stating absolutes without confirming them is risky. Looking through the commits to `spec`, commit:c881678cd75432f47903a5d1d8b86a7a723cb023 just removed specs stating `It is not a spec [.....
Eregon (Benoit Daloze)
04:47 PM Bug #15928: Constant declaration does not conform to JIS 3017:2013
Eregon (Benoit Daloze) wrote in #note-10:
> > This is a bug fix, not a feature change, and should be treated like other bug fixes.
> ...
Stating absolutes without confirming them is risky. Looking through the commits to `spec`, commit:...
jeremyevans0 (Jeremy Evans)
03:44 PM Bug #15928: Constant declaration does not conform to JIS 3017:2013
Thank you for the context.
IMHO changing single assignment order is a lot simpler, and would bring consistency too.
I feel consistency also has rather low value here, multiple assignment is different to multiple single assignments, n...
Eregon (Benoit Daloze)
03:10 PM Bug #15928: Constant declaration does not conform to JIS 3017:2013
Eregon (Benoit Daloze) wrote in #note-7:
> jeremyevans0 (Jeremy Evans) wrote in #note-6:
> ...
You're wrong since commit:50c54d40a81bb2a4794a6be5f1861152900b4fed (bug fix for #4443).
> That's simple and there is no need to switch ba...
jeremyevans0 (Jeremy Evans)
01:36 PM Bug #15928: Constant declaration does not conform to JIS 3017:2013
jeremyevans0 (Jeremy Evans) wrote in #note-6:
> If the behavior was a deliberate feature in older versions, I agree. If the behavior was not deliberate in old versions, and changing it is just fixing a bug (as it is in this case), I di...
Eregon (Benoit Daloze)
02:09 AM Bug #15928: Constant declaration does not conform to JIS 3017:2013
Eregon (Benoit Daloze) wrote in #note-5:
> No, the spec should be kept for older versions/other implementations, and we should have a spec for the new behavior.
If the behavior was a deliberate feature in older versions, I agree. If...
jeremyevans0 (Jeremy Evans)
01:07 AM Bug #15928: Constant declaration does not conform to JIS 3017:2013
jeremyevans0 (Jeremy Evans) wrote in #note-4:
> Like many specs, the added spec describes the actual behavior of CRuby at the time it was added, without regard for whether the behavior was intentional or not.
If users depend on it an...
Eregon (Benoit Daloze)
04:19 PM Bug #17850 (Closed): `PAGE_SIZE` is no longer a constant for macOS
@nobu seemed to fix this issue by 3d5b6ddff8def49e59fb9a9ddd28a653498ae861 and 192150051144c0242ee44df26952dfe31b83cac2 mame (Yusuke Endoh)
12:19 PM Bug #17850: `PAGE_SIZE` is no longer a constant for macOS
Thank you. I'm looking into this. peterzhu2118 (Peter Zhu)
12:02 PM Bug #17850: `PAGE_SIZE` is no longer a constant for macOS
I wonder why Apple didn't simply define PAGE_SIZE conditionally based on the architecture. Eregon (Benoit Daloze)
03:51 AM Bug #17850 (Closed): `PAGE_SIZE` is no longer a constant for macOS
[Build failure for macOS Big Sur (ARM)](http://rubyci.s3.amazonaws.com/osx1100arm/ruby-master/log/20210505T014504Z.log.html.gz) due to `-Wundef` (#17752).
It is said in https://www.wwdcnotes.com/notes/wwdc20/10214/ that:
* Native p...
xtkoba (Tee KOBAYASHI)
04:01 PM Revision 19215005 (git): PAGE_SIZE is used only when mmap is available
nobu (Nobuyoshi Nakada)
03:46 PM Bug #4443: odd evaluation order in a multiple assignment
I wrote some concerns over this change in https://bugs.ruby-lang.org/issues/15928#note-10.
I think the previous semantics of multiple assignments are better for various reasons.
We could change single assignment order, always evaluate ...
Eregon (Benoit Daloze)
03:15 PM Feature #17851: ruby extension for memoryview
I think Fiddle::MemoryView is not needed for this.
String#[] can already avoid copying, on CRuby I think only if taking a substring until the end (the case here).
Also if Fiddle::MemoryView returns a mutable/non-read-only view, it se...
Eregon (Benoit Daloze)
01:57 PM Feature #17851 (Open): ruby extension for memoryview
add an extension to ruby for memoryview - (just like Fiddle::MemoryView but in ruby assuming Fiddle::MemoryView gets slices)
add a method in Kernel to get initialize a memoryview on an object that is a c memoryview
lets say we want t...
dsisnero (Dominic Sisneros)
03:06 PM Bug #14400: IO#ungetc and IO#ungetbyte documentation is inconsistent with the behavior
Thank you for the doc update! Eregon (Benoit Daloze)
03:03 PM Revision d2afb032 (git): * 2021-05-06 [ci skip]
git[bot]
02:54 PM Revision 3d5b6ddf (git): Fix compilation on M1 Mac
As PAGE_SIZE may not be a preprocessor constant, dispatch at
runtime in that case.
nobu (Nobuyoshi Nakada)
02:45 PM Bug #17467: What makes strip() and lstrip() not stripping \u0000 from beginning of the string?
@byroot I marked this for backporting. Here's the guide for how to do that: https://bugs.ruby-lang.org/projects/ruby/wiki/HowToRequestBackport jeremyevans0 (Jeremy Evans)
08:27 AM Bug #17467: What makes strip() and lstrip() not stripping \u0000 from beginning of the string?
I believe this fix should be backported. byroot (Jean Boussier)
02:16 PM Feature #17832: allow IO write to write memoryview object without copying or add IO#write_memoryview
This is a separate request #17851 to allow memoryview extension in ruby - this request is so that IO doesn't require a separate copy
to string when writing a memoryview object
dsisnero (Dominic Sisneros)
01:58 PM Feature #17848 (Closed): inline rbs either by rdoc comments or changing syntax
Ruby is not going to add new syntax for type annotation. Allowing `yard` comments in RBS syntax may be a (good) choice, but it's up to `yard` side.
Matz.
matz (Yukihiro Matsumoto)
12:38 PM Feature #17752 (Closed): Enable -Wundef for C extensions in repository
@eregon No worries. This change revealed an actual issue #17850 anyway, great! I think other issues than #17850 are all addressed, so I'm closing this ticket. mame (Yusuke Endoh)
11:55 AM Feature #17752: Enable -Wundef for C extensions in repository
https://rubyci.org/ looks good now except `macOS Big Sur (ARM)`, thank you @mame, @nobu, @xtkoba, @peterzhu2118 for the fixes, and sorry for the breakage (the CI on GitHub passed).
Eregon (Benoit Daloze)
04:09 AM Feature #17752: Enable -Wundef for C extensions in repository
* @nobu fixed the error on old GCC: 5bde2e61db8148cd5a7974f640aee38be60bf368
* I think I fixed the error on icc (but not confirmed yet): e71c9ca529f1dce2c3816653cd974ce786eea7d8
* @nobu is now creating a patch fo M1 macOS.
mame (Yusuke Endoh)
03:57 AM Feature #17752: Enable -Wundef for C extensions in repository
I missed one more error, for which a new ticket is open now (#17850). xtkoba (Tee KOBAYASHI)
01:20 AM Feature #17752: Enable -Wundef for C extensions in repository
The remaining problems seem due to insufficient simulation of `RBIMPL_HAS_*` in `include/ruby/internal/has/*` for GCC <= 4.x and ICC.
My temporary patch would not be necessary if errors did not manifest themselves one after another.
xtkoba (Tee KOBAYASHI)
12:57 AM Feature #17752: Enable -Wundef for C extensions in repository
I'll take a look tomorrow.
If we need a fix faster, I think it's OK to merge @xtkoba's PR.
Eregon (Benoit Daloze)
07:54 AM Feature #17849: Fix Timeout.timeout so that it can be used in threaded Web servers
> We could automatically mask Thread#raise within ensure so it only happens after the ensure body completes.
As said on the other issue, I don't think it would fix *all* issues, but it would certainly be a huge improvement.
byroot (Jean Boussier)
01:41 AM Feature #17849 (Assigned): Fix Timeout.timeout so that it can be used in threaded Web servers
Making this a separate issue from #17837
Eregon (Benoit Daloze) wrote in https://bugs.ruby-lang.org/issues/17837#note-10 (which is about timeouts for regular expressions):
> I think fixing Timeout.timeout might be possible.
> ...
duerst (Martin Dürst)
03:58 AM Revision e71c9ca5 (git): configure.ac: check if __builtin_expect is available or not
include/ruby/internal/has/builtin.h uses HAVE_BUILTIN___BUILTIN_EXPECT
for icc but previously it was not defined.
This is a follow up of 8b32de2ec9b72d4c9ede19b70ec9497718fb25a6 and this
will fix the following failures:
http://rubyci.s...
mame (Yusuke Endoh)
02:02 AM Feature #17837: Add support for Regexp timeouts
Eregon (Benoit Daloze) wrote in #note-10:
> I think fixing Timeout.timeout might be possible.
> ...
I created a separate issue for the improvement of Timeout.timeout: #17849. Please feel free to discuss there. My guess is that there ...
duerst (Martin Dürst)
01:10 AM Revision 5bde2e61 (git): Workaround for gcc-4 bug
False positive `-Wundef` in `#elif` after `#if defined`. nobu (Nobuyoshi Nakada)
12:38 AM Revision 44cff500 (git): `_MSC_VER` may not be defined
xtkoba (Tee KOBAYASHI)
12:38 AM Revision 46dd295a (git): Fix compilation error in thread_win32.c
USE_WIN32_MUTEX flag may not be defined. peterzhu2118 (Peter Zhu)
12:38 AM Revision 3d2e7e2a (git): Fix compilation errors in FreeBSD
__FreeBSD_version is defined in sys/param.h. peterzhu2118 (Peter Zhu)
12:38 AM Revision 45bcab3c (git): Fix compilation error in mingw
__LITTLE_ENDIAN is not defined. peterzhu2118 (Peter Zhu)
12:38 AM Revision b57c7be6 (git): Fix compilation errors for c99
ENUM_OVER_INT is sometimes not defined. Use #ifdef instead if #if. peterzhu2118 (Peter Zhu)

05/04/2021

11:41 PM Feature #17752: Enable -Wundef for C extensions in repository
I propose `-Wundef` warnings not be made into errors for the time being.
PR: https://github.com/ruby/ruby/pull/4455
xtkoba (Tee KOBAYASHI)
10:58 PM Feature #17752: Enable -Wundef for C extensions in repository
Maybe [icc 2021.2 x64](http://rubyci.s3.amazonaws.com/icc-x64/ruby-master/log/20210504T190003Z.fail.html.gz) is also broken. mame (Yusuke Endoh)
10:56 PM Feature #17752 (Assigned): Enable -Wundef for C extensions in repository
I think this change broke the following servers on RubyCI.
* [Ubuntu armv7l eabihf](http://rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20210504T221708Z.fail.html.gz)
* [CentOS 7.6(1810) x86_64](http://rubyci.s3.amazonaws.com/c...
mame (Yusuke Endoh)
12:57 PM Feature #17752 (Closed): Enable -Wundef for C extensions in repository
Applied in changeset commit:git|8b32de2ec9b72d4c9ede19b70ec9497718fb25a6.
----------
Add -Werror=undef to default warnflags for core
* See [Feature #17752]
* For external extensions it's transformed to just warn and not error (-Wundef)...
Eregon (Benoit Daloze)
11:40 PM Bug #17846: Percent mode changes the output from ERB beyond what is documented
k0kubun (Takashi Kokubun) wrote in #note-4:
> [..] writing a comment in the middle of `<% %>` is currently not supported.
I don't really have an issue with this resolution, however, is it documented
somewhere? I cannot find this men...
graywolf (Gray Wolf)
02:12 AM Bug #17846 (Rejected): Percent mode changes the output from ERB beyond what is documented
So the trick is:
```rb
$ erb -x repro.erb
#coding:UTF-8
_erbout = +''; # ; _erbout.<< "x\n".freeze
; _erbout.<< "y\n".freeze
; _erbout
```
```rb
$ erb -x -P repro.erb
#coding:UTF-8
_erbout = +''; # ; _erbout.<< "x\ny\n".freeze
; _er...
k0kubun (Takashi Kokubun)
02:01 AM Bug #17846 (Feedback): Percent mode changes the output from ERB beyond what is documented
Oh sorry, I guess that's why it shouldn't change the output lol. will take a look k0kubun (Takashi Kokubun)
02:01 AM Bug #17846 (Rejected): Percent mode changes the output from ERB beyond what is documented
```
-P disable ruby code evaluation for lines beginning with %
```
"lines beginning with `%`" means lines beginning with `%`. Your lines start with `<` or `y`, so `-P` is irrelevant to your input.
k0kubun (Takashi Kokubun)
08:49 PM Revision 370949aa (git): test/net/ftp/test_ftp.rb - fix intermittent MinGW failure
Fixes intermittent error as below:
[242/838] 5316=test_ftp
#<Thread:0x0000020aa8733f20 D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:2532 run> terminated with exception (report_on_exception is true):
D:/a/ruby/ruby/src/tool/lib/minitest/u...
MSP-Greg (Greg L)
06:59 PM Revision fd3a2034 (git): What's Here for class IO (#4440)
* What's Here for class IO burdettelamar (Burdette Lamar)
06:25 PM Bug #14400 (Closed): IO#ungetc and IO#ungetbyte documentation is inconsistent with the behavior
Applied in changeset commit:git|c809a8cae8c2c8e64fd2d1b0fe8571faf443b8cd.
----------
Fix documentation for IO#unget{byte,c}
Fixes [Bug #14400]
jeremyevans (Jeremy Evans)
06:23 PM Revision c809a8ca (git): Fix documentation for IO#unget{byte,c}
Fixes [Bug #14400] jeremyevans (Jeremy Evans)
06:14 PM Bug #15928: Constant declaration does not conform to JIS 3017:2013
I submitted a pull request to fix this: https://github.com/ruby/ruby/pull/4450
Like @mame, I think this is a real bug. Constant assignment evaluation order should be consistent with attribute assignment evaluation order.
The spec ...
jeremyevans0 (Jeremy Evans)
04:29 PM Feature #17848 (Rejected): inline rbs either by rdoc comments or changing syntax
I like gradual typing - I like the syntax of rbs files but for coding - convenience it would be nice if we had inline syntax for types.
I know that steep allows you to define types inline but because it is valid ruby syntax - the code ...
dsisnero (Dominic Sisneros)
04:15 PM Feature #17832: allow IO write to write memoryview object without copying or add IO#write_memoryview
For debugging purposes, it would be nice if we could modify the content of view directly from Ruby code without any third-party C extension, although I cannot tell whether `IO` is suitable for that. xtkoba (Tee KOBAYASHI)
01:19 PM Feature #17832: allow IO write to write memoryview object without copying or add IO#write_memoryview
any comments on this feature request? dsisnero (Dominic Sisneros)
03:46 PM Revision 14c932e5 (git): * 2021-05-05 [ci skip]
git[bot]
03:46 PM Revision 3ca291c9 (git): Correctly update array capacity after realloc
Reallocating to a smaller size in the transient heap may result in no
change in the actual capacity but the capacity of the array is still
updated to the smaller value.
This commit changes `ary_heap_realloc` to return the new capacity w...
peterzhu2118 (Peter Zhu)
02:22 PM Feature #17837: Add support for Regexp timeouts
> The main/major issue is it can trigger within ensure, right? Is there anything else?
That would fix most issues, but not all. It can also trigger in places where exception are entirely unexpected, so there's just no `ensure`.
Als...
byroot (Jean Boussier)
12:55 PM Feature #17837: Add support for Regexp timeouts
duerst (Martin Dürst) wrote in #note-9:
> I very strongly suggest that this feature be voluntary, e.g. as an additional flag on the regular expression.
If you have to turn it on for each regexp, that would make the feature kinda useless...
Dan0042 (Daniel DeLorme)
10:31 AM Feature #17837: Add support for Regexp timeouts
sam.saffron (Sam Saffron) wrote in #note-6:
> Sort of, it gets complicated. Unicorn is easy cause it is single threaded. Killing off threads in Puma is much more fraught, in Sidekiq the old pattern of killing off was nuked by Mike cause...
Eregon (Benoit Daloze)
12:12 AM Feature #17837: Add support for Regexp timeouts
sam.saffron (Sam Saffron) wrote in #note-6:
> > Or is it too difficult to detect them / the problematic patterns evolve over time?
> ...
In general, yes. But for an extremely large set of regular expressions, it's easy to predict tha...
duerst (Martin Dürst)
12:56 PM Revision d0998850 (git): Fix -Wundef warnings for RBIMPL_HAS_BUILTIN
* See [Feature #17752]
* Defining explicitly to 0 seems the best solution, see https://github.com/ruby/ruby/pull/4428
* For example:
./include/ruby/internal/has/builtin.h:49:33: error: "RBIMPL_HAS_BUILTIN___builtin_assume" is not defined...
Eregon (Benoit Daloze)
12:56 PM Revision f108bc32 (git): HAVE_* macros should not be defined with value 0
* See [Feature #17752] Eregon (Benoit Daloze)
12:56 PM Revision 0764d323 (git): Fix -Wundef warnings for patterns `#if HAVE`
* See [Feature #17752]
* Using this to detect them:
git grep -P 'if\s+HAVE' | grep -Pv 'HAVE_LONG_LONG|/ChangeLog|HAVE_TYPEOF'
Eregon (Benoit Daloze)
12:56 PM Revision fa7a712d (git): Fix -Wundef warnings for HAVE_RB_EXT_RACTOR_SAFE
* See [Feature #17752] Eregon (Benoit Daloze)
12:56 PM Revision 59a92a84 (git): Fix -Wundef warnings in core extensions
* See [Feature #17752] Eregon (Benoit Daloze)
12:56 PM Revision f1dcc3da (git): Add RBIMPL_RVALUE_EMBED_LEN_MAX neeeded by internal/bignum.h
* It evaluated to 0 before, revealed by -Wundef
* See [Feature #17752]
Co-authored-by: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com>
Eregon (Benoit Daloze)
12:56 PM Revision 68d6bd08 (git): Fix trivial -Wundef warnings
* See [Feature #17752]
Co-authored-by: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com>
Eregon (Benoit Daloze)
12:56 PM Revision 229cbeba (git): Fix -Wundef warnings in coroutine/*/Context.h
* See [Feature #17752]
Co-authored-by: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com>
Eregon (Benoit Daloze)
12:56 PM Revision 9e2483ee (git): vm_dump.c: rename HAVE_BACKTRACE to USE_BACKTRACE
* HAVE_ macros should only be defined or undefined, not used for their value.
* See [Feature #17752]
Co-authored-by: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com>
Eregon (Benoit Daloze)
12:56 PM Revision 8b32de2e (git): Add -Werror=undef to default warnflags for core
* See [Feature #17752]
* For external extensions it's transformed to just warn and not error (-Wundef)
like other other -Werror in warnflags.
Eregon (Benoit Daloze)
10:03 AM Revision 113ddf4d (git): test/net/imap/test_imap.rb: wait a moment before socket is closed
to try to suppress a failure on Solaris. This is the same as
19504d115dc09558255fcb5213f80dd8454ab189
http://rubyci.s3.amazonaws.com/solaris11-sunc/ruby-master/log/20210504T070007Z.fail.html.gz
```
1) Error:
IMAPTest#test_idle_done_no...
mame (Yusuke Endoh)
01:43 AM Feature #17825: Uniformize Float::INFINITY and Date::infinity.new
It's hard to remove that class because of marshal compatibility.
```diff
diff --git a/ext/date/lib/date.rb b/ext/date/lib/date.rb
index 65c34ace492..e96d102d7da 100644
--- a/ext/date/lib/date.rb
+++ b/ext/date/lib/date.rb
@@ -9,6...
nobu (Nobuyoshi Nakada)
01:08 AM Revision ef406a6c (git): Suppress maybe-uninitialized warning by mingw gcc 11
nobu (Nobuyoshi Nakada)

05/03/2021

11:53 PM Revision 7a3dd05e (git): spec/ruby/library/net/http/http/fixtures/http_server.rb host naming for Windows
MSP-Greg (Greg L)
11:53 PM Revision 5a42ef49 (git): Fix test/net/http/test_https.rb host naming for Windows
MSP-Greg (Greg L)
09:11 PM Revision 9a6226c6 (git): Eagerly allocate instance variable tables along with object
This allows us to allocate the right size for the object in advance,
meaning that we don't have to pay the cost of ivar table extension
later. The idea is that if an object type ever became "extended" at
some point, then it is very like...
tenderlovemaking (Aaron Patterson)
09:10 PM Bug #17511: Segmentation fault when compiled with -O2 or higher on ARM Android
Just for the record, there turns out to be a Clang/LLVM bug in its `__builtin_longjmp` implementation for ARM Linux (more specifically for non-Darwin and non-Windows) for which there seems to be no reliable workaround on user's side.
...
xtkoba (Tee KOBAYASHI)
07:08 PM Bug #17846: Percent mode changes the output from ERB beyond what is documented
Apologies if intentional, but it seems that whitespace between `<%` and `#` can be troublesome:
https://makandracards.com/makandra/3533-erb-templates-and-comments
xtkoba (Tee KOBAYASHI)
04:31 PM Feature #11963 (Closed): Add a simple static web server to `ruby`
jeremyevans0 (Jeremy Evans)
04:26 PM Feature #11963: Add a simple static web server to `ruby`
I guess this one can be closed, I've just ran my first `ruby -run -e httpd . -p 8080` using ruby 2.7! ulysse (Ulysse Buonomo)
04:00 PM Revision a6ff1dc6 (git): * 2021-05-04 [ci skip]
git[bot]
03:59 PM Revision 14ee2635 (git): Workaround failures on Windows
nobu (Nobuyoshi Nakada)
03:44 PM Bug #17812 (Closed): Timeout::Error doesn't let two-argument raise() set a new message
jeremyevans0 (Jeremy Evans)
02:57 PM Feature #17837: Add support for Regexp timeouts
> I admit that this is less important than per-request timeout.
I'd like to second what Sam said on this. With what is now the most common way of deploying Ruby in production, namely a threaded web-server like Puma, there is no good w...
byroot (Jean Boussier)
01:38 PM Feature #17837: Add support for Regexp timeouts
Eregon (Benoit Daloze) wrote in #note-5:
> Shouldn't an app have a global timeout per request anyway, and that would catch regexps and other things too?
I agree that it is much better to have. Still, I think this proposal is good-to-...
mame (Yusuke Endoh)
07:57 AM Feature #17837: Add support for Regexp timeouts
> Shouldn't an app have a global timeout per request anyway
Sort of, it gets complicated. Unicorn is easy cause it is single threaded. Killing off threads in Puma is much more fraught, in Sidekiq the old pattern of killing off was nuk...
sam.saffron (Sam Saffron)
01:29 PM Feature #17847: `ruby -run -e httpd` displays URL
+1 mame (Yusuke Endoh)
12:56 PM Feature #17847 (Closed): `ruby -run -e httpd` displays URL
The current version of un.rb `httpd` shows port number only:
```
$ ruby -run -e httpd
[2021-05-03 21:55:09] INFO WEBrick 1.7.0
[2021-05-03 21:55:09] INFO ruby 3.1.0 (2021-05-03) [x86_64-linux]
[2021-05-03 21:55:09] INFO WEBrick...
gotoken (Kentaro Goto)
11:34 AM Feature #17795: Around `Process.fork` callbacks API
Another use-case I found: https://github.com/rubyjs/mini_racer#fork-safety
That gem (and others of course) could provide some helpers methods based on the chosen strategy if there is a common hook.
Right now providing fork safety (if...
Eregon (Benoit Daloze)
12:46 AM Bug #17843: Ruby on Rails error[BUG] Segmentation fault at 0x0000000000000110 ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-darwin15] (#42110)
Apologies about my misleading statement about support for the OS.
It doesn't seem to be receiving security updates anymore so I had assumed it reached end of life.
Looking at the report, the crash happens after fork.
There was a Ruby cr...
alanwu (Alan Wu)

05/02/2021

11:44 PM Bug #17843: Ruby on Rails error[BUG] Segmentation fault at 0x0000000000000110 ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-darwin15] (#42110)
The latest version of Xcode (12.5 beta) seems to support macOS 10.9 or later: https://developer.apple.com/support/xcode/ xtkoba (Tee KOBAYASHI)
11:11 PM Bug #17843: Ruby on Rails error[BUG] Segmentation fault at 0x0000000000000110 ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-darwin15] (#42110)
OS X El Capitan is no longer supported by Apple.
I'm not sure about Ruby's policy for trying to support OSes that the vendor no longer supports.
In any case, I would suggest upgrading to a newer OS to deal with the crash.
alanwu (Alan Wu)
11:17 PM Revision a0296448 (git): * 2021-05-03 [ci skip]
git[bot]
11:17 PM Revision 511b2f30 (git): Get rid of misleading indentation
xtkoba (Tee KOBAYASHI)
09:26 PM Feature #17845: Windows Ruby - ucrt build?
@larskanis
Sorry, I meant to ping you immediately, but got distracted. Also, I saw your changes to ridk, but didn't see your patch file.
Anyway, I agree that there needs to be some way to distinguish between mingw and ucrt builds....
MSP-Greg (Greg L)
08:11 PM Feature #17845: Windows Ruby - ucrt build?
> I wonder if there is a standard target triplet for MinGW + UCRT.
The compiler triplet for MINGW with UCRT is still 'x86_64-w64-mingw32'. This is defined in MSYS2 [here](https://github.com/msys2/MSYS2-packages/blob/master/filesystem...
larskanis (Lars Kanis)
06:42 PM Bug #17846 (Rejected): Percent mode changes the output from ERB beyond what is documented
```
/ # cat repro.erb
<% # %>x
y
/ # erb repro.erb
y
/ # erb -P repro.erb
/ #
```
Based on documentation of -P (disabling percent mode), this change in behavior
is unexpected.
graywolf (Gray Wolf)

05/01/2021

08:06 PM Bug #17774: Quantified empty group causes regex to fail
sawa (Tsuyoshi Sawada) wrote in #note-3:
> wanabe (_ wanabe) wrote in #note-2:
> ...
Oh I'm very sorry, I wrote it wrong.
I was aware of it, but I simply used the wrong word.
wanabe (_ wanabe)
12:50 PM Bug #17774: Quantified empty group causes regex to fail
wanabe (_ wanabe) wrote in #note-2:
> ... Oniguruma, a derivative of Onigmo
I believe it is the other way around.
sawa (Tsuyoshi Sawada)
11:06 AM Bug #17774: Quantified empty group causes regex to fail
The reproduction example could be a bit shorter.
```
$ ruby -ve 'p "xxxx" =~ /(?:x(){5})*$/, "xxxx" =~ /(?:x(){4})*$/'
ruby 3.1.0dev (2021-05-01T02:04:17Z origin/master 121fa24a34) [x86_64-linux]
3
0
```
This problem has already...
wanabe (_ wanabe)
07:41 PM Feature #17845: Windows Ruby - ucrt build?
MinGW `msvcrt` packages have a prefix of `mingw-w64-x86_64`,
MinGW ` ucrt ` packages have a prefix of `mingw-w64-ucrt-x86_64`.
MSP-Greg (Greg L)
07:33 PM Feature #17845: Windows Ruby - ucrt build?
I wonder if there is a standard target triplet for MinGW + UCRT. I came up with `x86_64-w64-mingw32-ucrt`, but when googled it hits only one page. I suppose something like `x64-mingw32-ucrt` is acceptable for `target_os` in `configure`, ... xtkoba (Tee KOBAYASHI)
06:38 PM Feature #17845 (Closed): Windows Ruby - ucrt build?
Currently, Windows Ruby is normally compiled two ways.
The first, mswin, is compiled using Microsoft's current Visual C compiler, and links to the universal runtime (ucrt).
The second, mingw, is compiled using MinGW gcc. This link...
MSP-Greg (Greg L)
03:09 PM Bug #17843: Ruby on Rails error[BUG] Segmentation fault at 0x0000000000000110 ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-darwin15] (#42110)
I wonder if the problem disappears by backporting commit:4ea96f1d4f8a50c204c4367c994cdbf12cd97b64 which modifies `fill_random_bytes_syscall` so that it calls `CCRandomGenerateBytes` instead for newer environments (probably for macOS >= 1... xtkoba (Tee KOBAYASHI)
12:54 PM Bug #17843: Ruby on Rails error[BUG] Segmentation fault at 0x0000000000000110 ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-darwin15] (#42110)
The stack trace shows that the crash occurred at:
```
libdispatch.dylib(_dispatch_queue_wakeup_with_qos_slow+126) [0x00007fff90ff9b06]
libcorecrypto.dylib(ccrng_CommonCrypto_generate+309) [0x00007fff9e03bddc]
libruby.3.0.dylib(ruby_f...
xtkoba (Tee KOBAYASHI)
08:03 AM Bug #17843 (Closed): Ruby on Rails error[BUG] Segmentation fault at 0x0000000000000110 ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-darwin15] (#42110)
following tutorial
https://www.youtube.com/watch?v=nlKIJfv50U0
On this command
$ rails g scaffold Survey name:text laptop:binary os:text
the following error was generated with the following instruction
[BUG] Segmentation fault...
nayaronfire (kk nayar)
01:01 PM Feature #17844 (Open): Support list of methods to test with respond_to?
Not sure whether this is a good idea at all, but I guess it doesn't hurt to put it up for debate.
The preferred way to check e.g. whether an argument is acceptable is by use of `respond_to?`:
```ruby
# Don't
def notify(recipien...
svoop (Sven Schwyn)
02:04 AM Bug #17606 (Closed): Make failed on i386-cygwin (miniruby.exe aborted)
Applied in changeset commit:git|121fa24a3451b45c41ac0a661b64e9fc8600e589.
----------
Adjust struct member offset for i386 Cygwin
Fixes [Bug #17606]
xtkoba (Tee KOBAYASHI)
02:04 AM Revision 121fa24a (git): Adjust struct member offset for i386 Cygwin
Fixes [Bug #17606] xtkoba (Tee KOBAYASHI)
12:13 AM Revision f64d7674 (git): Fix example for custom warn method
Regexp has a match? method.
[ci skip]
adam12 (Adam Daniels)

04/30/2021

10:47 PM Misc #17842: Example incorrect in documentation for Hash#dig
Thanks for the fix! I merged your pull request. jeremyevans0 (Jeremy Evans)
10:46 PM Misc #17842 (Closed): Example incorrect in documentation for Hash#dig
Applied in changeset commit:git|a9824a3113ee5342e7ac90387de9f3b9d5ec9e0a.
----------
Correct documentation example on Hash#dig
Fixes [Misc #17842]. The current documentation suggests that:
{foo: {bar: {baz: 2}}}.dig(:foo, :bar...
nickkelley (Nick Kelley)
10:37 PM Misc #17842: Example incorrect in documentation for Hash#dig
Here is a pull request that fixes the comment: https://github.com/ruby/ruby/pull/4441
nickkelley (Nick Kelley)
10:30 PM Misc #17842 (Closed): Example incorrect in documentation for Hash#dig
In the current examples for Hash#dig, we have:
```
h = {foo: {bar: {baz: 2}}}
h.dig(:foo) # => {:bar=>{:baz=>2}}
h.dig(:foo, :bar) # => {:bar=>{:baz=>2}} <-- incorrect return value
```
This should be:
```
h = {foo: {bar: {baz: ...
nickkelley (Nick Kelley)
10:46 PM Revision a867d552 (git): * 2021-05-01 [ci skip]
git[bot]
10:46 PM Revision a9824a31 (git): Correct documentation example on Hash#dig
Fixes [Misc #17842]. The current documentation suggests that:
{foo: {bar: {baz: 2}}}.dig(:foo, :bar) # => {:bar=>{:baz=>2}}
when it should be:
{foo: {bar: {baz: 2}}}.dig(:foo, :bar) # => {:baz=>2}
nickkelley (Nick Kelley)
08:29 PM Feature #17837: Add support for Regexp timeouts
Shouldn't an app have a global timeout per request anyway, and that would catch regexps and other things too?
Capturing the time in regexp interrupt checks is easy but sounds fairly expensive.
Could such regexps emit a warning since ...
Eregon (Benoit Daloze)
03:06 PM Bug #17840: `make install` overriding file permission with 644
You are right! Thank you for your detailed explanation! I confirmed the files permissions were changed by your steps.
> As for package management, for example Gentoo Portage [removes bundled gems](https://gitweb.gentoo.org/repo/gentoo...
jaruga (Jun Aruga)
02:45 PM Bug #16798: ENV.replace on Windows with a variable name not respecting case will clear it
The backport breaks on RHEL7:
~~~
hash.c: In function 'keylist_delete':
hash.c:5661:5: error: 'for' loop initial declarations are only allowed in C99 mode
for (long i=0; i<RARRAY_LEN(keys); i++) {
^
hash.c:5661:5: note:...
vo.x (Vit Ondruch)
02:36 PM Bug #17823: addr2line.c: Interpret `DW_RLE_start_length`
PR: https://github.com/ruby/ruby/pull/4439 xtkoba (Tee KOBAYASHI)
02:11 PM Bug #17810: addr2line.c: Some symbol names missing in C backtrace with Clang/LLVM
PR: https://github.com/ruby/ruby/pull/4438
The second patch is omitted from the PR, because it turns out to be not very useful. The corresponding source file name should be easily guessable from the symbol name.
xtkoba (Tee KOBAYASHI)
12:40 PM Bug #17606: Make failed on i386-cygwin (miniruby.exe aborted)
PR: https://github.com/ruby/ruby/pull/4437 xtkoba (Tee KOBAYASHI)
11:56 AM Revision 1f255add (git): Silence GCC 11 warnings
```
../strftime.c: In function 'rb_strftime_with_timespec':
../strftime.c:392:39: warning: comparison is always false due to limited range of data type [-Wtype-limits]
392 | if (vtm->wday < 0 || vtm->wday > 6)
...
xtkoba (Tee KOBAYASHI)
11:46 AM Revision b2c54f53 (git): [ruby/irb] Need reline >= 0.1.6
irb 1.3.5 need reline >= 0.1.6 because irb use `Reline::IOGate.in_pasting?`.
This method defined after reline 0.1.6.
fix #228.
https://github.com/ruby/irb/commit/6b7b8fc324
ima1zumi (Mari Imaizumi)
11:22 AM Feature #17647: Print register `r11` on 32-bit ARM Linux
PR: https://github.com/ruby/ruby/pull/4436 xtkoba (Tee KOBAYASHI)
02:58 AM Revision 6ee55455 (git): Update Time documentation
burdettelamar (Burdette Lamar)
 

Also available in: Atom