Activity
From 01/07/2020 to 01/13/2020
01/13/2020
- 09:58 PM Revision e0a9b8ec (git): * 2020-01-14 [ci skip]
-
09:58 PM Revision 91601dcc (git): Simplify obj2ubits checks
- If this value is less than zero, then the mask check is guaranteed to
fail as well, so we might as well rely on that. -
09:58 PM Revision 5f318947 (git): Avoid rb_check_string_type in month_arg
- This will usually receive a fixnum so we should check that first instead
of the more expensive rb_check_string_type check. -
09:58 PM Revision c2e45422 (git): Store "UTC" and "" fstring as globals in time.c
-
06:49 PM Feature #8709: Dir.glob should return sorted file list
- One potential issue with this is that though globs which scanned directories (ex. `Dir.glob("foo/*")`) would return results in an inconsistent order, globs which used purely brace expansion (ex. `Dir.glob("foo/{a,b,c,d}")`) would return ...
-
10:04 AM Feature #8709: Dir.glob should return sorted file list
- I got bit by this in the past too when trying to reproduce order dependent test failures (https://github.com/rubygems/rubygems/pull/2626#discussion_r254020218).
-
09:28 AM Feature #8709: Dir.glob should return sorted file list
- For what it's worth I also think it should return a sorted array, because:
- Pretty much any rubyist I know have been been bitten by this at least once.
- Many experienced rubyist end up always writing `Dir[patten].sort`
- It'... -
05:33 PM Bug #16497: StringIO#internal_encoding is broken (more severely in 2.7)
- StringIO has been documented for a while to *ignore* it's own internal encoding, but respect it's own external encoding.
I am not sure this ever made any sense. It might have made more sense to respect an internal encoding, but ignor... -
02:27 PM Bug #16504: `foo(*args, &args.pop)` should pass all elements of args
- mame (Yusuke Endoh) wrote:
> Okay, I'll ask matz which is right. But I believe that the 2.6 and current behavior is wrong because Ruby has a principle of left-to-right evaluation.
For sure current behavior is wrong and left-to-right... -
01:21 PM Bug #16504: `foo(*args, &args.pop)` should pass all elements of args
- Agreed left-to-right would be far more consistent.
We just need to be aware that whoever writes `foo(*args, &args.pop)` probably expects no duplication (so they would disagree on "bug" probably).
But such code deserves to be clearer ... -
12:01 AM Bug #16504: `foo(*args, &args.pop)` should pass all elements of args
- I spent an hour to find the ticket: https://bugs.ruby-lang.org/issues/12860
-
12:23 PM Feature #16273 (Closed): Proposal: Shorthand operator for "#instance_method"
- Applied in changeset commit:git|5aa0e6bee916f454ecf886252e1b025d824f7bd8.
----------
Mention new feature of Hash#transform_keys [Feature #16273]
ref b25e27277dc39f25cfca4db8452d254f6cc8046e -
12:22 PM Revision 5aa0e6be (git): Mention new feature of Hash#transform_keys [Feature #16273]
- ref b25e27277dc39f25cfca4db8452d254f6cc8046e
-
03:27 AM Revision f4394063 (git): test-bundled-gems.rb: Use real paths for symlinks
-
01:31 AM Revision c9b1969f (git): Checkout with git on cygwin for EOL code
- `shell: bash` runs bash on msys which prefers git on msys too,
then checked out in CRLF mode. Cygwin sed doesn't consider the CR
a part of EOL code, though. -
12:04 AM Feature #16502 (Closed): Add option :allow_trailing_comma to JSON#parse
- Thanks! If the pull request is merged, it will be backported to ruby/ruby. So I close this ticket.
01/12/2020
-
11:44 PM Bug #16504: `foo(*args, &args.pop)` should pass all elements of args
- Okay, I'll ask matz which is right. But I believe that the 2.6 and current behavior is wrong because Ruby has a principle of left-to-right evaluation. Actually, `foo(*ary, ary.pop)` was changed between 2.1 and 2.2; 2.2 and later duplic...
-
04:37 PM Bug #16504: `foo(*args, &args.pop)` should pass all elements of args
- What's the definition of `foo` here?
I believe the previous behavior is the block expression gets evaluated before the rest of the arguments.
We should decide and clarify if the block or positional arguments are evaluated first.
I... -
12:52 AM Bug #16504: `foo(*args, &args.pop)` should pass all elements of args
- https://github.com/ruby/ruby/pull/2833
-
12:47 AM Bug #16504 (Closed): `foo(*args, &args.pop)` should pass all elements of args
- https://bugs.ruby-lang.org/issues/16500?next_issue_id=16499&prev_issue_id=16501#note-7
```
def foo(*args)
p args
end
# in 2.7
args = [1, 2, -> {}]; foo( *args, &args.pop) #=> passes [1, 2] (bug; [1, 2, ->{}] is expected)
a... -
11:34 PM Bug #16503: "ret: 2, hash modified during iteration" error in Ruby 2.7.0
- Thank you very much for your quick fix. I left a comment in the meta-tags issue:
https://github.com/kpumuk/meta-tags/issues/209 -
06:44 PM Bug #16503 (Closed): "ret: 2, hash modified during iteration" error in Ruby 2.7.0
- 350dafd56a9cff58d36303aeb7515ab41c5dbbb3
-
06:40 PM Bug #16503: "ret: 2, hash modified during iteration" error in Ruby 2.7.0
- > This patch should be back-ported for Ruby 2.6.
sorry I mean 2.7. 2.6 doesn't have this problem.
-
06:36 PM Bug #16503: "ret: 2, hash modified during iteration" error in Ruby 2.7.0
- All right. I got a script:
```ruby
loop{
h = {a:1, b:2, c:3, d:4, e:5, f:6, g:7, h:8}
h.each{|k,v| GC.start; h.delete(k)}
}
```
The patch is:
```diff
diff --git a/hash.c b/hash.c
index 878f2b1790..644f85d6da 100644
-... -
06:19 PM Bug #16503: "ret: 2, hash modified during iteration" error in Ruby 2.7.0
- Could you make reproducible script?
-
11:27 PM Misc #16507 (Open): =~ vs include? or match?
- While working on getting the mswin build working on Actions, I thought adding mswin? and ci? methods to Minitest::Unit::Guard in tool/lib/minitest/unit.rb would be helpful.
Currently some tests are failing that are guarded/skipped bas... -
11:03 PM Revision 61ff5cd5 (git): Fix syntax error in obj_free with hash size debug counter when USE_DEBUG_COUNTER is enabled
-
07:19 PM Feature #16502: Add option :allow_trailing_comma to JSON#parse
- mame (Yusuke Endoh) wrote:
> The json library has another upstream repository: https://github.com/flori/json
> ...
Thank you for your feedback. I have created a new pull request (https://github.com/flori/json/pull/401) upstream. -
07:05 PM Bug #16488: 2.7 spews warnings about net/imap
- That patch appears to have fixed the symptoms I see with Net/imap.
- 06:44 PM Revision 83b8dfac (git): * 2020-01-13 [ci skip]
-
06:41 PM Bug #16506: Documentation for `Module#const_souce_location` is wrong
- Ah, while I was writing the comment, you've updated the description with the same thoughts :)
Will fix. -
06:40 PM Bug #16506: Documentation for `Module#const_souce_location` is wrong
- @sawa That's an interesting question! I wrote an original doc, and I meant this:
```ruby
# test.rb:
class A
end
class A # reopening
end
Object.const_source_location('A') # => ["test.rb", 1] -- first definition
```
But of... -
06:17 PM Bug #16506 (Closed): Documentation for `Module#const_souce_location` is wrong
- https://ruby-doc.org/core-2.7.0/Module.html#method-i-const_source_location says:
> Returns the Ruby source filename and line number containing **first** definition of constant specified.
It should be:
> ...
It also has an exampl... -
06:36 PM Revision 350dafd5 (git): reload AR table body for transient heap.
- ar_talbe (Hash representation for <=8 size) can use transient heap
and the memory area can move. So we need to restore `pair' ptr after
`func` call (which can run any programs) because of moving. -
04:45 PM Bug #16500: Argument is added to both splat and last &block argument
- FWIW the 2.6 behavior is detailed in ruby/spec:
https://github.com/ruby/spec/blob/84d606aa8e85a8fef6521b3402dae612d04288c4/language/send_spec.rb#L424-L445
From commit
https://github.com/ruby/spec/commit/01992ab93dd893d9e8bf79db9f5ff7d... -
04:38 PM Bug #16500: Argument is added to both splat and last &block argument
- mame (Yusuke Endoh) wrote:
> * The behavior of `args = [1, 2, -> {}]; foo( *args, &args.pop)` should pass `[1, 2, ->{}]`, and we should fix the bug on the ruby interpreter.
Why is that better than the previous behavior?
Changing t... -
12:12 AM Bug #16500: Argument is added to both splat and last &block argument
- Ruby 2.7 partially changed the behavior. Coped from my comment: https://github.com/ruby-grape/grape/issues/1967#issuecomment-573366122
```ruby
# in 2.6 or before
args = [1, 2, -> {}]; foo( *args, &args.pop) #=> passes [1, 2] (bug... -
04:27 PM Feature #16499: define_method(non_lambda) should not change the semantics of the given Proc
- Eregon (Benoit Daloze) wrote:
> If we do the approach where we just wrap the non-lambda Proc in a lambda automatically it would be compatible for that case.
I'm tired, that's wrong, it would actually return from the file, just like a... -
04:24 PM Feature #16499: define_method(non_lambda) should not change the semantics of the given Proc
- zverok (Victor Shepelev) wrote:
> I believe curent behavior is pretty consistent, as it describes what it would realy accept.
Yes, in that regard it's inconsistent.
It might be impractical though, depending on whether you want somet... -
04:19 PM Feature #16499: define_method(non_lambda) should not change the semantics of the given Proc
- marcandre (Marc-Andre Lafortune) wrote:
> One example is RSpec's `let`:
I guess we'll have to disagree on that one, I think the code below should return from the surrounding method/file.
> ...
I would think very few `let` use `ret... -
02:20 PM Feature #16499: define_method(non_lambda) should not change the semantics of the given Proc
- @eregon what is the exact proposal of this ticket? I am not sure neither from title nor from description :(
As a side note, in regards to the last part:
> They might also look at proc.parameters which gives `[[:opt, :a], [:opt, :b]... -
01:42 PM Feature #16505 (Closed): Improve preformance of `RubyVM::InstructionSequence#to_binary`
- ## Abstract
Within #to_binary, deduplication of objects output to binary is performed, but the current implementation is achieved by a linear search of an array of objects (=`obj_list`). (https://github.com/ruby/ruby/blob/e288632f22b18b... -
12:36 PM Bug #16497: StringIO#internal_encoding is broken (more severely in 2.7)
- A bit more discussion on fixing the behavior, after discussing on Reddit.
Basically, it is two ways to fix it:
1. Just return to 2.6 behavior
2. Fully implement `internal_encoding` for StringIO
I believe **2 (make it use `intern... -
10:54 AM Revision e288632f (git): Clean generated ChangeLog [ci skip]
-
10:52 AM Revision 8afd304f (git): Ignore existing ChangeLog file and generate always [ci skip]
-
10:43 AM Revision b34f39e8 (git): vcs.rb: Allow to empty a part in commit log
-
10:39 AM Revision cccfc667 (git): Added make target to export the ChangeLog file
-
03:28 AM Feature #16485 (Closed): Make rexml, rss to the bundled gems
- Applied in changeset commit:git|c3ccf23d5807f2ff20127bf5e42df0977bf672fb.
----------
Make rexml library to the bundle gems
[Feature #16485][ruby-core:96683] - 03:28 AM Revision ae69aea3 (git): * 2020-01-12 [ci skip]
-
03:28 AM Revision ca654670 (git): Allow failures with rss tests on test-bundled-gems
-
03:28 AM Revision c7ef7d8a (git): Also ignored cve_2014_8080_spec
-
03:28 AM Revision e61cab3a (git): Ignore rexml examples on ruby/spec
-
03:28 AM Revision 83240f31 (git): Make rss library to the bundle gems
- [Feature #16485][ruby-core:96683]
-
03:28 AM Revision c3ccf23d (git): Make rexml library to the bundle gems
- [Feature #16485][ruby-core:96683]
01/11/2020
-
11:59 PM Bug #16500: Argument is added to both splat and last &block argument
- ioquatix (Samuel Williams) wrote:
> On Ruby 2.7.0:
> ...
I'm not sure if that behavior is buggy. puts ignores a passed block, so the behavior seems expected.
```ruby
def a(*args, &b)
p [args, b]
end
x = [1, 2, ->{}]; a(*x, &... -
11:44 PM Bug #16500 (Open): Argument is added to both splat and last &block argument
- On Ruby 2.7.0:
```
irb(main):020:-> x = [1, 2, ->{}]; puts(*x, &x.pop)
1
2
=> nil
irb(main):021:-> x = [1, 2, ->{}]; puts(*x, &x.last)
1
2
#<Proc:0x0000562763a56398 (irb):21 (lambda)>
=> nil
```
This seems like buggy beha... -
01:28 AM Bug #16500 (Rejected): Argument is added to both splat and last &block argument
- https://github.com/ruby-grape/grape/issues/1967
-
01:21 AM Bug #16500: Argument is added to both splat and last &block argument
- https://github.com/ruby-grape/grape/blob/d58dc0ab7a0b51625217deedd8110d1030be7cf7/lib/grape/middleware/stack.rb#L80-L84 is probably responsible for the failure.
-
12:52 AM Bug #16500: Argument is added to both splat and last &block argument
- We cannot reproduce this.
Can you make some script to reproduce this in isolation?
Including Gemfile and Gemfile.lock details. -
12:31 AM Bug #16500: Argument is added to both splat and last &block argument
- Thank you for the report! I cannot reproduce the issue by a simple config.ru:
```
require "rack/oauth2"
use Rack::OAuth2::Server::Resource::Bearer, 'The API' do |request|
request.access_token
end
```
Adding `p args` into ... -
12:00 AM Bug #16500 (Closed): Argument is added to both splat and last &block argument
- Here is a followup for a ruby2.7 issue discussed here https://gitlab.com/groups/gitlab-org/-/epics/2380
I run gitlab with ruby2.7. gitlab/lib/api/api_guard.rb calls Rack's `use` method:
```ruby
use Rack::OAuth2::Server::Resource... -
10:44 PM Bug #16503 (Closed): "ret: 2, hash modified during iteration" error in Ruby 2.7.0
- I am running a Rails app on Heroku. After upgrading to Ruby 2.7, I sometimes get `ret: 2, hash modified during iteration` error.
The same issue is reported here (I'm using meta-tags gem too):
https://github.com/kpumuk/meta-tags/issue... -
10:44 PM Feature #16499: define_method(non_lambda) should not change the semantics of the given Proc
- > I believe exactly 0 people want foo { return 42 } to change its meaning based on whether foo calls define_method or not.
This is wrong, there is at least me 😅
I believe that many API use `define_method` for metaprogramming and al... -
08:48 PM Feature #8709: Dir.glob should return sorted file list
- The benchmark numbers above show a difference of 12%
That is probably the worst case, because usually, globs will return fewer entries (though for some strange reason I get a 20% diff on a dir with 200 entries)
and usually some pro... -
11:35 AM Feature #8709: Dir.glob should return sorted file list
- I added this issue to the next meeting's agenda:
https://bugs.ruby-lang.org/issues/16454 -
11:33 AM Feature #8709: Dir.glob should return sorted file list
- Here are some benchmark results in the ruby repository:
```
$ ruby -e 'p Dir["**/*"].size'
12171
$ ruby -rbenchmark -e '10.times { p Benchmark.realtime { Dir["**/*"] } }'
0.017877419999422273
0.015390422999189468
0.01525595... -
11:32 AM Feature #8709: Dir.glob should return sorted file list
- I have no opinion about this feature.
-
11:27 AM Feature #8709 (Open): Dir.glob should return sorted file list
- I agree always sorting the result of `Dir.glob` makes sense.
Non-determinism caused by Dir.glob is very annoying and IMHO doesn't feel like Ruby.
I would also expect sorting is a low overhead compared to syscalls, so performance-wise I... -
11:18 AM Feature #8709 (Rejected): Dir.glob should return sorted file list
- Do not update the `status` without a maintainer's decision.
-
06:28 AM Feature #8709 (Open): Dir.glob should return sorted file list
- There are two problems with unsorted glob:
1) it is different from glob in C, bash and perl that all sort by default. Even GNU make finally switched back to sorted wildcard/glob ( https://savannah.gnu.org/bugs/index.php?52076 )
2) ... -
08:44 PM Feature #11747: "bury" feature, similar to 'dig' but opposite
- A one-liner alternative for hash-only cases can be implemented using `Enumerable#reduce`:
```
root = {}
[:a, :b, :c].reduce(root){@1[@2]||={}}[:d] = 'E' # root => {:a=>{:b=>{:c=>{:d=>"E"}}}}
```
-
08:38 PM Feature #11747: "bury" feature, similar to 'dig' but opposite
- A proposal to specify the path for `bury` with classes as values of a hash arg:
```
{}.bury(users: Array, 0 => Hash, name: Hash, something: 'Value') # {user: [{name: {something: 'Value'}]}
```
So all absent nodes could be created... -
02:59 PM Feature #16502 (Feedback): Add option :allow_trailing_comma to JSON#parse
- The json library has another upstream repository: https://github.com/flori/json
Could you please send a pull request to them? -
02:43 PM Feature #16502 (Closed): Add option :allow_trailing_comma to JSON#parse
- Hello everyone,
I'd like to be able to parse JSON sources that contain trailing commas in arrays and/or objects.
For example,
``` ruby
> JSON.parse('[1,2,3,]')
JSON::ParserError: 416: unexpected token at ']'
```
I have c... -
12:34 PM Bug #16496: Numbered Parameter not parsed properly in lambda
- We are now migrating. If we change it immediately, a program that uses `_1` as a method name will break. So it is now warned:
```
warning: `_1' is reserved for numbered parameter; consider another name
```
After enough time, we... -
11:50 AM Bug #16496 (Feedback): Numbered Parameter not parsed properly in lambda
-
11:49 AM Bug #16496: Numbered Parameter not parsed properly in lambda
- mame (Yusuke Endoh) wrote:
> `_1 *1` is parsed as `_1(*1)`, a call to a method `_1` with a variable-length argument with `1`. It is the same as `p * ary` and `p *ary`. You can see a warning under verbose mode:
> ...
Hi Yusuke, thank ... -
11:35 AM Misc #16454: DevelopersMeeting20200116Japan
- * [Feature #16484] Remove xmlrpc and net-telnet from bundled gems
* Does anyone have an objection?
-
11:34 AM Misc #16454: DevelopersMeeting20200116Japan
- * [Feature #8709] Dir.glob should return sorted file list (eregon)
* It causes non-determinism on e.g., Linux, which causes complex bugs (which are not worth investigating)
* Many other languages seem to sort by default (C's glob(3... -
11:33 AM Feature #16484 (Assigned): Remove xmlrpc and net-telnet from bundled gems
-
11:19 AM Revision 012f2973 (git): Get rid of use of magic number 'E'
-
11:07 AM Bug #16501: Support marshaling of ruby2_keywords flag
- Makes sense to me that Marshal knows how to preserve that flag.
(Sidekiq used Marshal in previous versions, but switched to a manual copy for efficiency) -
06:31 AM Bug #16501 (Closed): Support marshaling of ruby2_keywords flag
- This patch makes Marshal.dump and load aware of ruby2_keywords flag.
https://github.com/ruby/ruby/pull/2830
```
def bar(key:)
key
end
ruby2_keywords def foo(*args)
args = Marshal.load(Marshal.dump(args))
bar(*args)
e... -
07:24 AM Revision e62aead2 (git): Add branch option to checkout on push
-
03:16 AM Bug #16497: StringIO#internal_encoding is broken (more severely in 2.7)
- Note the StringIO is _not_ transcoding. it is simply changing the encoding "tagging" of the String without changing any bytes.
If the string was ASCII-8BIT (ie BINARY), there is really *no way* to transcode. But here's an example whe... -
01:58 AM Bug #16480 (Closed): Ruby 2.7, C++, and rb_define_method compilation error
- The arities must be eventually compile-time constants for the nature.
I think this case is quite special, and it is resolved in that project. -
01:43 AM Revision 7584853c (git): st_delete_wrap is no longer used
-
01:42 AM Revision eb737916 (git): Warn when :newline precedes other newline options
-
01:42 AM Revision 8bb24712 (git): Added assertions for newline decorators
- 01:40 AM Revision 52a9e4ff (git): * 2020-01-11 [ci skip]
-
01:40 AM Revision 40c57ad4 (git): Let execution context local storage be an ID table
01/10/2020
-
10:36 PM Feature #16499 (Rejected): define_method(non_lambda) should not change the semantics of the given Proc
- From https://bugs.ruby-lang.org/issues/15973?next_issue_id=15948&prev_issue_id=15975#note-38
But I think we should change `define_method(&non_lambda)` because that currently confusingly treats the same block body differently (e.g., th... -
10:21 PM Feature #15973: Let Kernel#lambda always return a lambda
- Yes, sorry I should not have mentioned `define_method` here, even though it's related it's not the main topic.
I'll make a new issue for it (#16499). -
02:36 PM Misc #16487: Potential for SIMD usage in ruby-core
- Just to confirm, `__attribute__(target(""))` is how PHP does it:
- https://github.com/php/php-src/blob/7ce531f2c28dcfe4aeed271b55b82de65c3bca8a/ext/standard/base64.c#L370-L371
- https://github.com/php/php-src/blob/7ce531f2c28dcf... -
02:12 PM Misc #16487: Potential for SIMD usage in ruby-core
- > use __target__ attributes
thanks for the links, very helpful
> ...
yes, sometimes it's possible and it would be great, but
1/ it requires a lot of effort to convince the compiler to do what you want. It's basically about good da... -
01:22 PM Misc #16487: Potential for SIMD usage in ruby-core
- > My concern here is who can read, understand and maintain that code?
> ...
It's a totally understandable concern. A few responses to that:
- In that specific case, the UTF8 spec probably won't change before a while, so that limits... -
12:29 PM Misc #16487: Potential for SIMD usage in ruby-core
- The code in https://github.com/Shopify/ruby/pull/2/files looks rather arcane to me.
I guess that's often the case for SIMD code in C.
My concern here is who can read, understand and maintain that code?
Such complexity is likely to hav... -
12:20 PM Misc #16487: Potential for SIMD usage in ruby-core
- > for maximum portability, you should use -march=x86-64
Oh I see what you mean now.
Apparently the solution for this is to use `__target__` attributes:
- GCC: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html... -
11:35 AM Misc #16487: Potential for SIMD usage in ruby-core
- > Could you extend on that ? I'm not sure I understand what you mean here.
for maximum portability, you should use `-march=x86-64`
in this case, even if your current CPU supports AVX, the compiler can't use AVX instructions for a r... -
09:49 AM Misc #16487: Potential for SIMD usage in ruby-core
- > You can't use for example AVX instructions generated from a regular C code, even if your processor supports it. You have to recompile it for your platform, that's a pain of all C programs.
Could you extend on that ? I'm not sure I u... -
07:36 AM Misc #16487: Potential for SIMD usage in ruby-core
- Could we do something that allows us to install a gem that gives us the speedup by rerouting stuff in MRI?
Then you could install a pre-compiled binary of ruby if you wish and do `gem install ruby-simd` to get the optimised code path... -
05:09 AM Misc #16487: Potential for SIMD usage in ruby-core
- > Do you have any practical applications whose performance is significantly improved by the SIMD hacks? I'm unsure about coderange_scan, but it is difficult for me to imagine an application that String#strip is a bottleneck.
I agree, ... -
02:08 AM Misc #16487: Potential for SIMD usage in ruby-core
- Do you have any practical applications whose performance is significantly improved by the SIMD hacks? I'm unsure about `coderange_scan`, but it is difficult for me to imagine an application that `String#strip` is a bottleneck.
-
01:57 PM Revision b53d8230 (git): Fixed the wrong url for benchmark
-
01:56 PM Revision e0436605 (git): Update the upstream repository of bundler
-
01:18 PM Bug #16497 (Assigned): StringIO#internal_encoding is broken (more severely in 2.7)
-
11:18 AM Bug #16497 (Assigned): StringIO#internal_encoding is broken (more severely in 2.7)
- To the best of my understanding from [Encoding](https://docs.ruby-lang.org/en/master/Encoding.html) docs, the following is true:
* external encoding (explicitly specified or taken from `Encoding.default_external`) specifies how the IO... -
12:48 PM Revision 7693897a (git): Reduced duplicate code
-
12:47 PM Bug #16498 (Closed): Hash#transform_values in 2.7.0 sets new hash's default to old hash's default_proc
- Applied in changeset commit:git|1b4d406e3a04032b6d01e92b6d184a16945c6ac3.
----------
Hash#transform_values should return a plain new Hash
[Bug #16498] -
11:23 AM Bug #16498 (Closed): Hash#transform_values in 2.7.0 sets new hash's default to old hash's default_proc
- The following is unexpected for me.
```ruby
Hash.new { }.transform_values { }.default
# => #<Proc:0x000055eecda01510 -e:1>
Hash.new { }.transform_values { }[:any]
# => #<Proc:0x0000563a12e35510 -e:1>
Hash.new { :default }.transfo... -
12:44 PM Revision 1b4d406e (git): Hash#transform_values should return a plain new Hash
- [Bug #16498]
-
12:17 PM Revision 135b533e (git): add missing #include
-
12:17 PM Revision 13064fe5 (git): avoid undefined behaviour when n==0
- ISO/IEC 9899:1999 section 6.5.7 states that "If the value of the right
operand is negative or is greater than or equal to the width of the
promoted left operand, the behavior is undefined". So we have to take
care of such situations.
T... -
12:17 PM Revision 79dcd26a (git): more use of MSC_VERSION_SINCE
- Replaces `#ifdef _MSC_VER` with more accurate version checks. Also,
`defined(_WIN64) && defined(__AVX2__)` is redundant because there is no
such tihng like a 32bit AVX2 machine. -
12:17 PM Revision 7fed7eb5 (git): fix Windows breakage
- Fixing typo revealed that _BitScanReverse is BSR, which behaves
differently than LZCNT. What we want here is LZCNT so we have to
emulate. -
12:17 PM Revision db0398dc (git): fix typos
-
06:34 AM Feature #5781: Query attributes (attribute methods ending in `?` mark)
- sudo (Sudo Nice) wrote:
> How about implementing it similarly to Crystal?
> ...
+1 -
06:33 AM Feature #11167: Allow an attr_ variant for query-methods that end with a question mark '?' character, such as: def foo? returning @foo
- Like that!
sudo (Sudo Nice) wrote:
> How about implementing it similarly to Crystal?
> ...
https://bugs.ruby-lang.org/issues/5781#note-16 -
02:49 AM Bug #16496 (Rejected): Numbered Parameter not parsed properly in lambda
- `_1 *1` is parsed as `_1(*1)`, a call to a method `_1` with a variable-length argument with `1`. It is the same as `p * ary` and `p *ary`. You can see a warning under verbose mode:
```
$ ruby -w -e '-> { _1 *1 }.call'
-e:1: warnin... -
02:21 AM Bug #16496 (Rejected): Numbered Parameter not parsed properly in lambda
- The space between `*` and `1` changes the lambda behaviour, looks like numbered parameter `_1` is not parsed properly
```
2.7.0 :001 > l = -> { _1 * 1 }
2.7.0 :002 > l[2]
=> 2
2.7.0 :003 > l2 = -> { _1 *1 }
2.7.0 :004 > l2[2]
T... -
02:47 AM Feature #16476: Socket.getaddrinfo cannot be interrupted by Timeout.timeout
- Dan0042 (Daniel DeLorme) wrote:
> +1
> ...
Thanks for feedback Daniel!
I've put a PR with the suggested fix: https://github.com/ruby/ruby/pull/2827 -
02:00 AM Misc #16454: DevelopersMeeting20200116Japan
- * [Feature #16495] Inconsistant Quotes in Error Messages (mame)
* This is the third time that we receive a ticket about the backtick and quote in error messages: #12321 for inconvenience in Slack, #13589 for weird appearance and incon... -
01:28 AM Misc #16454: DevelopersMeeting20200116Japan
- alanwu (Alan Wu) wrote:
> I would like to see discussion about [Misc #16487] itself. My notes are a bit of an aside, but I think the outcome of #16487 will set a precedent at least. I can make tickets about additional documentations lat... -
01:28 AM Revision 0a67c214 (git): Ensure seed data to be cleared
- To prevent from leaking the seed data.
-
01:28 AM Revision 499de0a0 (git): Fill siphash salt directly with random data
- Expanding less random data with MT is not needed when it
succeeded. -
01:04 AM Feature #16495: Inconsistent quotes in error messages
- This combination is very common, e.g., Emacs, TeX, etc.
-
12:36 AM Feature #16495: Inconsistent quotes in error messages
- Hmm. Is this encoding-related perhaps? I remember having had that when I used ISO (ISO-8859-1 specifically, and
a non-utf locale too). Nowadays, with Unicode, I don't seem to have this inconsistent quote - but I understand
what you ref... -
12:09 AM Revision 54e31f4a (git): Update dependencies for c6b26f5ccf9296f7fbb23c055401c4f55d32efa0
01/09/2020
-
11:35 PM Bug #16480: Ruby 2.7, C++, and rb_define_method compilation error
- nobu (Nobuyoshi Nakada) wrote:
> Doesn't `#undef rb_define_method` in that file work?
Ah yes it looks like it does and thanks for putting together the PR. -
02:14 PM Bug #16480: Ruby 2.7, C++, and rb_define_method compilation error
- Doesn't `#undef rb_define_method` in that file work?
-
09:54 PM Feature #16495 (Closed): Inconsistent quotes in error messages
- Error messages use inconsistent pairs of quotes, for instance:
```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```
where a back tick is used on the left-hand side, and a single quote is ... - 09:11 PM Revision 5bdc6a01 (git): * 2020-01-10 [ci skip]
-
09:11 PM Bug #16469 (Closed): Wrong warning message at `URI.encode` and `URI.decode`
- Applied in changeset commit:git|d3b28ebc7ac527724831a9fb9ec2f963235f9a21.
----------
Fix warnings for URI.encode and URI.decode
Use __callee__ to display the called method.
Fixes [Bug #16469] -
09:09 PM Revision d3b28ebc (git): Fix warnings for URI.encode and URI.decode
- Use __callee__ to display the called method.
Fixes [Bug #16469] -
07:20 PM Misc #16454: DevelopersMeeting20200116Japan
- mame (Yusuke Endoh) wrote:
> alanwu (Alan Wu) wrote:
> ...
I would like to see discussion about [Misc #16487] itself. My notes are a bit of an aside, but I think the outcome of #16487 will set a precedent at least. I can make tickets a... -
02:07 PM Misc #16454: DevelopersMeeting20200116Japan
- Okay updated.
-
01:38 PM Misc #16454: DevelopersMeeting20200116Japan
- @mame Here is an updated version of the script which also works if there is no ` (author)` at the end of a comment:
https://gist.github.com/eregon/b4aa78dca42e4204e3a276c922205ade
This seems a common mistake, both zverok (in comment ... -
10:14 AM Misc #16454: DevelopersMeeting20200116Japan
- * [Feature #16494] Allow hash unpacking in non-lambda Proc
* allow `map { |foo:, bar:| ... }` just like array unpacking to `map { |foo, bar| ... }` is allowed. The ticket contains pragmatic examples. -
03:01 PM Bug #13758: TestRubyOptions#test_segv_setproctitle segfaults on AARCH64
- Was there some change/improvement in this area? I am trying Ruby 2.7.0 and I have not seen this issue during several past build attempts. Therefore I wonder if this was fixed or I am just lucky, because this used to fail annoyingly often.
-
02:57 PM Revision c6b26f5c (git): io.c, ruby.c: include internal/variable.h for rb_gvar_readonly_setter
- Same as 053f78e13988e9253d1f207bf5e23d9505112b32.
emscripten requires a prototype declaration of rb_gvar_readonly_setter
if it is refered as a function pointer. -
12:41 PM Revision 4c5eac73 (git): Renamed `init_seed` as `init_hash_salt` too
-
12:34 PM Misc #16487: Potential for SIMD usage in ruby-core
- I wanted to add just a short comment - while byroot is quite possibly correct in regards to most users
using pre-packaged binaries (probably), there are also folks (like me, and others) who compile ruby
from source. These could benefit... -
05:29 AM Misc #16487: Potential for SIMD usage in ruby-core
- I would like to support this. The linked pull request shows 20x speed up for `coderange_scan`, which is definitely worth the hustle.
Of course decreased portability & maintainability are problems. We have to somehow handle them. Le... -
12:32 PM Revision 661e07c9 (git): Moved the definition of `rb_define_method_if_constexpr`
- Inside the block where `RB_METHOD_DEFINITION_DECL` family are
defined. -
11:37 AM Bug #16492: TestBugReporter#test_bug_reporter_add test failures
- > Could you attach the reported error log's build.log file?
I meant that people might want to compare the build environment between Fedora project's build system and Travis, such as gcc version, the compiler flags, `make` command opti... -
11:08 AM Bug #16492: TestBugReporter#test_bug_reporter_add test failures
- Note seeing Travis's latest 5 s390x jobs, the s390x jobs have done successfully.
This error does not happen on Travis s390x case.
https://travis-ci.org/ruby/ruby/branches
Could you attach the reported error log's build.log file?
... -
09:17 AM Bug #16492 (Closed): TestBugReporter#test_bug_reporter_add test failures
- Building Ruby packages on Fedora, in 90% of cases, I observe the following error on s390:
~~~
1) Error:
TestBugReporter#test_bug_reporter_add:
Timeout::Error: execution of assert_in_out_err expired timeout (10 sec)
pid 2061293 k... -
10:34 AM Bug #16486: Hash.ruby2_keywords?(hash) and Hash.ruby2_keywords!(hash)
- Copying from the discussion of the PR:
> @eregon IMO, the mutating version is enough here because it is not for a casual use; in the ActiveJob case, mutating version is slightly preferable (as @kamipo said), and currently there is no ... -
10:13 AM Feature #16494 (Rejected): Allow hash unpacking in non-lambda Proc
- First of all, I fully understand the value of separating "real" keyword arguments and disallowing implicit and unexpected conversions to/from hashes.
There is, though, one **convenient style which is now broken**:
```ruby
# words is... -
09:39 AM Bug #16493 (Closed): TestThreadQueue#test_thr_kill is flaky on AArch64
- I can see quite often `TestThreadQueue#test_thr_kill` failing on AArch64:
~~~
1) Failure:
TestThreadQueue#test_thr_kill [/builddir/build/BUILD/ruby-2.7.0/test/ruby/test_thread_queue.rb:153]:
only 48/250 done in 60 seconds.
~~~
... -
08:26 AM Revision 23fbee03 (git): Renamed `seed` as `hash_salt`
- The role of this is a so-called "salt" but not "seed", rename to
get rid of confusion with other "seed" of PRNG. -
07:41 AM Feature #16491 (Rejected): ruby string scan can not support full regex string feature
- Try this regex:
```
/<testsuites(?:(?!<\/testsuites>).|\n)+<\/testsuites>/m
```
`String#scan` returns an array of whole matched strings if the regex has no capture, but it returns captured strings (`$1`, `$2`, ...) if the regex c... -
07:31 AM Feature #16491 (Rejected): ruby string scan can not support full regex string feature
- I have a complex regex string which works fine with match method, but fails with scan. and I think it is because the scan method does not implement full function link match. please see attached test file.
the test match regex is /<tes... -
07:00 AM Revision 97485302 (git): Also clear MT to initialize the siphash seed
-
06:58 AM Revision b0e9db65 (git): Include the standard `id` command output
- On macOS, GNU coreutils `id` is limited to NGROUPS_MAX groups,
because of the backward compatibility of getgroups(2). -
05:16 AM Feature #13383: [PATCH] Module#source_location
- We now have `Module#const_source_location` #10771, which tells us where the module was named as a constant (which is usually the same as where the module was created). If that fulfills the purpose of this issue, then this issue should be...
-
03:59 AM Feature #13383: [PATCH] Module#source_location
- I might have a go at this over the next month or two.
-
03:17 AM Bug #16490 (Third Party's Issue): mkmf.rbの非互換な変更
- tmailのrubygem 1.2.7.1をインストールする際に、
```
make "DESTDIR="
make: don't know how to make /usr/pkg/include/ruby-2.7.0/defines.h. Stop
```
といったエラーを起こします。Makefileの最後の依存関係の記述は
```
###
tmailscanner.o: tmailscanner.c $(hdrdir)/ruby.h $(arc... -
01:22 AM Feature #16489 (Open): Make rb_warn_deprecated a public API
- For extension libraries developers, `rb_warn_deprecated` should be useful to warn the API deprecation.
How about make it a public API? -
01:13 AM Revision b369f5e8 (git): Fixed up 0eeed5bcc5530edb0af2af2ccff09d067c59e8f9
- `Binding#source_location` returns the `__FILE__` when created, and
may not be an absolute or real path. And in the `eval` context
with an explicit file name, `__dir__` also returns that name.
On the other hand, `__FILE__` in `require`d ... -
01:04 AM Revision d254d556 (git): vcs.rb: Get rid of Kernel#open
01/08/2020
-
11:53 PM Bug #16486: Hash.ruby2_keywords?(hash) and Hash.ruby2_keywords!(hash)
- A memo for the dev-meeting discussion
* What we should provide as `Hash.ruby2_keywords!`? mutating version, non-mutating version, or both?
* Should it raise a FrozenError if a hash is frozen? -
11:19 AM Bug #16486: Hash.ruby2_keywords?(hash) and Hash.ruby2_keywords!(hash)
- @Dan0042 Very good point, I agree there should be no way to change that flag inplace, since there isn't currently (`**h` will copy Hash).
Knowing that the flag can never change for a given Hash instance is a useful guarantee, e.g., when... -
11:24 PM Bug #16488: 2.7 spews warnings about net/imap
- I've pushed https://github.com/ruby/ruby/commit/65c2c75e162ebc8c4b35b0823967eeb132c00749. Could you please check if the fix works for your program? Thanks!
-
11:23 PM Bug #16488 (Closed): 2.7 spews warnings about net/imap
- Applied in changeset commit:git|65c2c75e162ebc8c4b35b0823967eeb132c00749.
----------
lib/net/imap.rb: use `&blk` instead of Kernel#proc with no block
[Bug #16488] -
10:41 PM Bug #16488 (Closed): 2.7 spews warnings about net/imap
- I just upgraded from 2.6.5 to 2.7.0. Some of my scripts are now emitting warnings that weren't there before. Eg., #16469.
Specifically in this report I want to complain that ruby 2.7 is issuing warnings about it's own net/imap libra... -
11:21 PM Revision 65c2c75e (git): lib/net/imap.rb: use `&blk` instead of Kernel#proc with no block
- [Bug #16488]
-
11:20 PM Misc #16454: DevelopersMeeting20200116Japan
- alanwu (Alan Wu) wrote:
> * [Misc #16487] Potential for SIMD usage in ruby-core (alanwu)
> ...
I'm unsure what topic should be discussed. Do you want us to discuss not the issue itself but a policy for feature request? I think it wou... -
10:47 PM Misc #16454: DevelopersMeeting20200116Japan
- * [Misc #16487] Potential for SIMD usage in ruby-core (alanwu)
* It would be great if we can come up with a stance on this and document it. It doesn't have to be permanent; we can revise it later, but I think the policy can be very he... -
12:59 PM Misc #16454: DevelopersMeeting20200116Japan
- * [Feature #16463] Fixing *args-delegation in Ruby 2.7: ruby2_keywords semantics by default in 2.7.1 (eregon)
* This would be a way to make transition to Ruby 2.7 a lot simpler. Advantages are: easier migration (no explicit `ruby2_key... -
10:06 PM Bug #16361 (Closed): TestEnv#test_fetch failure
- Okay, thanks!
-
03:35 PM Bug #16361: TestEnv#test_fetch failure
- The test case was relaxed by [1] similarly to my initial proposal. If this is desired fix and not just workaround, then this could be closed.
[1]: https://github.com/ruby/ruby/commit/9914d6e992a69587e6d43ba7eaa6cdda9f178f8e -
08:23 PM Bug #9573: descendants of a module don't gain its future ancestors, but descendants of a class, do
- Attached is a work-in-progress patch that includes similar support for `Module#prepend`. It does work in terms of `Module#prepend` affecting classes/modules that have already included the receiver, but it causes failures in the tests th...
-
07:53 PM Revision 1d09acd8 (git): [DOC] Improve docs for String#match
- Fix invalid code to make it syntax highlighted; other small fixes.
- 07:51 PM Revision 841a945d (git): * 2020-01-09 [ci skip]
-
07:47 PM Revision f74021e1 (git): Improve docs for String#=~
- Move existing example to the corresponding paragraph and
add an example for `string =~ regexp` vs. `regexp =~ string`;
avoid using the receiver's identifier from the call-seq
because it does not appear in rendered HTML docs;
mention depr... -
04:13 PM Misc #16487: Potential for SIMD usage in ruby-core
- The topic is
* portability between architectures
* portability in a architecture
* maintenanceability
## Portability between architectures
Though some compilers provides intrinsics for SIMD instructions, introducing SIMD needs m... -
02:22 PM Misc #16487: Potential for SIMD usage in ruby-core
- SIMD Everywhere seem very interesting, but from a quick check it seems that all the fallbacks are applied during compilation, which means you'd have to compile ruby yourself to get the benefits.
If we want most users to benefits from ... -
10:58 AM Misc #16487: Potential for SIMD usage in ruby-core
- > The downside of SIMD instructions is that they are not universally available.
So it means maintaining several versions of the same code, and switching them either statically or dynamically.
There is a library simde: SIMD Everywhere... -
09:48 AM Misc #16487 (Open): Potential for SIMD usage in ruby-core
- ### Context
There are several ruby core methods that could be optimized with the use of SIMD instructions.
I experimented a bit on `coderange_scan` https://github.com/Shopify/ruby/pull/2, and Pavel Rosický experimented on `String#s... -
03:58 PM Bug #14175 (Closed): TestResolvMDNS#test_mdns_each_address fails
- This was very likely resolved via #14340
-
09:35 AM Revision 23218d4a (git): config.status should be newer than config.cache if exists
-
09:14 AM Revision 5b06dd3a (git): Hoisted out call_default_proc
-
09:13 AM Revision b8fa1807 (git): Adjusted indents [ci skip]
-
09:09 AM Revision 592d7cee (git): Speeds up fallback to Hash#default_proc in rb_hash_aref by removing a method call
-
09:00 AM Revision 13f4f07f (git): Merge bundler-2.1.4
- 03:30 AM Revision f518b608 (git): * 2020-01-08 [ci skip]
-
03:26 AM Revision beb59c3b (git): Add GC guard
- Try to fix infrequent error:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris10-sunc/ruby-master/log/20200108T010004Z.fail.html.gz
```
1) Error:
DRbTests::TestDRbSSLCore#test_02_basic_object:
RangeError: "348" is recycled objec... -
12:38 AM Misc #16483: How about stopping new *.tar.bz2 releases?
- If bz2 removal goes forward, it might be nice to deprecate now but not remove until later. It'd be ideal to have working versions of RVM, ruby-install and ruby-build in wide distribution before bz2 goes away. If we change the tools now b...
01/07/2020
-
05:57 PM Bug #16474 (Feedback): [ASYNC BUG]
- Unfortunately, this bug report does not provide enough information to diagnose this issue. If you can provide a reproducible example of this problem, that would be helpful.
You may want to try using a native Windows Ruby instead of u... -
05:53 PM Bug #16469: Wrong warning message at `URI.encode` and `URI.decode`
- We can probably use `__callee__` instead of hard coding the method names, that should fix this issue:
```diff
diff --git a/lib/uri/common.rb b/lib/uri/common.rb
index b886923c9e..e3ed405857 100644
--- a/lib/uri/common.rb
+++ b/lib... -
04:44 PM Bug #9573: descendants of a module don't gain its future ancestors, but descendants of a class, do
- Attached is a patch that implements support for this for `Module#include`, but not `Module#prepend`. It passes `make check`. I'm not sure if we want to support this for `Module#include` but not `Module#prepend`, as it would make them i...
-
03:37 PM Feature #16476: Socket.getaddrinfo cannot be interrupted by Timeout.timeout
- +1
This has been an issue for a very long time, and it's often been handled by installing an asynchronous DNS resolver gem, but it would be nice if it "just worked". If it's really as simple as using `getaddrinfo_a`, that sounds great. -
02:08 PM Bug #16486: Hash.ruby2_keywords?(hash) and Hash.ruby2_keywords!(hash)
- I would like to recommend this be a non-mutating method. Instead of `Hash.ruby2_keywords!(hash)` it should be something like `hash = Hash.as_ruby2_keywords(hash)` to prevent misuse.
-
01:23 PM Bug #11014: String#partition doesn't return correct result on zero-width match
- IIRC this has to do with zero-length matches being ignored in certain conditions, in particular having to do with repeating/multiple matches.
if `"foo".split(/\A/)` was `["","foo"]`
then `"foo".split(//)` would have to be `["","f","o... -
10:04 AM Bug #11014: String#partition doesn't return correct result on zero-width match
- The problem is not just for `partition`, but also involves `split` and `scan`.
I think your regex `/^=*/` is unnecessarily complex. Your point can be made by `/\A/`, which is simpler.
I tried with four regex patterns `/\A/`, `/\A.*... -
10:04 AM Bug #16472 (Closed): OStruct documentation is lost
-
07:10 AM Misc #16483: How about stopping new *.tar.bz2 releases?
- RVM also primarily uses bz2.
-
04:38 AM Misc #16483: How about stopping new *.tar.bz2 releases?
- I prefer to remove bz2 from release packages. I can change to use gz from bz2 at ruby-build.
- 03:23 AM Revision f132825f (git): Disable IPv6 on Travis s390x case. (#2819)
- This fixes following error that sometimes happens once in a few times
on Travis s390x environment.
```
$ tool/travis_retry.sh sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
+ sudo -E apt-add-repository -y ppa:ubuntu-toolcha... -
02:18 AM Bug #16367 (Third Party's Issue): stdin not support ibm866 encoding for windows
- Given that https://github.com/piotrmurach/tty-prompt/issues/115#issuecomment-557919189 says that the `tty-prompt` library uses a native C API, and this issue can only be reproduced on Windows, I strongly suspect this is an issue in `tty-...
-
01:39 AM Feature #16461: Proc#using
- Eregon (Benoit Daloze) wrote:
> shugo (Shugo Maeda) wrote:
> ...
No, you can't have `/` be the original one once `block.using(DivRefinement)` is called.
I don't come up with use cases using conflicting refinements in the
same block...