Activity
From 03/28/2021 to 04/03/2021
04/03/2021
-
02:17 PM Feature #5446: at_fork callback API
- > Could this `at_exit` proposal be considered again?
Sorry, I meant `at_fork` -
02:16 PM Feature #5446: at_fork callback API
- Could this `at_exit` proposal be considered again? I understand and agree that in theory libraries needed to protect against forks should expose a `after_fork` method to be called after forking, and that it's the users's responsibility t...
-
12:33 PM Bug #17728: [BUG] Segmentation fault at 0x0000000000000000
- I've been working with the `ruby_3_0` branch daily since Mar. 29 and have not experienced the `:define_method` crash reported here, or any other issues.
It appears that whatever issue was causing the `:define_method` crash in the 3.0 ... -
11:22 AM Revision 47abb702 (git): [ruby/reline] Use vterm 0.0.5 or newer on Unix like OSes because suppresses SEGV
- https://github.com/ruby/reline/commit/7562cf3b5f
-
11:21 AM Revision 281c6f50 (git): [ruby/irb] Use vterm 0.0.5 or newer on Unix like OSes because suppresses SEGV
- https://github.com/ruby/irb/commit/b034bd22b0
-
11:21 AM Revision f0793181 (git): [ruby/irb] Use yamatanooroti gem for tests
- https://github.com/ruby/irb/commit/f053f49c29
- 09:27 AM Revision 0d8c9a7f (git): * 2021-04-03 [ci skip]
-
09:26 AM Revision cafa7904 (git): Backport lib/reline, and lib/irb for 3.0.1 4th (#4349)
- * [ruby/irb] Update help message for next context-mode of 4
While here, fixing tab/space issues in help message, and sync
rdoc for IRB class to match the help message.
https://github.com/ruby/irb/commit/ef8e3901cc
* [ruby/irb] Do not ... -
05:53 AM Bug #17767: `Cloned ENV` inconsistently returns `ENV` or `self`
- jeremyevans0 (Jeremy Evans) wrote in #note-1:
> I don't think it makes sense to have cloned ENV objects.
It feels reasonable. -
05:45 AM Revision 6b906ad5 (git): [Doc] Link to doc/contributing.rdoc from CONTRIBUTING.md (#4266)
- * [Doc] Link to doc/contributing.rdoc from CONTRIBUTING.md
[ci skip]
* [Doc] Add path prefix `doc/`
https://github.com/ruby/ruby/pull/4266#discussion_r598220279
* [Doc] Prefer relative path in CONTRIBUTING.md
This patch by nobu (Nob...
04/02/2021
-
11:57 PM Misc #17734: DevelopersMeeting20210416Japan
- * [Feature #17749] Add `Module#source_location`
* It's similar to the const_source_location feature, but easier to use when you don't know the constant name, or enclosing const
* This is useful for debugging
* [Feature #17753]... -
10:13 PM Misc #17734: DevelopersMeeting20210416Japan
- * [Bug #17398] SyntaxError in endless method (jeremyevans0)
* I don't believe this is a bug, but maybe it is a useful feature.
* @mame has a patch that allows commands as the RHS of a endless method.
* However, @mame's patch doe... -
09:41 PM Misc #17733 (Closed): Add peterzhu2118 as a committer
-
09:39 PM Bug #17767: `Cloned ENV` inconsistently returns `ENV` or `self`
- I don't think it makes sense to have cloned ENV objects. I propose the following behavior:
* `ENV.dup`/`ENV.clone`/`ENV.clone(freeze: nil)`/`ENV.clone(freeze: false)` should return `ENV`, since the same singleton storage is used (the... -
08:53 PM Bug #17770 (Third Party's Issue): Assets precompilation aborts with Segmentation fault
- This does appear to be a sassc bug: https://github.com/sass/sassc-ruby/issues/207
-
07:42 PM Feature #17472: HashWithIndifferentAccess like Hash extension
- And people should likely recall the reasons for the existence of symbols and strings. Originally strings were very expensive and not deduplicated, but were garbage collected. While symbols were very cheap, deduplicated and frozen and n...
-
07:34 PM Feature #17472: HashWithIndifferentAccess like Hash extension
- Any implementation should probably consider recursive structures under arrays and all the mutator methods on Array:
``` ruby
% pry
[1] pry(main)> require 'active_support/hash_with_indifferent_access'
=> true
[2] pry(main)> test = ... -
02:13 PM Feature #17472: HashWithIndifferentAccess like Hash extension
- lamont (Lamont Granquist) wrote in #note-24:
> Although I really need to be able to inherit from the class and wrap convert_key/convert_value and it would be useful to have a private regular_writer/regular_update bypass (for performance... -
01:45 PM Feature #17472: HashWithIndifferentAccess like Hash extension
- sawa (Tsuyoshi Sawada) wrote in #note-25:
> I am surprised and am sad that so many of the core developers are positive on this.
Why? I understand you passionately disagree with this. But it could be the people having a problem with h... -
04:11 AM Feature #17472: HashWithIndifferentAccess like Hash extension
- I am surprised and am sad that so many of the core developers are positive on this.
-
04:28 PM Revision 8a4472fb (git): [ruby/reline] Version 0.2.5
- https://github.com/ruby/reline/commit/22ce5651e5
-
04:25 PM Revision 3ffb0447 (git): [ruby/irb] Version 1.3.5
- https://github.com/ruby/irb/commit/22e2ddf715
-
04:22 PM Revision 64b991b0 (git): [ruby/rdoc] Links to document texts without "rdoc-ref:" prefix
- While links to generated HTML from RDoc file needs to be prefixed
by "rdoc-ref:" currently, in case of explicit references this
seems just redundant.
Also GitHub RDoc support does not work with this prefix.
This patch lets links to suc... -
04:22 PM Revision a6948329 (git): [ruby/rdoc] Clarify that dots in URL are replaced
- The dots in all path components from the document root are
replaced with underscores, not only in the basename.
https://github.com/ruby/rdoc/commit/7a3417ea4c -
04:21 PM Revision 61e1cf23 (git): [ruby/rdoc] Treat emphasis tags as excluding other notations
- And exclusive notations don't exclude other exclusive notations.
https://github.com/ruby/rdoc/commit/b8baa9a435 -
04:21 PM Revision e84d275f (git): [ruby/rdoc] Treat other tags as word boundaries
- https://github.com/ruby/rdoc/commit/8222f85a17
-
04:21 PM Revision 54aa11ef (git): [ruby/rdoc] Disable other notations in <code> tags
- https://github.com/ruby/rdoc/commit/0cd3b55210
-
04:17 PM Revision ab89c45b (git): [ruby/irb] Evaluate each toplevel statement
- https://github.com/ruby/irb/commit/bc1b1d8bc3
-
04:15 PM Revision 254cd937 (git): [ruby/irb] Add test for multiline paste
- https://github.com/ruby/irb/commit/e93c9cb54d
-
04:14 PM Revision 0eb14919 (git): [ruby/irb] Add yamatanooroti test example
- https://github.com/ruby/irb/commit/279155fcee
- 03:49 PM Revision 9de00864 (git): * 2021-04-03 [ci skip]
- 03:49 PM Revision 3cab8c08 (git): [ruby/irb] process multi-line pastes as a single entity
- this allows pasting leading-dot chained methods correctly:
```ruby
class A
def a; self; end
def b; true; end
end
a = A.new
a
.a
.b
```
will properly return `true` instead of erroring on the `.a` line:
```
irb(main):001:1* ... -
03:39 PM Feature #17773: Alias `Numeric#zero?` and `Float#zero?` as `Numeric#empty?` and `Float#empty?`
- An example of using `-1` as a default-ish integer value is to indicate "item not found" in a C-like language (see https://en.wikipedia.org/wiki/Sentinel_value).
The following example seems to suggest that Ruby treats `0` as a default-... -
02:40 PM Feature #17773: Alias `Numeric#zero?` and `Float#zero?` as `Numeric#empty?` and `Float#empty?`
- You may be right that zero is not (the only) special (element). In fact, one is the unit element for multiplication whereas zero is the unit element for addition. But still, addition is the first operation, and is more prominent than mul...
-
10:09 AM Feature #17773: Alias `Numeric#zero?` and `Float#zero?` as `Numeric#empty?` and `Float#empty?`
- Same feeling here, empty? should be reserved for collections with elements.
Input fields from a website are always Strings initially, and should be checked as Strings (e.g., input.strip.empty?) for provided/not-provided.
The user mig... -
07:21 AM Feature #17773: Alias `Numeric#zero?` and `Float#zero?` as `Numeric#empty?` and `Float#empty?`
- I'm also against this proposal.
I do not believe that there are many cases where one checks for `.zero?` || `.empty?`. Note that `nil` nor `false` implement either.
If you need something like `blank?` or `trivial?` or similar, refi... -
06:21 AM Feature #17773: Alias `Numeric#zero?` and `Float#zero?` as `Numeric#empty?` and `Float#empty?`
- I don't think these aliases are useful for most cases so it is inappropriate as a default-provided feature.
I agree there are cases that zero means empty, but there are also cases that -1 or other numbers mean empty. I don't think the z... -
05:42 AM Feature #17773: Alias `Numeric#zero?` and `Float#zero?` as `Numeric#empty?` and `Float#empty?`
- jeremyevans0 (Jeremy Evans) wrote in #note-2:
> If you are checking for user input, aliasing `zero?` to `empty?` seems wrong, as `0` is a valid non-empty user input.
I do not understand what you exactly mean by 0 is valid. But presumabl... -
05:23 AM Feature #17773: Alias `Numeric#zero?` and `Float#zero?` as `Numeric#empty?` and `Float#empty?`
- jeremyevans0 (Jeremy Evans) wrote in #note-2:
> Can you provide a reference to a set theoretic definition of the number 0 as the empty set?
Here is a Wikipedia article:
https://en.wikipedia.org/wiki/Set-theoretic_definition_of_nat... -
04:24 AM Feature #17773: Alias `Numeric#zero?` and `Float#zero?` as `Numeric#empty?` and `Float#empty?`
- I'm against this. `empty?` exists on collection classes, and numbers are not collections, nor sets. Can you provide a reference to a set theoretic definition of the number 0 as the empty set? Even if so, most Ruby programmers are not w...
-
03:49 AM Feature #17773 (Open): Alias `Numeric#zero?` and `Float#zero?` as `Numeric#empty?` and `Float#empty?`
- When dealing with user input fields as in web applications, there are typical values that we want to consider as the default and/or absence of user input. For string/text inputs, list items, and attributes, we have `String#empty?`, `Arra...
-
02:49 PM Feature #17771: String#start_with? should not construct MatchData or set $~
- I also believe it is unintended behavior and should be removed.
-
10:28 AM Feature #17771: String#start_with? should not construct MatchData or set $~
- I don't think there is a rule that predicate methods only return a boolean and never set `$~`.
It is the case for `String#match` vs `String#match?`, but it doesn't mean it holds for other Regexp methods.
I see it a bit like the use of ... -
02:21 PM Bug #17772: Performance issue with NameError message in context with large instance variables (not caused by did_you_mean)
- The slowness is caused by a large amount of allocations required to build the error message. Consider the following script:
```ruby
class Environment
def run
@data = (1..5_000_000).to_h {|x| [x, x]}
trigger_name_error
... -
12:13 PM Feature #17768 (Rejected): Proposal: Downward assignments
- I think April 1st ended in the world. I hope you enjoyed it!
-
11:31 AM Bug #17746: Backport f9f13a4f6d8be706b17efc089c28f7bc617ef549 to Ruby 3.0
- ruby_3_0 0315e1e5ca0722f9dffeae70b860c19de303e339 merged revision(s) f9f13a4f6d8be706b17efc089c28f7bc617ef549.
-
11:31 AM Bug #17732: rb_enc_interned_str crashes if called with a not yet loaded encoding
- ruby_3_0 4e2738f477b5343a0d48a400c975220fed123c9b merged revision(s) 7e8a9af9db42a21f6a1125a29e98c45ff9d5833b.
-
11:31 AM Bug #17754: NoMethodError#to_s makes segmentation fault when Module#name returns non string value
- ruby_3_0 6abb8ee711a941b7ad31d21fdb429750f7ea4463 merged revision(s) 0a544c0c35f7445d69402d7c53d825384c728017.
-
10:55 AM Bug #16651: Extensions Do Not Compile on Mingw64 with mingw32-make
- This issue is related to commit commit:389157d8cfab7b6e84cdcdb2863421bd2c93bd7f, which merged the patch posted as [[ruby-core:21448]](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/21448). The description of the patch reads ...
-
08:45 AM Bug #16651: Extensions Do Not Compile on Mingw64 with mingw32-make
- When running msys2 (ie, in an open console) the /c/ notation does work.
But it does not work in makefiles processed by mingw64. If you look at the makefiles that extconf.rb generates, they use paths like c:/abc/def *except* for this o... -
08:41 AM Bug #17643: Ruby 3 embedded - no GC methods?
- Screenshot
-
08:39 AM Bug #17643: Ruby 3 embedded - no GC methods?
- @nobu - Sorry that I missed your feedback.
I updated the code to call ruby_options, but that just hangs the interpreter. It thinks it is going to run a ruby script, but that is not correct. I have attached a screenshot of the call sta... -
08:33 AM Revision 7e939174 (git): [ruby/reline] Reset @rest_height when clear screen
- https://github.com/ruby/reline/commit/3a7019b0d5
-
07:40 AM Revision 9e336f73 (git): [ruby/irb] Add show_source command
- https://github.com/ruby/irb/commit/108cb04352
-
07:09 AM Revision 6abb8ee7 (git): merge revision(s) 0a544c0c35f7445d69402d7c53d825384c728017: [Backport #17754]
- Fix segmentation fault when `Module#name` returns non string value
[Bug #17754]
* Add test for NoMethodError#to_s does not segfault
* Ensure no segfault even if Module#name is overridden
---
er... -
07:08 AM Revision 0315e1e5 (git): merge revision(s) f9f13a4f6d8be706b17efc089c28f7bc617ef549: [Backport #17746]
- Ensure that caller respects the start argument
Previously, if there were ignored frames (iseq without pc), we could
go beyond the requested start frame. This has two changes:
1) Ensure that we don't look beyond... -
07:06 AM Revision 4e2738f4 (git): merge revision(s) 7e8a9af9db42a21f6a1125a29e98c45ff9d5833b: [Backport #17732]
- rb_enc_interned_str: handle autoloaded encodings
If called with an autoloaded encoding that was not yet
initialized, `rb_enc_interned_str` would crash with
a NULL pointer exception.
See: https://github.c... -
07:01 AM Bug #17729: Fix infinite loop when parsing RUBYLIB with locale-invalid bytes
- ruby_3_0 1a47de64f44da6d4339ba8b2c5220eeaba82954c merged revision(s) f748b911c9157a0bb86f38280ddfba72a55049b6.
-
07:01 AM Bug #17519: set_visibility fails when a prepended module and a refinement both exist
- ruby_3_0 d1cec0bca588266b9af1d55e592016c45ee68fbb merged revision(s) 58660e943488778563b9e41005a601e9660ce21f.
-
07:01 AM Bug #17731: Integer downflow with inject/reduce
- ruby_3_0 855401da495117fcf5d258fe43b71010abc43d9a merged revision(s) a85ed626f18d1014d09fb37eb0a703976c3d2b53.
-
05:17 AM Revision 43e0677c (git): Fill the ring-buffer with the fallback value
- Fill with the pointer to the root position, instead of zero and
comparing later. Also suppress a false warning by Visual C++.
```
file.c(4759): warning C4090: 'function': different 'const' qualifiers
``` -
03:31 AM Revision 855401da (git): merge revision(s) a85ed626f18d1014d09fb37eb0a703976c3d2b53: [Backport #17731]
- Fix Enumerable#inject with high negative fixnums [Bug #17731]
---
enum.c | 2 +-
test/ruby/test_enum.rb | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-) -
03:27 AM Revision 1a47de64 (git): merge revision(s) f748b911c9157a0bb86f38280ddfba72a55049b6: [Backport #17729]
- Fix infinite loop at illegal sequence [Bug #17729]
As mblen returns -1 on failure, skip the first byte and try the
succeeding bytes in that case.
Close https://github.com/ruby/ruby/pull/4281
---
... -
03:26 AM Revision d1cec0bc (git): merge revision(s) 58660e943488778563b9e41005a601e9660ce21f: [Backport #17519]
- Skip refined method when exporting methods with changed visibility
Previously, attempting to change the visibility of a method in a
singleton class for a class/module that is prepended to and refined
would raise ... -
01:52 AM Revision 79af8ce6 (git): [ruby/irb] Colorize `__END__` as keyword
- https://github.com/ruby/irb/commit/9b84018311
-
12:25 AM Bug #17105 (Closed): A single `return` can return to two different places in a proc inside a lambda inside a method
- Applied in changeset commit:git|ecfa8dcdbaf60cbe878389439de9ac94bc82e034.
----------
fix return from orphan Proc in lambda
A "return" statement in a Proc in a lambda like:
`lambda{ proc{ return }.call }`
should return outer lambda bl... -
12:25 AM Revision ecfa8dcd (git): fix return from orphan Proc in lambda
- A "return" statement in a Proc in a lambda like:
`lambda{ proc{ return }.call }`
should return outer lambda block. However, the inner Proc can become
orphan Proc from the lambda block. This "return" escape outer-scope
like method, but ...
04/01/2021
-
09:49 PM Feature #17472: HashWithIndifferentAccess like Hash extension
- +1 on adding this.
There are any number of bugs which are caused by reading mixed symbols and strings into Hashes, then round tripping them through JSON and having them change one way or the other.
I mildly disliked the use of Mash... -
08:51 PM Bug #12689: Thread isolation of $~ and $_
- Also note this experimental PR that eliminates the update of `$~` from String#split, since no specs and no tests check that behavior and it seems unexpected and unpredictable (it updates to the last match during the split loop).
https... -
08:49 PM Bug #12689: Thread isolation of $~ and $_
- Waking this up a bit...
The original issue that prompted this bug report has now been FIXED in JRuby 9.2.17.0 by making String#split never read backref from the frame-local storage:
https://github.com/jruby/jruby/pull/6644
Furth... -
07:25 PM Bug #17772 (Rejected): Performance issue with NameError message in context with large instance variables (not caused by did_you_mean)
- The following script takes about 2 seconds (tested on 2.6.6 and 2.7.2) to get from 'rescue' to 'ensure' on my machine, when executed as `ruby --disable-did_you_mean script.rb`. The time is taken by getting the `e.message`.
```
class ... -
07:06 PM Feature #17771: String#start_with? should not construct MatchData or set $~
- An alternative to using `str =~ /^pat/` for a `start_with?` that provides a MatchData would be to add a `start_with` that is not a boolean query method.
-
07:04 PM Feature #17771: String#start_with? should not construct MatchData or set $~
- It really feels like an unintended side-effect of the method. If you write this method and accept a variable then depending on the type of that variable there is either some MatchData (MD) as a side-effect or there isn't. This is incon...
-
06:25 PM Feature #17771: String#start_with? should not construct MatchData or set $~
- I see this behavior was explicitly blessed by matz in #13712 but I still believe this is not the best choice.
Around the same time as that discussion, another boolean query method `match?` was added that explicitly does *not* set the ... -
06:13 PM Feature #17771: String#start_with? should not construct MatchData or set $~
- I will also point out that this method, like many others, will *not* always set $~. If you pass a string, it remains whatever it was before:
```
$ rvm ruby-3.0 do ruby -e '"foo".start_with?("foo"); p $~'
nil
```
Avoiding the use... -
06:08 PM Feature #17771 (Open): String#start_with? should not construct MatchData or set $~
- I am working on making $~ more thread-safe in JRuby and came across this unexpected behavior:
```ruby
$ rvm ruby-3.0 do ruby -e '"foo".start_with?(/foo/); p $~'
#<MatchData "foo">
```
The `start_with?` method was added 11 years ... -
05:10 PM Revision c080bb22 (git): [Doc] Update to FrozenError from RuntimeError in Object#freeze
-
04:57 PM Revision 1ac68bba (git): [ruby/irb] SIGINT should raise Interrupt after IRB session
- https://github.com/ruby/irb/commit/5832cfe75b
- 04:48 PM Revision 8e636bd0 (git): * 2021-04-02 [ci skip]
-
04:47 PM Revision ccb0b7ab (git): [ruby/irb] Suppress verbose messages in the parallel test
- `:VERBOSE` flag needs to be set prior to `IRB::Irb.new`.
https://github.com/ruby/irb/commit/78604682d9 -
02:21 PM Feature #17768: Proposal: Downward assignments
- Bidirectional assignments should be implemented to make swapping values:
```
var1, var2 = var2, var1
```
much shorter:
```
var1
vv^^
var2
``` -
01:27 PM Feature #17768: Proposal: Downward assignments
- What an amazing, beautiful, and revolutionary idea!
But what about using an overbar (U+203E) instead of circumflex? It's not that hard to type and it brings extra clarity and visual pleasantness to the code, while eliminating any possib... -
12:55 PM Feature #17768: Proposal: Downward assignments
- plot twist by **mame** similar to last year:
- It's actually not a joke. :)
plot twist by **matz** this year:
- He actually WILL approve joke suggestions this year. -
01:23 AM Feature #17768: Proposal: Downward assignments
- marcandre (Marc-Andre Lafortune) wrote in #note-4:
> (It took me a while to realize the date in Japan :-) )
I waited until 00:00 UTC 🕛👍 -
01:13 AM Feature #17768: Proposal: Downward assignments
- I'd like a shorthand for cases where we don't really need a variable...
```ruby
while gets != nil
p ^^^^
end
```
(It took me a while to realize the date in Japan :-) ) -
01:11 AM Feature #17768: Proposal: Downward assignments
- Is this intentional?
```
$ cat test.rb
p(2 * 3 * 7)
^^^^^var1
^^^var2
p var1
p var2
$ ./miniruby test.rb
test.rb:3: syntax error, unexpected '^', expecting end-of-input
^^^var2
``` -
12:53 AM Feature #17768: Proposal: Downward assignments
- I think this syntax is not `irb` friendly.
-
12:21 AM Feature #17768: Proposal: Downward assignments
- super convenient!!1
-
12:10 AM Feature #17768 (Rejected): Proposal: Downward assignments
- Rightward assignments have been introduced since 3.0.
To be honest, I'm not a big fan of the syntax because it does not add a new dimension to Ruby.
Why don't we bring Ruby to the next dimension?
## Proposal
I propose "downward... -
02:13 PM Bug #17770: Assets precompilation aborts with Segmentation fault
- Are you able to reproduce locally in a clean Rails app with administrate installed?
The backtrace looks like it could be a bug in sassc. -
08:49 AM Bug #17770 (Third Party's Issue): Assets precompilation aborts with Segmentation fault
- ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-linux]
What changed? I updated a gem version, administrate 0.14.0 to 0.15.0
when deploying to server the following error is constantly appearing.
Note: when reverting to versi... -
01:54 PM Revision 9513fcd5 (git): Suppress a warning
- Loop variables of `list_for_each` need to be initialized.
- 10:51 AM Revision 68a8f611 (git): coroutine: Darwin on ARM64 needs alignment of 2^2
-
09:58 AM Feature #17762: A simple way to trace object allocation
- > I guess if we do have a method on Object/Kernel it could simply be Object#source_location for consistency with [...] Method/UnboundMethod
Hum, That would actually be a problem. Because I might want to know where a `Method` on `Unbou... -
03:25 AM Feature #17769: Proposal: numeric coefficient syntax
- Replace the patch with refactoring.
-
03:14 AM Feature #17769: Proposal: numeric coefficient syntax
- I replaced the attached patch with changes to accept not only `2x` but also `2(x + 1)`.
-
02:13 AM Feature #17769: Proposal: numeric coefficient syntax
- `2i` is an imaginary number literal so it is `Complex(0, 2)`.
-
02:08 AM Feature #17769: Proposal: numeric coefficient syntax
- ```
i = 10
p 2i # => 20 or Complex(0,2)?
```
Matz. -
01:23 AM Feature #17769 (Rejected): Proposal: numeric coefficient syntax
- When we write a mathematical equation, we often omit a multiplication operator between a coefficient and a variable like `2x`.
I guess this convention can be useful in computer programming. Practically, Julia employs this notation:
... - 03:00 AM Revision e675a789 (git): * 2021-04-01 [ci skip]
-
03:00 AM Revision a5567350 (git): Refactored sub-seconds normalizations
- * separated argument to `timespec2timew` from `timespec` to seconds and
nano-seconds.
* unified nano-seconds and micro-seconds normalizations.
03/31/2021
-
10:13 PM Bug #17765: Segmentation fault when calling String#gsub
- > But without success so far.
I wouldn't be surprised if the bug wasn't in `gsub` itself, but in some C extension that would generate a faulty string on which `gsub` would trip. I see you have `thrift` loaded for instance. IIRC that's... -
01:10 PM Bug #17765: Segmentation fault when calling String#gsub
- It is difficult to identify the problem because the log lacks C level backtrace information maybe due to musl.
Are you using Alpine Linux? If so could you try Debian with glibc? -
11:57 AM Bug #17765 (Feedback): Segmentation fault when calling String#gsub
- We recently had a ruby segfault occuring while invoking `String#gsub`.
The line in the code looks like this:
``` ruby
def sanitize_for_prometheus(string_or_symbol)
reg = /[^a-zA-Z_0-9]/
string_or_symbol.to_s.downcase.gsub(r... -
09:56 PM Bug #17766 (Rejected): Net::HTTP verify_callback is called three times when opening a connection
-
09:50 PM Bug #17766: Net::HTTP verify_callback is called three times when opening a connection
- This is being called once for each cert in the chain, so it's an expected behavior, and this bug can be closed.
```
ruby -e 'require "net/http"; Net::HTTP.start("www.ebay.com", 443, nil, nil, nil, nil, use_ssl: true, verify_callback: ->... -
05:24 PM Bug #17766 (Rejected): Net::HTTP verify_callback is called three times when opening a connection
- I've noticed that verify_callback is called three times when opening a connection. Here is an example: (Change "localhost" to whatever host can receive an HTTPS connection.)
```
ruby -e 'require "net/http"; Net::HTTP.start("localhost... -
07:42 PM Bug #17767 (Closed): `Cloned ENV` inconsistently returns `ENV` or `self`
- GH-PR: https://github.com/ruby/ruby/pull/4344
Is this an expected behavior? 😅
```console
$ ruby -v
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin20]
```
```ruby
cloned_env = ENV.clone
p ENV.each_key{}.equal... -
06:42 PM Feature #17762: A simple way to trace object allocation
- byroot (Jean Boussier) wrote in #note-11:
> Even though a the name is very slightly weird when put in context with `Method#source_location`, as `source` have a different meaning in both of these. But `allocation_location` would be even w... -
07:05 AM Feature #17762: A simple way to trace object allocation
- > How about ObjectSpace.allocation_source(obj)?
That would be fine by me, it is a much more reasonable than the `[ObjectSpace.allocation_sourcefile(obj), ObjectSpace.allocation_sourceline(obj)]` I write almost daily.
Even though a ... -
02:04 AM Feature #17762: A simple way to trace object allocation
- Eregon (Benoit Daloze) wrote in #note-5:
> tenderlovemaking (Aaron Patterson) wrote in #note-4:
> ...
Agreed. I'm worried I may commit it inadvertently after debugging is finished.
But I'm unsure if the message is helpful to prevent t... -
02:02 AM Feature #17762: A simple way to trace object allocation
- tenderlovemaking (Aaron Patterson) wrote in #note-4:
> I submitted #10932, so I would definitely like a feature like this. 😆
Oops, sorry!
Good news: I talked with @ko1 in person, and now he is positive (or, at least not negative) to... -
01:59 AM Feature #17762: A simple way to trace object allocation
- Eregon (Benoit Daloze) wrote in #note-3:
> `require "objspace/trace"` automatically starting tracing seems dangerous, there is a pretty big performance penalty to enable it.
> ...
`require "objspace/start_tracing"` sounds good to me.
>... -
01:52 AM Feature #17762: A simple way to trace object allocation
- Thank you all for the comments.
byroot (Jean Boussier) wrote in #note-2:
> > p obj #=> #<Object:0x...> @ (file.rb):(lineno)
> ...
I think this is also one of the reasonable options.
In fact, my original idea was `Object#allocatio... -
06:34 PM Feature #17363: Timeouts
- Timeout.wake sounds a bit like Java's `Thread#interrupt()`, correct?
So it would interrupt blocking calls (`File.read`/`Queue#pop`/`rb_thread_call_without_gvl`/`sleep`/`Mutex#lock`/etc) but wouldn't interrupt not-blocking Ruby code like... -
01:14 PM Revision 2a02b61f (git): Use EnvUtil.under_gc_stress
-
10:48 AM Misc #17720: Cirrus CI to check non-x86_64 architecture cases by own machines
- > Yes, I means not only the Cirrus CI.
OK.
By the way, related to this topic, I found the following ticket asking the expanded platform support of GitHub Actions. The platforms are such as PowerPC, IBM Mainframe, Solaris, old Red H... -
10:18 AM Revision 1fac99af (git): skip marking for uninitialized imemo_env.
- RUBY_INTERNAL_EVENT_NEWOBJ can expose uninitialized imemo_env
objects and marking it will cause critical error. This patch
skips marking on uninitialized imemo_env.
See: http://rubyci.s3.amazonaws.com/centos7/ruby-master/log/20210329T18... -
10:15 AM Feature #17763: Implement cache for cvars
- tenderlovemaking (Aaron Patterson) wrote in #note-6:
> Also in this case, it makes me feel weird to change the implementation of Rails when we can just make Ruby perform better. Changing Rails to suit Ruby seems like the tail wagging t... - 09:05 AM Revision 8b2f2a70 (git): [ruby/openssl] Use #ifdef consistently for HAVE_RB_EXT_RACTOR_SAFE
- We previously used a mix of both `#if` and `#ifdef`, but the latter is
more reliable because it will still work if the macro is undefined.
https://github.com/ruby/openssl/commit/e4a622e67e - 09:05 AM Revision 5ab26252 (git): [ruby/openssl] Fix OpenSSL::Engine build on Debian
- On Debian 9 (“stretch”) the `OPENSSL_NO_STATIC_ENGINE` macro is not
defined, which causes all the `#if HAVE_ENGINE_LOAD_…` directives to
fail with `error: 'HAVE_ENGINE_LOAD_…' is not defined, evaluates to 0
[-Werror,-Wundef]` while build... -
09:05 AM Revision e2bf3659 (git): [ruby/openssl] pkcs7: keep private key when duplicating PKCS7_SIGNER_INFO
- ASN1_dup() will not copy the 'pkey' field of a PKCS7_SIGNER_INFO object
by design; it is a temporary field kept until the PKCS7 structure is
finalized. Let's bump reference counter of the pkey in the original
object and use it in the new... -
06:18 AM Revision 66d2fc79 (git): Enclose the code that was accidentally a link in "tt"
-
03:13 AM Bug #17764: ブロック付きメソッドにおけるproc(または Proc.new)の参照がArgumentErrorを吐く問題
- ご教示大変ありがとうございます。
希望した動作ができました。
恥ずかしながら、ブロック引数の指定がない場合に&blkがnilとなる挙動を把握できていませんでした。
さらに一時遅いと言われたことのある&引数は従来のprocよりも高速なのですね。勉強いたします。
諸兄のご親切に重ねて御礼申し上げます。
貴重なお時間をありがとうございました。
osyo (manga osyo) wrote in #note-5:
> やりたいこととしてはこういうことでしょうか?
> .... -
03:05 AM Bug #17764: ブロック付きメソッドにおけるproc(または Proc.new)の参照がArgumentErrorを吐く問題
- 「メソッド呼び出し時のブロック引数は省略可能にしておきたい」という要求の正確な意味がわからなかったのですが、これが「引数リストに&blk変数を指定したくない」というものだとすれば、それは3.0からできなくなりました。これまではprocメソッドを引数なしで呼び出す方法でメソッドに渡されたブロックをProcとして取り出せていましたが、暗黙のコンテキスト参照が入りますし、読解の点からも望ましくないと考えての変更です。「&blk引数」を使ってください。それに、たぶんこっちのほう...
-
03:04 AM Bug #17764: ブロック付きメソッドにおけるproc(または Proc.new)の参照がArgumentErrorを吐く問題
- firelzrd (Masahito Suzuki) wrote in #note-4:
> ご返答ありがとうございます。
> ...
やりたいこととしてはこういうことでしょうか?
```ruby
def foo(&block)
# ブロック引数がない場合は block は nil になる
puts (block ? block : proc{"ブロックなし"}).call
end
foo #ブロックなし => "ブロックなし"
foo... -
02:57 AM Bug #17764: ブロック付きメソッドにおけるproc(または Proc.new)の参照がArgumentErrorを吐く問題
- ご返答ありがとうございます。
ご主旨、理解いたしました。ご教示ありがとうございます。お騒がせいたしました。
つきましては、差し支えなければ、
①ブロック引数として渡されたprocをメソッド内で変数として参照したい
②メソッド呼び出し時のブロック引数は省略可能にしておきたい
というニーズが両立する場合にどのようにすればよいか、ヒントをいただければ幸いです。
①を実現するだけならば&の付いたブロック引数を取ればよさそうですが…
あるメソッドにブロッ... -
02:35 AM Bug #17764 (Closed): ブロック付きメソッドにおけるproc(または Proc.new)の参照がArgumentErrorを吐く問題
- ブロック付きメソッドの中でブロックなし `proc` したとき、エラーになるようになった、というのが、3.0 での変更点です。
```ruby
def foo
proc
end
foo{} #=> `proc': tried to create Proc object without a block (ArgumentError)
```
-
02:30 AM Bug #17764: ブロック付きメソッドにおけるproc(または Proc.new)の参照がArgumentErrorを吐く問題
- ご返答ありがとうございます。
本件は「ブロックを指定しない proc」についてではなく「ブロックを指定した proc」がどうもバグっているのではないかと思い報告させていただきました。
ブロック付きでメソッドをコールしたとき、メソッド内ではblock_given?の値がtrueとなり、proc (またはProc.new)で渡されたブロックを参照可能なはずですが、
サンプルプログラムの挙動でもお分かりいただけるように、block_given?==trueの時のpr... -
12:56 AM Bug #17764: ブロック付きメソッドにおけるproc(または Proc.new)の参照がArgumentErrorを吐く問題
- Ruby 3.0 からはブロック引数がない `Proc.new` / `proc` は `ArgumentError` になるようになりました。
> ブロックを指定しない lambda は Ruby 2.6 までは警告メッセージ「warning: tried to create Proc object without a block」が出力され、Ruby 2.7 では ArgumentError (tried to create Proc object witho... -
12:41 AM Bug #17764 (Closed): ブロック付きメソッドにおけるproc(または Proc.new)の参照がArgumentErrorを吐く問題
ブロック付きメソッドにおけるproc(または Proc.new)の参照がArgumentErrorを吐く問題
Ruby 3.0.0 linux x86-64およびWindows上のmingw-x86-64バイナリにて発生し、2.7.2-1ではいずれも発生しないことを確認済み。
また、2021/3/31現在、TryRubyサイト( https://try.ruby-lang.org/ ) の上でも発生することを確認済み。
```
def foo
pu...-
12:19 AM Feature #17472: HashWithIndifferentAccess like Hash extension
- marcandre (Marc-Andre Lafortune) wrote in #note-21:
> duerst (Martin Dürst) wrote in #note-20:
> ...
Thanks for the pointer. I haven't fully understood that page, but it seems to me that in JS, the 'uniqueness' aspect is much more impo...
03/30/2021
-
11:57 PM Feature #17763: Implement cache for cvars
- duerst (Martin Dürst) wrote in #note-5:
> What would it take e.g. to switch Rails logger to something else?
> ...
Class variables have different semantics than class instance variables. It's possible to switch some things to use class... -
11:27 PM Feature #17763: Implement cache for cvars
- Eregon (Benoit Daloze) wrote in #note-4:
> Eregon (Benoit Daloze) wrote in #note-2:
> ...
I'm not sure that "better optimize, because some important code keeps using this, but don't really optimize all the way, because it's no so pop... -
07:45 PM Feature #17763: Implement cache for cvars
- Eregon (Benoit Daloze) wrote in #note-2:
> they are inherently less efficient than instance variables on modules.
@chrisseaton told me that it's not necessarily the case, and I think they can be exactly the same for a regular read (S... -
07:26 PM Feature #17763: Implement cache for cvars
- Eregon (Benoit Daloze) wrote in #note-2:
> Nice work.
> ...
I think we probably could do that. Keeping a global counter just seemed like the easiest solution at the moment. Also, cvars seem very unpopular (compared with ivars) so I'm ... -
07:05 PM Feature #17763: Implement cache for cvars
- Nice work.
I guess using a global serial here is the only way to handle overtaking without redoing the lookup every time like before.
I wonder, could the serial be global (not per module) but per name? (not asking to change anything,... -
06:24 PM Feature #17763: Implement cache for cvars
- This is the missing benchmark I copy and pasted incorrectly.
Ruby master / Rails 6.1:
```
Warming up ———————————————————
logger 155.251k I/100ms
Calculating ——————————————————
... -
05:57 PM Feature #17763 (Closed): Implement cache for cvars
- # Introduce inline cache for class variable reads
@tenderlove and I would like to introduce an inline cache for class variable reads. We've attached a patch that introduces the cache. Class variable reads are popular in Rails applicat... -
11:11 PM Feature #16295: Chainable aliases for String#-@ and String#+@
- `+@` is rarely safe to use (only if you know what allocated it and that it was never captured in another variable) as it might mutate an argument inplace, if that object is not frozen.
In most cases, people actually want to use `.dup` a... -
09:52 PM Feature #16295: Chainable aliases for String#-@ and String#+@
- danh337 (Dan Higgins) wrote in #note-14:
> I believe this shows the semantics. It's the inverse of `.freeze`:
> ...
It's not the inverse of freeze, since that is not possible in Ruby. freeze always returns the receiver. thaw could no... -
09:31 PM Feature #16295: Chainable aliases for String#-@ and String#+@
- I believe this shows the semantics. It's the inverse of `.freeze`:
`class String; def thaw; frozen? ? self.+@ : self; end; end` -
09:12 PM Feature #16295: Chainable aliases for String#-@ and String#+@
- The `-@` and `+@` calls do work fine for chaining. But `.-@` has a nice equivalent, `.freeze`. Is it possible to give `.+@` a nice equivalent, like `.thaw`? This feels more Rubyistic.
Are newer Ruby MRIs going to have core methods ret... -
08:11 PM Feature #17762: A simple way to trace object allocation
- tenderlovemaking (Aaron Patterson) wrote in #note-4:
> I don't think it's needed. If you require the file, you know it's enabled.
For the person who just wrote it it's clear enough.
But what if that accidentally gets committed and ... -
07:43 PM Feature #17762: A simple way to trace object allocation
- I submitted #10932, so I would definitely like a feature like this. 😆
> Is the message objspace/trace is enabled needed or not?
I don't think it's needed. If you require the file, you know it's enabled.
> ...
This is fine. Nobody wi... -
07:16 PM Feature #17762: A simple way to trace object allocation
- `require "objspace/trace"` automatically starting tracing seems dangerous, there is a pretty big performance penalty to enable it.
So I think the message on stderr is needed, and maybe it should be more explicit like `require "objspace/s... -
03:59 PM Feature #17762: A simple way to trace object allocation
- > Whenever I want to use them, I have to google, copy and paste the names.
Seconded. I use this feature almost daily, and somehow I also have to reach to the doc every time.
> ...
That makes sense to me.
> p obj #=> #<Object:0x.... -
03:45 PM Feature #17762: A simple way to trace object allocation
- I think this is a good suggestion.
Please correct me if my assumptions are wrong, but if I understood the general gist of it correctly
then the main point here is that, rather than focusing on specific names, such as
ObjectSpace.tra... -
02:57 PM Feature #17762 (Closed): A simple way to trace object allocation
- How about having a short hand to `ObjectSpace.trace_object_allocations_start`, `ObjectSpace.allocation_sourcefile` and `ObjectSpace.allocation_sourceline`?
They are a very powerful tool for debugging and code-reading which allows us t... -
07:18 PM Bug #17527 (Closed): rb_io_wait_readable/writable with scheduler don't check errno
-
08:15 AM Bug #17527: rb_io_wait_readable/writable with scheduler don't check errno
- I would advise we should back port this to 3.0.1 if possible. The original patch attached to this issue is sufficient.
-
07:38 AM Bug #17527: rb_io_wait_readable/writable with scheduler don't check errno
- I added a failing spec https://github.com/ruby/ruby/pull/4338/commits/e111d99ae1b58e1ffe73c167c039b2fc0728cb08 which passes with the proposed fix.
-
07:02 AM Bug #17527: rb_io_wait_readable/writable with scheduler don't check errno
- Okay, I confirmed the fix is required for `async-io` to use the native IO methods.
```
samuel@Fukurou ~/D/s/async-io (master) [1]> chruby ruby-3
samuel@Fukurou ~/D/s/async-io (master)> bundle exec rspec ./spec/async/io/stream_spec.r... -
06:12 AM Bug #17527: rb_io_wait_readable/writable with scheduler don't check errno
- PR: https://github.com/ruby/ruby/pull/4338
-
05:51 AM Bug #17527: rb_io_wait_readable/writable with scheduler don't check errno
- I think I ran into this bug on the write code path. I'm just going to confirm it.
- 03:09 PM Revision d977849e (git): * 2021-03-31 [ci skip]
-
02:41 PM Revision 94d56407 (git): Text files should end with a newline
-
02:29 PM Bug #17761 (Closed): Install location of header files in extension libraries
- Applied in changeset commit:git|5cdf99f64e344b8e4638824d55f5caf33be682ca.
----------
mkmf: fixed install directories of header files in extension libraries [Bug #17761]
When installing an extension library which provides a header, that... -
02:10 PM Bug #17761 (Closed): Install location of header files in extension libraries
- When installing an extension library which provides a header, that header should be installed under site_ruby (or vendor_ruby when "--vendor" option was given to extconf.rb).
However, currently this file is about to be installed in the ... -
02:28 PM Revision 5cdf99f6 (git): mkmf: fixed install directories of header files in extension libraries [Bug #17761]
- When installing an extension library which provides a header, that
header should be installed under site_ruby (or vendor_ruby when
"--vendor" option was given to extconf.rb). However, currently
this file is about to be installed in the ... -
02:20 PM Feature #17760 (Third Party's Issue): Where we should install a header file when `gem install --user`?
- This is because rubygems doesn't manage header files installed from gems, since no gems had installed headers until digest has been gemified.
Now rubygems needs to support such gems. -
12:51 AM Feature #17760: Where we should install a header file when `gem install --user`?
- The permission error was reported at https://github.com/ruby/digest/issues/14.
-
12:50 AM Feature #17760 (Third Party's Issue): Where we should install a header file when `gem install --user`?
- As `digest` have been made a default gem at Ruby 3.0, it can be installed by `gem install` command.
When we install `digest`, `digest.h` is installed at the same directory as `ruby.h`. But when we use `gem install --user` for instal... -
11:58 AM Revision 9713acd7 (git): Fix `coroutine_type` variable name
- 10:16 AM Revision a9c5c2d6 (git): Check errno before invoking scheduler in `rb_io_wait_readable/writable`.
- See <https://bugs.ruby-lang.org/issues/17527> for more details.
- 10:16 AM Revision 611e7110 (git): Test incorrect behaviour of `rb_io_wait_readable/writable`.
-
06:24 AM Feature #17546 (Closed): Native coroutine implementation for riscv64 Linux
- It looks like it didn't break anything, so I've merged it, but can you please test it and report back?
-
05:48 AM Feature #17546: Native coroutine implementation for riscv64 Linux
- It will be merged, https://github.com/ruby/ruby/pull/4337 but it needs more testing. Do we have any CI?
- 06:23 AM Revision b507f65d (git): Support for native riscv64 coroutines.
- 05:38 AM Revision 3d32c217 (git): Disable public interface for now.
- 05:38 AM Revision 92449e0e (git): Fix handling of timeout accessing scheduler outside of non-blocking context.
- 05:38 AM Revision af1c5875 (git): Improve timeout tests.
- 05:38 AM Revision 511acba4 (git): Update method name and add documentation.
- 05:38 AM Revision 09c865d5 (git): Fix native implementation.
- # Conflicts:
# scheduler.c -
05:38 AM Revision 67f60ebb (git): Fixed a compilation error
- 05:38 AM Revision c05dd7dc (git): Prefer `rb_check_funcall`.
- 05:38 AM Revision 9b9bbaec (git): Update lib/timeout.rb
- Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
- 05:38 AM Revision 4c53dc97 (git): Add hook for `Timeout.timeout`.
-
05:38 AM Feature #17470 (Closed): Introduce non-blocking `Timeout.timeout`
- Implemented in <https://github.com/ruby/ruby/pull/4173>.
- 05:28 AM Revision 93753d7e (git): * 2021-03-30 [ci skip]
-
05:27 AM Revision d65d6611 (git): [ruby/irb] Prevent the completion from crashing if rdoc is missing
- There are cases where ruby is installed without rdoc and e.g.
lib/irb/cmd/help.rb also handles the LoadError
Here is how to replicate the issue:
```
$ docker run -it alpine:3.13.3 sh
/ # apk add ruby ruby-irb ruby-io-console
/ # irb
... -
03:29 AM Bug #17737: `Array#permutation` does not immediately check the arity when no block is given
- I am not opposed to changes, but I don't believe this actually matters; I can not think of a use-case.
A similar question could be asked of `[].permutation(:oops)`. Should it raise immediately? Asked another way, if the argument respo... -
12:15 AM Bug #17573: Crashes in profiling tools when signals arrive in non-Ruby threads
- > Ah, OK. This issue doesn't expose on recent Linux system.
I can somewhat reliably repro by running `ruby --jit repro.rb` with the following:
```ruby
# repro.rb
require "stackprof"
StackProf.run(interval: 100) do
1000.ti...
03/29/2021
-
11:29 PM Bug #17742 (Closed): Random.rand gets wrong after using Ractor and requiring benchmark
-
11:10 PM Bug #17739: Array#sort! changes the order even if the receiver raises FrozenError in given block
- I think this is a bug, but it's not that `Array#sort!` should keep the initial order of the receiver, it's that it should keep the order at the point `freeze` is called, and it does not:
```ruby
array = [1, 2, 3, 4, 5]
begin
arra... -
10:36 PM Bug #17738 (Rejected): Ruby can still freeze ENV
-
10:15 PM Bug #17737: `Array#permutation` does not immediately check the arity when no block is given
- If this is a bug, it doesn't just affect `Array#permutation`, but many `Enumerable` methods:
```ruby
[].each_entry(2)
# => #<Enumerator: []:each_entry(2)>
[].each_entry(2).to_a
# ArgumentError (wrong number of arguments (given 1, ... -
06:28 PM Bug #17728: [BUG] Segmentation fault at 0x0000000000000000
- > I'll start working with the master branch version this week
Note that I was suggesting `ruby_3_0`: https://github.com/ruby/ruby/tree/ruby_3_0 which is the 3.0 "stable" branch (what will someday become 3.0.1).
`master` is what wil... -
02:16 PM Bug #17728: [BUG] Segmentation fault at 0x0000000000000000
- byroot (Jean Boussier) wrote in #note-4:
> > Attached is a full session dump,
> ...
Thanks Jean, I'll start working with the master branch version this week and see if the issue persists.
-
02:45 PM Bug #13708 (Closed): catastrophic slow compilation of defined-defined sequence has no chance to ^C
- Applied in changeset commit:git|7b3c5ab8a5825a2b960e639d257f0c8a69c4186c.
----------
Make defined? cache the results of method calls
Previously, defined? could result in many more method calls than
the code it was checking. `defined? a... -
02:45 PM Bug #17649 (Closed): `defined?` invokes method once for each syntactic element around it
- Applied in changeset commit:git|7b3c5ab8a5825a2b960e639d257f0c8a69c4186c.
----------
Make defined? cache the results of method calls
Previously, defined? could result in many more method calls than
the code it was checking. `defined? a... -
02:45 PM Revision 62e66aed (git): Add more tests for defined? with method calls
-
02:45 PM Revision 7b3c5ab8 (git): Make defined? cache the results of method calls
- Previously, defined? could result in many more method calls than
the code it was checking. `defined? a.b.c.d.e.f` generated 15 calls,
with `a` called 5 times, `b` called 4 times, etc.. This was due to
the fact that defined works in a re... -
10:57 AM Bug #17759: Correct `ioctl_req_t` for musl
- > Would you commit it by yourself?
+1 -
10:44 AM Bug #17759: Correct `ioctl_req_t` for musl
- Seems more concise.
Would you commit it by yourself? -
09:05 AM Bug #17759 (Closed): Correct `ioctl_req_t` for musl
- The definition of `ioctl(2)` in musl is `int ioctl (int, int, ...);`, and this makes `io.c` fail to build on 64-bit musl environments with Clang/LLVM due to `shorten-64-to-32` error.
A patch is attached for a workaround. It is expecte... -
10:42 AM Feature #11523 (Closed): optparse short options will match complete options
- Applied in changeset commit:git|eca8ffaa0b446db0a1cacc82a2e73155f6fd3fce.
----------
[ruby/optparse] Add OptionParser#require_exact accessor
This allows you to disable allowing abbreviations of long options
and using short options for ... -
10:37 AM Revision 190a57b1 (git): [ruby/optparse] bump up to 0.1.1
- https://github.com/ruby/optparse/commit/2fe984a603
-
10:37 AM Revision e8317d90 (git): [ruby/optparse] Fixed error message of unparsed non-option
- Close https://github.com/ruby/optparse/issues/3
https://github.com/ruby/optparse/commit/94c5cf4032 -
09:24 AM Revision 2bbae0e9 (git): [ruby/optparse] Completion scripts themselves are not executable
- https://github.com/ruby/optparse/commit/65d8aff935
-
09:24 AM Revision e97f21af (git): [ruby/optparse] Exclude unnecessary files from the package
- https://github.com/ruby/optparse/commit/dfd9380231
-
06:55 AM Revision 7846f320 (git): [ruby/optparse] Change *opts to *params, to avoid confusion
- https://github.com/ruby/optparse/commit/f5f5e202dd
-
06:55 AM Revision eca8ffaa (git): [ruby/optparse] Add OptionParser#require_exact accessor
- This allows you to disable allowing abbreviations of long options
and using short options for long options.
Implements Ruby Feature #11523
https://github.com/ruby/optparse/commit/dfefb2d2e2 - 06:55 AM Revision d474b19b (git): [ruby/optparse] Use ZDOTDIR env var to locate .zshrc
- https://github.com/ruby/optparse/commit/c4977674bf
-
06:19 AM Revision d87b8ce6 (git): sync_default_gems.rb: ignore COPYING file [ci skip]
-
06:14 AM Revision f16b9e7f (git): sync_default_gems.rb: IO#puts prints a newline between each argument [ci skip]
-
04:49 AM Feature #17752: Enable -Wundef for C extensions in repository
- As far as the effect of `-Wundef` do not leak to 3rd party extension libraries, yes I'm in favor of it. It sounds a bit too harsh for 3rd parties.
-
02:35 AM Revision f46bbb2e (git): [DOC] Improve an example of Array#count comparison [ci skip]
03/28/2021
- 08:32 PM Revision 875c85a8 (git): fiber context update for Mac OS.
- it is more about memory accounting sake. At allocation time,
we make clear we re possibly reusing regions marked as reusable.
Noted also calls might not necessarily succeed at first so we do
only when necessary. -
08:10 PM Revision a1938ec3 (git): [ruby/irb] Always add input method when calling Irb.new in tests
- When passes input method as nil to Context.new through Irb.new,
ReidlineInputMethod.new is executed and the global internal state of Reline is
rewritten, therefore other tests are failed in the Ruby repository. This
commit changes to use... -
07:33 PM Bug #17757: Hash#slice does not keep compare_by_identity on the results
- I should have looked into this when I checked #16996.
Looks like we have behavior that is all over the place, and the same method sometimes returns a hash with different comparability depending if the receiver is empty or not...
``... -
12:25 PM Bug #17757 (Closed): Hash#slice does not keep compare_by_identity on the results
- GH-PR: https://github.com/ruby/ruby/pull/4330
```console
$ ruby -v
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin20]
```
```ruby
str1 = +'str'
str2 = +'str'
hash = {a: :a, b: :b, c: :c}.compare_by_identity
hash... -
06:39 PM Feature #17758: Provide Hash#count for performance improvement
- Absolutely +1
-
06:21 PM Feature #17758 (Open): Provide Hash#count for performance improvement
- GH-PR: https://github.com/ruby/ruby/pull/4333
In my experience, many developers choice `size`, `length` and `count` as a matter of taste.
And Ruby already provide `Array#count` for performance improvement reason since https://github.... - 06:18 PM Revision 1cdecb43 (git): * 2021-03-29 [ci skip]
-
06:17 PM Revision 813c3333 (git): [Doc] Fix Array#count comparing strategy
-
05:29 PM Feature #17472: HashWithIndifferentAccess like Hash extension
- > Actually, it does (since ES 6): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol
I find it very unlikely any language will make symbols the default hash keys like Ruby did.
> ...
Why do you ... -
03:17 AM Feature #17472: HashWithIndifferentAccess like Hash extension
- duerst (Martin Dürst) wrote in #note-20:
> Javascript doesn't have symbols in the first place
Actually, it does (since ES 6): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol
String are meant... -
01:56 AM Feature #17472: HashWithIndifferentAccess like Hash extension
- joelb (Joel Blum) wrote in #note-19:
> > Use JSON.parse(data, symbolize_names: true)
> ...
Maybe we should change the default on JSON.parse? That would probably lead to too much backwards compatibility issues.
Maybe we should introd... -
04:12 PM Bug #17728: [BUG] Segmentation fault at 0x0000000000000000
- > Attached is a full session dump,
Unfortunately your dump doesn't have C-level symbols.
But the crash in `:define_method` looks a lot like one of the few crash that have been fixed and backported already. I'd recommend trying to b... -
02:20 PM Bug #17728: [BUG] Segmentation fault at 0x0000000000000000
- I've started testing a Rails 6.1.3 app with Ruby 3.0.0 and have run into this same issue multiple times in development mode. The issue is intermittent but seems to occur after changing a model and reloading a related view in the browser...
-
02:42 PM Revision 989e22f3 (git): [ruby/io-console] bump up to 0.5.9
- https://github.com/ruby/io-console/commit/302e86a28c
https://github.com/ruby/io-console/commit/0690862526 -
02:39 PM Revision f7faac13 (git): sync_default_gems.rb: remove un-committed files [ci skip]
- As files non-existing in the repository cannot be checked out,
remove files to be ignored once, and re-check the status. -
01:58 PM Revision 36bad6f1 (git): sync_default_gems.rb: search the last merge more strictly [ci skip]
- As tag-only match, `[#{repo}]`, may find unexpected commit, e.g.,
5bfca88f760727240902a70d1df0cc516ff31a70 for io-console, match by
more exact URL pattern. -
01:33 PM Feature #17753: Add Module#namespace
- > Besides that, I do not see any reason to make them different in any way
Well, if `Module.nesting` because of its scope semantic can't be chained. `Module.nesting.nesting` would be problematic.
The proposed feature is very easily ... -
06:05 AM Feature #17753: Add Module#namespace
- This feature is reminiscent of `Module.nesting`. The difference is that the former has dynamic scope and the latter lexical scope. Besides that, I do not see any reason to make them different in any way. What about returning an array of ...
-
09:55 AM Bug #17735: `Hash#transform_keys!` drops non evaluated keys
- I have confirmed that the issue is reproducible on 2.6/2.7 too.
-
12:15 AM Bug #17735 (Closed): `Hash#transform_keys!` drops non evaluated keys
- Applied in changeset commit:git|31e0382723bfb35cffe3ca485dd0577668cafa07.
----------
Keep non evaluated keys in `Hash#transform_keys!` [Bug #17735] -
09:52 AM Revision 49c1c2dc (git): sync_default_gems.rb: escape filter command [ci skip]
-
05:10 AM Revision 603d7995 (git): sync_default_gems.rb: message when no commits [ci skip]
-
05:09 AM Revision 522d4cd3 (git): Force recycle intermediate collection in Hash#transform_keys! [Bug #17735]
- * Force recycle intermediate hash
* Force recycle intermediate array too
https://github.com/ruby/ruby/pull/4329#issuecomment-808840718 -
05:06 AM Bug #17755 (Closed): Pathname#split makes segmentation fault when File.split returns non array value
- Applied in changeset commit:git|9af57eeed61ad53c0a2a92a93a6a6e40704cd6ae.
----------
[ruby/pathname] Fix segfault of Pathname#split
Fix segmentation fault of Pathname#split when File.split returns
non array value [Bug #17755]
https://... -
05:04 AM Revision 9af57eee (git): [ruby/pathname] Fix segfault of Pathname#split
- Fix segmentation fault of Pathname#split when File.split returns
non array value [Bug #17755]
https://github.com/ruby/pathname/commit/e29b49e3b1
https://github.com/ruby/pathname/commit/1db7479a74 -
05:03 AM Revision 447e0954 (git): [ruby/pathname] Support Ruby 3.0
- Update test/pathname/test_pathname.rb
https://github.com/ruby/pathname/commit/29645187e0
https://github.com/ruby/pathname/commit/78584864de
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> -
05:02 AM Revision 38ea2306 (git): sync_default_gems.rb: preserve Co-Authored-By:
-
04:15 AM Misc #17751: Do these instructions (<<,+,[0..n]) modify the original string without creating copies?
- xtkoba (Tee KOBAYASHI) wrote in #note-6:
> ```ruby
> ...
`IO#print` accepts multiple arguments, so this code can be `f.print data[:header], *data[:payload]`. -
12:48 AM Revision fb6ebe55 (git): Hide an intermediate array
-
12:42 AM Revision 5e5fb72f (git): Clear an intermediate hash [Bug #17735]
-
12:14 AM Revision 31e03827 (git): Keep non evaluated keys in `Hash#transform_keys!` [Bug #17735]