Activity
From 08/17/2021 to 08/23/2021
08/23/2021
-
10:08 PM Bug #18129 (Closed): Ractor-incompatible global variables can be accessed through alias
- Some global variables are not allowed in non-main Ractors. For example, the following code does not run:
``` ruby
Ractor.new do
$/
end.take
#=> can not access global variables $/ from non-main Ractors (Ractor::IsolationError)
```... -
10:05 PM Bug #18128 (Closed): Ractor allows class variables that have been used before
- In order to avoid data races, Ractor is not supposed to allow class variables. For example, the following code does not run:
``` ruby
class C
def initialize
@@var = 1
end
end
Ractor.new do
C.new
end.take
#=> can not a... -
09:59 PM Feature #18127 (Closed): Ractor-local version of Singleton
- **Background**
When the Singleton module (from the Singleton library) is included in a class, that class will have only one instance. Since the instance can only be in one Ractor at once, Singleton is not Ractor-compatible. For example,... - 06:58 PM Revision 70abda1a (git): * 2021-08-24 [ci skip]
-
06:57 PM Revision 6648b411 (git): Replace intptr_t with uintptr_t in gc.c
- Pointers may be large to the point where intptr_t would be negative.
This is problematic when doing comparisons of pointers. -
06:08 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
xtkoba (Tee KOBAYASHI) wrote in #note-31:
> I might have been misleading. The patch in #note-9 is necessary for correctly reading `DW_FORM_ref_addr` values in `.debug_info` sections, even if those values are kept uninterpreted by the ...-
05:07 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
- I might have been misleading. The patch in #note-9 is necessary for correctly reading `DW_FORM_ref_addr` values in `.debug_info` sections, even if those values are kept uninterpreted by the patch in #note-11. Both patches have been merge...
-
04:46 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
- xtkoba (Tee KOBAYASHI) wrote in #note-29:
> The behavior seems as if the patch in #note-9
Should it be applied? Based on the #note-10, #note-11 and #note-12, I thought that one is obsolete. That might be misunderstanding on my side, ... -
04:06 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
- The behavior seems as if the patch in #note-9 (https://bugs.ruby-lang.org/attachments/8974) were not applied. If I reverse-apply this patch, yes I get the following output:
```
1300: debug_info 0x54 Abbrev Number 101 not found
Abort... -
03:41 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
- Just FTR, these are the build options:
~~~
gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/re... -
02:20 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
- Byte 0x54 of the `.debug_info` is the 3rd byte of
```
<52> DW_AT_abstract_origin: <0x6a6c3a>
```
of the form `DW_FORM_ref_addr` which is in little endian 0x6a == 106 (and also the same value when interpreted as ULEB128). So... -
01:55 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
- ~~~
(gdb) c
Continuing.
-e:1: [BUG] Segmentation fault at 0x590fb15c00000020
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [powerpc64le-linux]
-- Control frame information -----------------------------------------------
c:0003 ... -
02:54 PM Revision eddd369e (git): Revert "[Feature #18045] Implement size classes for GC"
- This reverts commits 48ff7a9f3e47bffb3e4d067a12ba9b936261caa0
and b2e2cf2dedd104acad8610721db5e4d341f135ef because it is causing
crashes in SPARC solaris and i386 debian. -
01:16 PM Feature #18045 (Closed): Variable Width Allocation Phase II
- Applied in changeset commit:git|48ff7a9f3e47bffb3e4d067a12ba9b936261caa0.
----------
[Feature #18045] Remove T_PAYLOAD
This commit removes T_PAYLOAD since the new VWA implementation no longer
requires T_PAYLOAD types.
Co-authored-by: ... -
01:15 PM Revision b2e2cf2d (git): [Feature #18045] Implement size classes for GC
- This commits implements size classes in the GC for the Variable Width
Allocation feature. Unless `USE_RVARGC` compile flag is set, only a
single size class is created, maintaining current behaviour. See the
redmine ticket for more detail... -
01:15 PM Revision 48ff7a9f (git): [Feature #18045] Remove T_PAYLOAD
- This commit removes T_PAYLOAD since the new VWA implementation no longer
requires T_PAYLOAD types.
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org> -
05:29 AM Bug #18126 (Closed): Process termination three seconds after thread termination dumps core
- The following code occasionally dumps core.
```
3000.times{Thread.new{}}
sleep 2.99
```
```
$ ruby test.rb
[BUG] Segmentation fault at 0x0000000000000440
ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-linux]
$
```... -
05:12 AM Revision 83244b8c (git): [DOC] Match each `Time.now` for comparison [ci skip]
-
01:59 AM Feature #17847 (Closed): `ruby -run -e httpd` displays URL
- > Alternatively this could be part of the default output when starting WEBrick,
That's a good idea. However, since the definition of the port number output is in the HTTPServer superclass WEBrick::GenericServer, the amount of change i... - 12:59 AM Revision 116e52f3 (git): * 2021-08-23 [ci skip]
- 12:59 AM Revision 689962ea (git): improves message. thanks to eregon
- 12:59 AM Revision f18e1752 (git): Display httpd URLs supporting HTTPS
- 12:59 AM Revision 8361675e (git): Display httpd URLs
08/22/2021
-
01:27 PM Revision d7da5ca5 (git): Fix links [ci skip]
-
11:28 AM Revision 0b9a3371 (git): [ruby/date] Add zontab.list dependency
- https://github.com/ruby/date/commit/7e1ffbf568
-
11:16 AM Revision 877bfd1b (git): Suppress unused-label warnings
-
03:11 AM Revision d574b841 (git): Fix failures on non-UTF-8 environment [Bug #18077]
- Call `IOSpecs.io_fixture` with the default encoding explicitly.
`IOSpecs.closed_io` calls the method without optional `mode` which
is set to UTF-8 by default, while the default external encoding
depends on the locale environment variables. -
01:39 AM Revision 18031f41 (git): Add rb_encoding_check function
-
01:33 AM Bug #18077 (Closed): Marshal.dump(closed_io) raises IOError instead of TypeError - Applied in changeset commit:git|6594623f623a0982da62cc105094da0701d499da.
----------
Fix Marshal.dump(closed_io) to raise TypeError and allow encoding on closed IO
Mashalling a closed IO object raised "closed stream (IOError)" before i... - 01:33 AM Revision 6594623f (git): Fix Marshal.dump(closed_io) to raise TypeError and allow encoding on closed IO
- Mashalling a closed IO object raised "closed stream (IOError)" before instead of TypeError.
This changes IO#(in|ex)ternal_encoding to still return the encoding even if the underlying FD is closed.
Fixes bug #18077
08/21/2021
-
09:19 PM Bug #18077: Marshal.dump(closed_io) raises IOError instead of TypeError
- I should have read the PR first.
Yes, removing the old example and adding the new one with a version guard is perfect here :)
That allows other implementations & older versions to potentially use the new behavior already, and there is ... -
09:17 PM Bug #18077: Marshal.dump(closed_io) raises IOError instead of TypeError
- larskanis (Lars Kanis) wrote in #note-5:
> @eregon This was my first though as well, but the current behavior is already defined in ruby-spec.
We can change it in ruby/spec (adding version guards and adding the new expectation).
And... -
10:48 AM Bug #18077: Marshal.dump(closed_io) raises IOError instead of TypeError
- I removed the old example from https://github.com/ruby/ruby/pull/4758 .
-
08:03 AM Bug #18077: Marshal.dump(closed_io) raises IOError instead of TypeError
- Since this is a bug report, I think that the old example in rubyspec should be removed.
-
05:47 PM Revision c527d278 (git): Bundle RBS 1.5.1 (#4760)
-
05:15 PM Bug #14870 (Closed): Both TracePoint's :call and :c_call filters seem to skip a lot of builtin methods
- Applied in changeset commit:git|48c8df9e0eb295af06d593ce37ce1933c0ee1d90.
----------
Allow tracing of optimized methods
This updates the trace instructions to directly dispatch to
opt_send_without_block. So this should cause no slowdo... - 05:15 PM Revision ad99edc7 (git): * 2021-08-22 [ci skip]
-
05:15 PM Revision 48c8df9e (git): Allow tracing of optimized methods
- This updates the trace instructions to directly dispatch to
opt_send_without_block. So this should cause no slowdown in
non-trace mode.
To enable the tracing of the optimized methods, RUBY_EVENT_C_CALL
and RUBY_EVENT_C_RETURN are added... -
09:31 AM Misc #18125 (Closed): A strange behavior when same name variable/method coexist issue.
- Local variables are defined when they appear in assignments, thus
```ruby
deploy_to = "#{deploy_to} new place"
# ^ assignment ^local variable
```
To avoid ambiguity, use parenthesis.
```ruby
deploy_to = "#{deploy_to()}... -
08:28 AM Misc #18125: A strange behavior when same name variable/method coexist issue.
- It is excepted because of variable hoisting.
Same reason why `foo = 1 unless foo` works.
-
08:07 AM Misc #18125 (Closed): A strange behavior when same name variable/method coexist issue.
- Following is a example.
## Reproduce
```rb
def deploy_to
"deploy_to"
end
deploy_to = "#{deploy_to} new place"
p defined? deploy_to # => local_varible
p deploy_to # => " new place"
```
## What we expected.
```rb
... -
07:50 AM Revision f51a6ace (git): [DOC] prefer RUBY_DEFAULT_FREE to a magic number [ci skip]
-
07:48 AM Revision 8f755ad6 (git): [DOC] mention rb_define_alloc_func [ci skip]
-
07:01 AM Feature #10917: Add GC.stat[:total_time] when GC profiling enabled
- > It can affect performance on some cases.
But less than `GC::Profiler`, so for users of this feature it would be a performance win.
> ...
I don't think it's a big problem if it isn't perfectly accurate.
> Adding flag like GC.m... -
06:27 AM Bug #17643: Ruby 3 embedded - no GC methods?
- I don't want to do either of those things. Instead I would like to embed Ruby into a C++ program and then use it run tests.
Specifically, this is for Rice. The embed Ruby code:
https://github.com/jasonroelofs/rice/blob/master/test/... -
01:54 AM Bug #17643: Ruby 3 embedded - no GC methods?
- No arguments means reading the script from stdin.
You need to give a script name or an `-e` option. - 02:22 AM Revision e2b2b577 (git): * 2021-08-21 [ci skip]
-
02:21 AM Revision 5e7cc0ee (git): [DOC] update extension.ja.rdoc [ci skip]
- `rb_cData` has been deprecated for years.
-
12:52 AM Feature #18083: Capture error in ensure block.
- > A few places, but in relative usages probably 1/1000 of begin/rescue or ensure/end patterns, right?
I scanned top 10,000 gems by download count:
Checking for "$!":
Found 459 gems with this pattern.
Found 2624 instances of the pattern...
08/20/2021
-
10:09 PM Feature #18083: Capture error in ensure block.
- BTW, deprecating and removing `$!` has another advantage:
a raised Ruby exception wouldn't immediately leak to the current thread/fiber and more optimizations might be possible, including skipping to compute the exception backtrace (the... -
10:03 PM Feature #18083: Capture error in ensure block.
- @matz based on the above discussion, do you agree to deprecate and remove `$!` if possible?
-
10:00 PM Feature #18083: Capture error in ensure block.
- > lots of code does need to make this differentiation.
A few places, but in relative usages probably 1/1000 of begin/rescue or ensure/end patterns, right?
Agreed `$!` should be deprecated and then removed.
The only usage of `$!` I... -
01:09 AM Feature #18083: Capture error in ensure block.
- > the exception that happens inside is not a proof the resource is at fault, it could be anything, including a NoMemoryError or a SystemStackError for instance (which e.g. could be due to a bug in the block, not related to the resource a...
-
09:54 PM Feature #17847: `ruby -run -e httpd` displays URL
- Sounds fine to me.
Alternatively this could be part of the default output when starting WEBrick,
I think that would be useful in more situations.
Puma does this for instance. -
05:57 PM Feature #17847: `ruby -run -e httpd` displays URL
- I'd like to merge this PR soon. Let me know if you have any objection.
-
09:48 PM Bug #16889: TracePoint.enable { ... } also activates the TracePoint for other threads, even outside the block
- mame (Yusuke Endoh) wrote in #note-13:
> Agreed. I think thread-local behavior is more reasonable. So, the current `target: :block` is not what you want, right?
Indeed. I'm not against it but I don't think it's necessary or so helpful.
... -
06:34 PM Bug #16889: TracePoint.enable { ... } also activates the TracePoint for other threads, even outside the block
- This was discussed at the August 2021 developer meeting, and it was decided that TracePoint#enable with a block will be thread-local by default. However, that change will not take place until after Ruby 3.1. I'm switching this back to ...
-
04:14 AM Bug #16889: TracePoint.enable { ... } also activates the TracePoint for other threads, even outside the block
- Eregon (Benoit Daloze) wrote in #note-10:
> I do expect:
> ...
Agreed. I think thread-local behavior is more reasonable. So, the current `target: :block` is not what you want, right?
Though I like thread-local behavior, I have some ... -
06:52 PM Feature #18124: Hash shorthands (matching constructors functionality in JS)
- osyo (manga osyo) wrote in #note-7:
> mame (Yusuke Endoh) wrote in #note-3:
> ...
Yes, fair find! If google translate is translating correctly it seems the exact same specification.
Sorry, should have done a better job searching for i... -
06:46 PM Feature #18124: Hash shorthands (matching constructors functionality in JS)
- mame (Yusuke Endoh) wrote in #note-3:
> For "Destructuring", you can use one-line pattern matching since Ruby 3.0:
> ...
I think it's similar to this.
https://bugs.ruby-lang.org/issues/14973 -
06:42 PM Feature #18124: Hash shorthands (matching constructors functionality in JS)
- mame (Yusuke Endoh) wrote in #note-3:
> For "Destructuring", you can use one-line pattern matching since Ruby 3.0:
> ...
Thank you, haven't had enough of a chance to play with Ruby 3. Clearly I missed things.
I've updated to remove th... -
06:26 PM Feature #18124: Hash shorthands (matching constructors functionality in JS)
- For "Destructuring", you can use one-line pattern matching since Ruby 3.0:
```
hash = {a: 'a', b: 'b'}
hash => { a:, b: }
p hash[:a] #=> "a"
```
For "Constructor", it is a long-running topic: #14579, #17292, and maybe other tic... -
06:04 PM Feature #18124 (Closed): Hash shorthands (matching constructors functionality in JS)
- # **Suggestion:**
To implement one shorthand operators that allows you to construct hash into local variables and construct local variables into a hash.
# **Context:**
Javascript and other languages have a similar feature. It's help... -
06:31 PM Bug #15428: Refactor Proc#>> and #<<
- This was discussed at the August 2021 developer meeting, but no decision was made. @matz is considering whether to change the behavior.
-
11:19 AM Bug #18123 (Feedback): addr2line.c: Define `SHF_COMPRESSED`
- Currently, `addr2line.c` defines `SHF_COMPRESSED` as `0` if not defined. This is problematic because this results in treating sections as not compressed even if they really are. If not defined, `SHF_COMPRESSED` should be defined as `(1 <...
-
07:27 AM Revision 5e9598ba (git): [ruby/error_highlight] Fixed the argument for DidYouMean.formatter=
- Looks like this bug was hidden by did_you_mean's rescuing any
exceptions.
https://github.com/ruby/error_highlight/commit/7a8f0b4796 -
07:18 AM Revision cad83fa3 (git): ast.c: Rename "save_script_lines" to "keep_script_lines"
- ... as per ko1's preference. He is preparing to extend this feature to
ISeq for his new debugger. He prefers "keep" to "save" for this wording.
This API is internal and not included in any released version, so I
change it in advance. -
06:18 AM Revision 4c93c124 (git): Turned the reminder comment to a compile-time message
-
06:18 AM Revision 371bb4ea (git): Add RBIMPL_TODO
- Make `RUBY_VERSION_SINCE` and `RUBY_VERSION_BEFORE` to take major
and minor numbers so usable also in preprocessor directives. Old
macros are renamed with "STRING". -
05:14 AM Misc #18122 (Closed): DevelopersMeeting20210916Japan
- # The next dev meeting
**Date: 2021/09/16 13:00-17:00**
Place/Sign-up/Agenda/Log: https://github.com/ruby/dev-meeting-log/blob/master/DevelopersMeeting20210916Japan.md
- Dev meeting *IS NOT* a decision-making place. All decisions ... -
05:04 AM Revision b32987a3 (git): Simplify repeated member access macros
-
01:44 AM Bug #14744 (Closed): Refinements modules have a superclass
- Applied in changeset commit:git|754adbee91c2d4a4e84e9271724ca33f630d1916.
----------
Module#ancestors should not return superclasses of refinements
[ruby-core:86949] [Bug #14744]
Reported by Eregon (Benoit Daloze). Thanks! -
01:42 AM Revision 754adbee (git): Module#ancestors should not return superclasses of refinements
- [ruby-core:86949] [Bug #14744]
Reported by Eregon (Benoit Daloze). Thanks!
08/19/2021
-
11:58 PM Bug #18007: Help developers of C extensions meet requirements in "doc/extension.rdoc"
- At least commit:c0f4e4ca needs to be backported, since `p ObjectSpace::InternalObjectWrapper.new` segfaults.
-
11:56 PM Bug #18007 (Closed): Help developers of C extensions meet requirements in "doc/extension.rdoc"
-
05:32 PM Bug #18007: Help developers of C extensions meet requirements in "doc/extension.rdoc"
- Benoit, thanks for helping clarify the language in the description. I've also updated the PR commit log to use this language.
-
02:47 PM Bug #18007: Help developers of C extensions meet requirements in "doc/extension.rdoc"
- My confusion was that the description of this issue talks about the *allocate method*, but actually it's about the *alloc function*.
In CRuby there is typically only one *allocate method*, Class#allocate, and that uses the *alloc functio... -
01:51 PM Bug #18007: Help developers of C extensions meet requirements in "doc/extension.rdoc"
- Thank you for your time, Matz, Naruse, and Nobu.
I've made the requested change in the [pull request](https://github.com/ruby/ruby/pull/4604) to undefine the allocator in the check, and the warning is hidden by `#if 0`.
-
06:26 AM Bug #18007: Help developers of C extensions meet requirements in "doc/extension.rdoc"
- @naruse objects to that warning appearing every time that instance is created.
So I propose to undefine the allocator in that check, so an exception will be raised when `new` or `allocate` are called later.
```C
static inline void
... -
05:40 AM Bug #18007: Help developers of C extensions meet requirements in "doc/extension.rdoc"
- In my opinion, it should be merged, and it should cause errors (not warnings) in the future. But we need a migration path to ease the pain of the change.
Matz.
- 11:30 PM Revision 70510d15 (git): * 2021-08-20 [ci skip]
-
11:30 PM Revision c0f4e4ca (git): undefine alloc functions for C extensions
- per guidance in doc/extension.rdoc, these classes now undefine their
alloc functions:
- ObjectSpace::InternalObjectWrapper
- Socket::Ifaddr -
11:30 PM Revision e8e3b7a0 (git): Undefine the alloc function for T_DATA classes
- which have not undefined or redefined it.
When a `T_DATA` object is created whose class has not undefined or
redefined the alloc function, the alloc function now gets undefined by
Data_Wrap_Struct et al. Optionally, a future release may... -
05:48 PM Bug #18078 (Closed): rb_fix2uint should avoid method lookup and use FIXNUM_NEGATIVE_P
- Fixed by commit:d668cd188ca91cf08ea7678bad1dd0bc8a997a81
-
05:09 PM Bug #18121 (Feedback): addr2line.c: Endianness
- A patch is attached to partially fix endianness issues in `addr2line.c`.
It would be more desirable if we could get endianness from ELF format, though. -
05:05 PM Bug #18120 (Closed): Deadlock and segfault when using autoload in Ractor
- The following scripts with autoload causes Ractor to report a deadlock and segfault (tested on Ubuntu 20.04 and macOS 11.5.2):
```ruby
# test.rb
module Foo
autoload :Bar, "#{File.dirname(__FILE__)}/test2"
def self.run
w... -
04:42 PM Feature #18083: Capture error in ensure block.
- I think use-cases needing separate cleanups whether there is a Ruby exception or "normal execution or non-local control flow" will always be ugly, fundamentally because they do something hacky and approximative:
the exception that happe... -
09:57 AM Feature #18083: Capture error in ensure block.
- @matz I agree with your general feeling completely. But it's too late: We already have "ugly and against the basic concept of ensure" in the form of `$!`. As demonstrated, people are checking `$!` and unfortunately, in general code, it i...
-
08:19 AM Feature #18083: Capture error in ensure block.
- I hesitate to enhance `ensure`. It's ugly and against the basic concept of `ensure`.
The `ensure` behavior was taken from `unwind-protect` macro of Lisp, and it does not distinguish between error execution and normal execution. If you c... -
08:04 AM Feature #18083: Capture error in ensure block.
- We want to make it easy for people to write robust Ruby programs, even if there is failure. As discussed in <https://bugs.ruby-lang.org/issues/15567> there are some tricky edge cases when using `$!` because it's non-local state. As an ex...
-
01:00 AM Feature #18083: Capture error in ensure block.
- Your proposed "shorter and easier to understand" implementation is actually incorrect:
```
def transaction1
begin
yield
rescue Exception => error
ensure
if error
puts "abort"
else
puts "commit"
... -
12:51 AM Feature #18083: Capture error in ensure block.
- > Ruby already has too many features for exceptional flow control. Adding more stuff that makes this even more complicated doesn't look like an improvement of the language. (Go To Statement Considered Harmful, anybody?)
We are not imp... -
12:45 AM Feature #18083: Capture error in ensure block.
- Eregon (Benoit Daloze) wrote in #note-3:
> If you only need to know if there is an `Exception` this seems easier:
> ...
What about
```ruby
begin
...
rescue Exception
transaction.abort
else
transaction.commit
end
```
It ... -
03:00 PM Feature #12075: some container#nonempty?
- I’m not entirely sure we need a new method for this, because we could always use `ary.size.nonzero?` or `ary.size.positive?`. It is also possible to tell the difference between an empty vs non-empty array with `[nil].any? { true }` and `...
-
06:57 AM Feature #12075: some container#nonempty?
- duerst (Martin Dürst) wrote in #note-28:
> I agree with @gotoken that `filled?` is confusing.
Yes, it might be confusing when you have an array like: `Array.new(3) # => [nil, nil, nil]`
Is it filled or only if all nils are replaced wit... -
12:54 AM Feature #12075: some container#nonempty?
- sawa (Tsuyoshi Sawada) wrote in #note-27:
> I think `filled?` is a perfect method name.
I agree with @gotoken that `filled?` is confusing. -
01:23 PM Bug #18119 (Closed): Ractor crashes when instantiating classes
- The following script crashes with a segfault (tested on Ubuntu 20.04 and macOS 11.5.2):
```ruby
workers = (0...8).map do
Ractor.new do
loop do
100.times.map { Class.new }
Ractor.yield nil
end
end
end
... -
01:18 PM Bug #14744: Refinements modules have a superclass
- @matz Should `instance_method` and other methods magically find the method on the refined class, even though `self` is a Module though, like in https://bugs.ruby-lang.org/issues/14744#note-3 ?
-
07:41 AM Bug #14744 (Assigned): Refinements modules have a superclass
-
07:28 AM Bug #14744: Refinements modules have a superclass
- I am so sorry for being late.
I agree with @shugo's opinion in #note-2. We should hide `Array` in the example.
Matz.
-
12:52 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
- Nothing strange found in `.debug_abbrev`, either.
A patch is attached to help ease debugging. -
04:50 AM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
- I have recreated and reuploaded the tarball. Same URL should work.
-
10:08 AM Bug #18118 (Closed): Error compiling ruby 2.7.0: pure_parser.rb:25:in `gets': Can't do inplace edit without backup (fatal)
- Fixed by commit:05485868cbd1e7a59063d5b4be2ee2313ac9fa25.
-
04:26 AM Bug #18118 (Closed): Error compiling ruby 2.7.0: pure_parser.rb:25:in `gets': Can't do inplace edit without backup (fatal)
- I get an error when compiling ruby from https://github.com/ruby/ruby
### Environment
VS2015 x64 x86 compatible tool command prompt
ruby 2.5.0
```
E:\ruby>win32\configure.bat
Creating verconf.mk
Creating Makefile.new
"type `nmak... -
08:44 AM Revision 6963f8f7 (git): Remove old warning aged nearly 8 years
-
08:39 AM Bug #18077: Marshal.dump(closed_io) raises IOError instead of TypeError
- @eregon This was my first though as well, but the current behavior is already defined in ruby-spec.
I would prefer the behavioral change of `IO#(in|ex)ternal_encoding` being usable on closed IOs and prepared a PR: https://github.com/r... -
08:20 AM Bug #18077: Marshal.dump(closed_io) raises IOError instead of TypeError
- I don't have any strong opinion but @eregon's approach looks a bit better.
-
08:28 AM Revision f96c1994 (git): Fix test failure on spec/ruby/language/pattern_matching_spec.rb
- https://github.com/ruby/ruby/runs/3369486308
-
08:11 AM Feature #16182 (Closed): Should `expr in a, b, c` be allowed or not?
- Applied in changeset commit:git|ecb6d6a4ef058b5598a7633c3921eeab08ce11c6.
----------
Allow omission of parentheses in one line pattern matching [Feature #16182] -
07:32 AM Feature #16182: Should `expr in a, b, c` be allowed or not?
- I agree with allowing to omit parentheses in the pattern.
Matz.
-
08:07 AM Revision ecb6d6a4 (git): Allow omission of parentheses in one line pattern matching [Feature #16182]
-
07:26 AM Feature #10917: Add GC.stat[:total_time] when GC profiling enabled
- `GC::Profiler` is not maintained well and it doesn't calculate all of GC time now.
I rework it using `clock_gettime` (so it only works on some platforms).
https://github.com/ruby/ruby/pull/4757
```ruby
pooled = Array.new(100_000){ [] }... -
06:36 AM Feature #10917: Add GC.stat[:total_time] when GC profiling enabled
- I agree. Need to consider performance cost.
Matz.
-
07:18 AM Bug #15404 (Rejected): Endless range has inconsistent chaining behaviour
- I think it's OK to keep the current behavior. `1.. ..2` looks weird, I agree, but don't need to be a syntax error.
Matz.
-
07:11 AM Bug #16889: TracePoint.enable { ... } also activates the TracePoint for other threads, even outside the block
- Eregon (Benoit Daloze) wrote in #note-11:
> Actually thread-local might not be enough, we'd probably want Fiber local, i.e., events which are on the same execution stack and contain that enable block call on the stack.
> ...
Just now, ... -
07:10 AM Revision 00d66f7e (git): Hard-link executable files to mae runnable
- As `$ORIGIN` on Linux is refered from the real path of the
executable file, symbolic linked executable file cannot work. -
07:05 AM Bug #18036: Pthread fibers become invalid on fork - different from normal fibers.
- Thanks @matz. @ko1, on my PC, the following program segfaults. I tried it on 2.7 and 3 (head).
~~~ ruby
require 'fiber'
fiber = Fiber.new do
while true
puts "Hello World"
fork
Fiber.yield
end
end
fiber.resume
puts "Exi... -
06:57 AM Bug #18036: Pthread fibers become invalid on fork - different from normal fibers.
- Using fork from within non-main fibers should be prohibited only on architectures where it is unreliable (e.g. OpenBSD).
Matz.
-
06:47 AM Revision 600d0f78 (git): Bump patchlevel.
-
06:46 AM Revision c7587561 (git): Bundle RBS 1.4.0 & typeprof 0.15.2 (#4753)
- * Bundle RBS 1.4.0
* Bundle typeprof 0.15.2 -
06:46 AM Revision 40057630 (git): Update TypeProf to 0.15.1
-
06:46 AM Revision 37f82437 (git): Merge RubyGems 3.2.26 and Bundler 2.2.26
-
06:46 AM Revision 41a28637 (git): Merge RubyGems 3.2.25 and Bundler 2.2.25
-
06:46 AM Revision 679185d6 (git): Merge RubyGems 3.2.24 and Bundler 2.2.24
-
06:46 AM Revision f1039afa (git): Merge RubyGems 3.2.23 and Bundler 2.2.23
- 06:46 AM Revision 4469c4e4 (git): * 2021-08-19 [ci skip]
-
06:45 AM Revision ca8f73ef (git): Revert "merge revision(s) 164f50dea918e7019847f578c3cffb079993d626,1985a3a77fac64cda177c74113a9348e36233630:"
- This reverts commit 09d90c0ed861e74e58a59bc413bc39bcf9775db8.
-
06:08 AM Revision 09d90c0e (git): merge revision(s) 164f50dea918e7019847f578c3cffb079993d626,1985a3a77fac64cda177c74113a9348e36233630:
- Update TypeProf to 0.15.1
---
.github/workflows/ubuntu.yml | 2 +-
gems/bundled_gems | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Bundle RBS 1.4.0 & typeprof 0.15.2 (#4753... -
04:35 AM Misc #18039: DevelopersMeeting20210819Japan
- * [Bug #18077] `Marshal.dump(closed_io)` raises `IOError` instead of `TypeError` (nobu)
* `Marshal.dump` is expected to raise a `TypeError` for unmarshallable objects. But closed streams raise an `IOError` -
04:05 AM Bug #17202: Backport for Apple Silicon
- CI of snapshot-ruby_2_6 failed on macos-11.
It seems this issue is related.
Because nobu says
https://github.com/ruby/ruby/commit/cdef17096c03099f17ecf0af51f43faa0944f96d and
https://github.com/ruby/ruby/commit/b7d86e330c76b4f9615... - 02:33 AM Revision e20e97b4 (git): * 2021-08-19 [ci skip]
-
02:33 AM Revision 1985a3a7 (git): Bundle RBS 1.4.0 & typeprof 0.15.2 (#4753)
- * Bundle RBS 1.4.0
* Bundle typeprof 0.15.2
08/18/2021
-
11:04 PM Feature #18083: Capture error in ensure block.
- There are lots of ways to achieve this but the reality is there is a lot of code which uses `$!` in the ensure block which is incorrect for the reasons already explained.
Your proposed ideas are fine, except that RuboCop will warn you a... -
05:09 PM Feature #18083: Capture error in ensure block.
- If you only need to know if there is an `Exception` this seems easier:
Using the example from https://bugs.ruby-lang.org/issues/15567#note-27
```ruby
begin
...
rescue Exception => exception
transaction.abort
raise exception
ensure
... -
05:04 PM Feature #18083: Capture error in ensure block.
- The second snippet seems clear, the first one much less.
In what cases `error` is set? If it's a StandardError? If it's an Exception? If it's any kind of "Ruby exception"?
IMHO this pattern is rarely enough needed that the second sni... -
03:09 AM Feature #18083: Capture error in ensure block.
- By the way, perhaps we should consider deprecating `$!` since its usage can lead to incorrect behaviour.
-
03:03 AM Feature #18083 (Open): Capture error in ensure block.
- As discussed in https://bugs.ruby-lang.org/issues/15567 there are some tricky edge cases.
As a general model, something like the following would be incredibly useful:
``` ruby
begin
...
ensure => error
pp "error occurred" if... -
09:29 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
- vo.x (Vit Ondruch) wrote in #note-22:
> The dumps should be available here: https://vondruch.fedorapeople.org/objdump.tar.gz
I'm afraid that this contains only `.debug_info` and not `.debug_abbrev`.
It seems that `objdump` can dum... -
08:19 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
- xtkoba (Tee KOBAYASHI) wrote in #note-21:
> Isn't it possible that either section is broken?
Well, it should be DWARF5, which is pretty recent and on ppc64le, so there might be some surprises ...
> ...
The dumps should be availabl... -
06:08 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
- The message
```
1267: Abbrev Number 106 not found
```
means that `addr2line.c` could not find an abbrev table entry in `.debug_abbrev` referenced from `.debug_info`. Isn't it possible that either section is broken?
It might be... -
05:34 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
- The result with the latest patch is significantly different:
~~~
$ gdb --args ./miniruby -e'Process.kill("SIGSEGV",$$)'
GNU gdb (GDB) Fedora 10.2-6.fc35
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL ver... -
09:06 PM Bug #17823: addr2line.c: Interpret `DW_RLE_start_length`
- An edited patch is attached so that it applies cleanly to the current master head.
-
08:44 PM Bug #18117 (Closed): Segmentation fault when yielding values from Ractors during GC sweeping
- [Link for GitHub PR containing the fix](https://github.com/ruby/ruby/pull/4755)
Ractors may invoke `rb_objspace_reachable_objects_from` when yielding values back to the main-Ractor. If this occurs during a sweeping pass of the GC, the... -
04:51 PM Bug #18077: Marshal.dump(closed_io) raises IOError instead of TypeError
- Why does IO#internal_encoding (and external_encoding) raise if the IO is closed?
They could just return the encoding, it's still stored in in the IO instance, and we are not trying to access the `fd`, right?
JRuby 9.2.17.0 does not r... -
03:14 PM Bug #18077: Marshal.dump(closed_io) raises IOError instead of TypeError
- https://github.com/ruby/ruby/pull/4749 is another fix without the above side effect. Is it OK?
-
02:25 PM Feature #12075: some container#nonempty?
- p8 (Petrik de Heus) wrote in #note-25:
> What about `ary.filled?` ?
> ...
I think `filled?` is a perfect method name. You nailed it.
Or, if you are going with past participles, perhaps `loaded?` may also work. -
01:21 PM Feature #12075: some container#nonempty?
- Boolean `size?` looks good to me. I vote for it.
My first choice was `nonempty?` because this is very common word in popular algorithm text books, e.g., Knuth, Cormen, Sedgewick, Tarjan, Aho, Hopcroft, etc.
However some people pointed ... -
12:37 PM Revision 0b7969b6 (git): Silence LoadError only if it is for `rubygems` itself
- Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org> -
09:24 AM Revision d668cd18 (git): rb_fix2uint should use FIXNUM_NEGATIVE_P
- rb_num_negative_int_p is equivalent to calling the "<" method on
Integer (and checking whether it is overridden), where in this case we
are interested in whether the "actual" value can fit inside an unsigned
int.
This also was slow beca... -
09:18 AM Bug #18084 (Closed): `JSON.dump` can crash VM.
- Applied in changeset commit:git|574f3af36ea008896419d2e2407f8fce83bdcd2e.
----------
Rewind execution tags more at stack overflow [Bug #18084] -
05:38 AM Bug #18084: `JSON.dump` can crash VM.
- https://github.com/ruby/ruby/pull/4751
-
04:20 AM Bug #18084: `JSON.dump` can crash VM.
- @nobu suggested the following code could be updated:
~~~ clang
sigill(int sig SIGINFO_ARG)
{
check_reserved_signal("ILL");
#if defined __APPLE__
CHECK_STACK_OVERFLOW();
#endif
~~~
we could also do this on Linux? -
04:17 AM Bug #18084: `JSON.dump` can crash VM.
- Minor improvement to formatting.
-
04:17 AM Bug #18084 (Closed): `JSON.dump` can crash VM.
- ~~~ ruby
require 'json'
x = {}; x[:x] = x
JSON.dump(x) # => nil
JSON.dump(x) # => SIGILL
~~~
Results from our friendly all ruby bot:
~~~
:x: 1.8
-:1:in `require': no such file to load -- json (LoadError)
from -:1
e... -
08:23 AM Revision 95e7aed8 (git): SIGILL can raise at stack overflow on Linux too [Bug #18084]
-
08:23 AM Revision 574f3af3 (git): Rewind execution tags more at stack overflow [Bug #18084]
-
04:18 AM Bug #5808: "a = []; a << a; puts JSON.dump(a)" aborted
- https://bugs.ruby-lang.org/issues/18084 maybe regression.
-
03:08 AM Misc #18039: DevelopersMeeting20210819Japan
- - [Feature #18083] Capture error in ensure block.
- Is it acceptable? -
03:00 AM Feature #15567 (Rejected): Allow ensure to match specific situations
- I will make a more limited proposal.
08/17/2021
-
10:55 PM Bug #16906: Calling Thread#thread_variable? in IRB sometimes produce wrong result
- This needs to be backported to 2.7.x. It wasn't fixed in 2.7.4.
-
05:39 PM Bug #18076: ext/digest/md5/md5.c: `-Wnull-pointer-subtraction` warning by Clang 13
- Proposed patch:
```diff
--- a/ext/digest/md5/md5.c
+++ b/ext/digest/md5/md5.c
@@ -225,7 +225,7 @@
uint32_t xbuf[16];
const uint32_t *X;
- if (!((data - (const uint8_t *)0) & 3)) {
+ if (!(((uintptr_t)data) & ... -
05:25 PM Revision 58bd9434 (git): Replace f_boolcast with RBOOL macro
- * Move f_boolcast definination
* Remove f_boolcast macro defination
* to -
04:26 PM Misc #18082 (Open): FileUtils.remove_entry_secure has inconsistent document
- `FileUtils.remove_entry_secure` and `FileUtils.rm_r` have inconsistency about the vulnerability condition the in the documentations.
`remove_entry_secure` document:
https://github.com/ruby/ruby/blob/6a9bfa4d9387b9d8f07f43f4546437be57... - 03:00 PM Revision 6a9bfa4d (git): * 2021-08-18 [ci skip]
-
02:16 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
- FWIW, another bug is found in `addr2line.c` (#18081), which I believe is irrevant to the issue here, though.
-
10:06 AM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
- A revised patch (from #note-17) is attached so that `abbrev_number >= 256` is handled properly, although it might be practically not going to happen.
-
07:52 AM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
- It turns out that `di_read_debug_abbrev_cu` in `addr2line.c` does not work correctly when `abbrev_number` is not aligned in ascending order for each CU entry of `.debug_abbrev`. A patch is attached to fix this.
Note again that I canno... -
02:09 PM Bug #18081 (Feedback): addr2line.c: Wrong section for `DW_AT_ranges`
- When both `.debug_rnglists` and `.debug_ranges` sections exist, `DW_AT_ranges` can refer to a wrong section, potentially causing a segmentation fault.
`DW_AT_ranges` should refer to `.debug_rnglists` for DWARF version 5, and `.debug_r... -
01:57 PM Revision 36ae44ce (git): [ruby/date] Update zonetab.h at 2021-08-11
- https://github.com/ruby/date/commit/de7dca353f
- 12:44 PM Revision 48145282 (git): [DOC] Fix the rdoc for File::Stat#size? [ci skip]
-
09:45 AM Revision edf01d4e (git): Treat NULL fake string as an empty string
- And the NULL string must be of size 0.
-
09:29 AM Bug #18007: Help developers of C extensions meet requirements in "doc/extension.rdoc"
- Eregon (Benoit Daloze) wrote in #note-7:
> I'm confused, why does `Class#allocate` not simply use the alloc function set with `rb_define_alloc_func`?
You're confused by `Class#allocate` which calls the allocator set for each `T_DATA`... -
08:25 AM Bug #18007: Help developers of C extensions meet requirements in "doc/extension.rdoc"
- I'm confused, why does `Class#allocate` not simply use the alloc function set with `rb_define_alloc_func`?
Then there would be no need to undefine/redefine allocate, isn't it?
(IMHO users should never call `allocate` directly because... -
06:44 AM Bug #18007: Help developers of C extensions meet requirements in "doc/extension.rdoc"
- mame (Yusuke Endoh) wrote in #note-5:
> How about raising an exception when attempting to allocate a `T_DATA` object with the default allocator?
Though I agreed it once, no way to tell if the given class is `T_DATA` in the default al... -
06:01 AM Bug #18007: Help developers of C extensions meet requirements in "doc/extension.rdoc"
- How about raising an exception when attempting to allocate a `T_DATA` object with the default allocator?
-
08:16 AM Bug #16889: TracePoint.enable { ... } also activates the TracePoint for other threads, even outside the block
- Actually thread-local might not be enough, we'd probably want Fiber local, i.e., events which are on the same execution stack and contain that enable block call on the stack.
Is there any way to have a TracePoint for a particular Fiber? -
08:12 AM Bug #16889: TracePoint.enable { ... } also activates the TracePoint for other threads, even outside the block
- mame (Yusuke Endoh) wrote in #note-7:
> Note that the second `trace.enable` does not print `#<TracePoint:line t.rb:4 in 'foo'>`.
A very good point, that I thought about when talking a bit with Koichi about this, some time before fili... -
05:24 AM Bug #16889: TracePoint.enable { ... } also activates the TracePoint for other threads, even outside the block
- mame (Yusuke Endoh) wrote in #note-7:
> `TracePoint#enable(target: :block)` does not follow events in a called method. Is this really intentional?
> ...
This matches the behavior of passing the block explicitly and using it as the targ... -
05:19 AM Bug #16889: TracePoint.enable { ... } also activates the TracePoint for other threads, even outside the block
- +1 for Jeremy #6.
I also agree `TP#enable{ ... }` should be thread-local without any options, but I don't think it is valuable to change the default behaver (break compatibility). -
05:09 AM Bug #16889: TracePoint.enable { ... } also activates the TracePoint for other threads, even outside the block
- `TracePoint#enable(target: :block)` does not follow events in a called method. Is this really intentional?
```
trace = TracePoint.new(:line) {|tp| p tp }
def foo
1
end
trace.enable do
foo
end
#=>
# #<TracePoint:line t... -
08:15 AM Feature #17750 (Closed): Update Unicode data to Unicode Version 13.0.0
- Closed (finally) with revision 21fd83a823.
-
08:08 AM Revision 21fd83a8 (git): Mention update to Unicode Version 13.0.0 and Emoji Version 13.1
- Mention the update to Unicode Version 13.0.0 and Unicode Emoji
Version 13.1 in NEWS.md. This completes issue #17750. [ci skip] -
07:44 AM Bug #18027 (Closed): test/ruby/enc/test_emoji_breaks.rb does not use the file emoji-variation-sequences.txt
- Resolved with commit fd7f61c.
It turned out the problem was that in emoji-variation-sequences.txt, lines look like
`0023 FE0E ; text style ; # (1.1) NUMBER SIGN`
whereas in the other two files that we processed the same... -
06:45 AM Bug #18027: test/ruby/enc/test_emoji_breaks.rb does not use the file emoji-variation-sequences.txt
- duerst (Martin Dürst) wrote:
> In particular, I'm a `puts` debugger, but `puts` debugging doesn't seem to work well when testing.
I found that adding and using the following method in the Test... class allowed me to use `log_test` ... - 07:30 AM Revision de764ae8 (git): * 2021-08-17 [ci skip]
-
07:16 AM Bug #13864: Rinda multicast test failures due to missing default route
- Thx for looking into this. I just wanted to point out that this has low importance for me, since the default route was added in mock: https://github.com/rpm-software-management/mock/commit/a1a3ddaa41c0a2b5d17b004bdf3b87a1337eaecc
-
07:03 AM Revision fd7f61cf (git): Take into account data in emoji-variation-sequences.txt in tests.
- The emoji data in emoji-variation-sequences.txt was not used for
in test/ruby/enc/test_emoji_breaks.rb, for unknown reasons.
It turned out that the format of each of the emoji data/test files
is slightly different, and that we didn't tak... -
05:54 AM Bug #18080 (Open): Syntax error on one-line pattern matching
- One line pattern matching with a method return value with parameters which are not surrounded by parenthesis raises syntax error.
I think it is not intentional, but nobu said it's hard to support because of parse.y limitation.
```r... -
05:43 AM Feature #12075: some container#nonempty?
- What about `ary.filled?` ?
It nicely pairs with empty and is not too long.
It’s also a property of the container. And unlike `full?`, it doesn’t imply there is no more room. -
02:31 AM Feature #12075: some container#nonempty?
- I tend to like `ary.size > 0` more than `!ary.empty?` because the former literally has a "positive" nuance and therefore it's more readable in many cases. In that sense, the name `nonempty?` does not sound ideal to me.
So, I came up wi... -
03:52 AM Bug #18079 (Closed): [PATCH] make error for MinGW with Clang/LLVM + LLD
- ```
building spec/ruby/optional/capi/ext/array_spec.so
lld-link: error: x64-ucrt-ruby310.dll: bad file type. Did you specify a DLL instead of an import library?
clang-13: error: linker command failed with exit code 1 (use -v to see in...