Activity
From 07/11/2020 to 07/17/2020
07/17/2020
- 11:37 PM Revision 6f5f15f1 (git): * 2020-07-18 [ci skip]
-
11:37 PM Revision 8d233301 (git): Fix MonitorMixin when the super's initialize has kwargs
-
11:09 PM Bug #17031: `Kernel#caller_locations(m, n)` should be optimized
- Reviewing the related code in vm_backtrace.c, you are correct. This occurs both for `caller` and `caller_locations`. The entire internal backtrace object is generated by `rb_ec_backtrace_object`, and then passed to a function that look...
-
09:44 PM Bug #17032 (Closed): BigDecimal's `to_d` behaves inconsistent compared to `to_f`
- `NilClass#to_d` was added in Ruby 2.6. As it is not security-related (and seems more like a new feature than a bug fix), it will not be backported to Ruby 2.5, as that is in security maintenance mode.
-
05:48 PM Bug #17034: Unexpected behavior in #max for beginless range
- citizen428 (Michael Kohl) wrote:
> I think this is not ideal. Possible solutions:
> ...
I think a `RangeError` is more correct. Without having a beginning, you cannot know the increment value, and therefore cannot know the maximum val... -
04:26 PM Bug #17034: Unexpected behavior in #max for beginless range
- citizen428 (Michael Kohl) wrote:
> I think this is not ideal. Possible solutions:
> ...
I had some time and looked into this. For inclusive integer ranges `r.end` will now be returned, no other behavior changes. Patch attached, but sin... -
04:00 AM Bug #17034 (Closed): Unexpected behavior in #max for beginless range
- When calling `max` on a beginless range, a non-intuitive error gets raised:
``` ruby
r = ..9
r.max
# ArgumentError: comparison of NilClass with 9 failed
```
There's a check for `NIL_P(RANGE_BEG(range))` but it's inside another ... -
03:39 PM Misc #17035 (Closed): is non-symbol key hash spread a bug or a feature?
- chucke (Tiago Cardoso) wrote:
> ``` ruby
> ...
This is an expected new feature in ruby 2.7, and will not break in future ruby versions. `**` is the keyword splat operator. In ruby <2.7, `"a"` is not a valid keyword key, but in ruby 2.... -
03:16 PM Misc #17035 (Closed): is non-symbol key hash spread a bug or a feature?
- Coming from https://github.com/jruby/jruby/issues/6327#issuecomment-659577894
I've queried jruby about a bug I found, only to find that the behaviour is correct for the ruby versions jruby emulates.
The following:
``` ruby
{*... -
02:29 PM Feature #17016: Enumerable#accumulate
- mame (Yusuke Endoh) wrote in #note-14:
> Is this what you want?
> ...
Oh interesting, I hadn't considered that approach! That is very close to the behavior of the scan operation, and might be a good way to implement it. (The only diffe... -
10:39 AM Feature #16029: Expose fstring related APIs to C-extensions
- Yes I saw it this morning. Now that it's assigned and likely to be merged soon. We can probably close this issue as duplicate.
-
09:23 AM Feature #16029: Expose fstring related APIs to C-extensions
- See https://bugs.ruby-lang.org/issues/13381#note-6
-
09:22 AM Feature #13381: [PATCH] Expose rb_fstring and its family to C extensions
- I'd suggest `buff` => `buffer`, I don't think it's worth abbreviating that.
BTW, there is `rb_alloc_tmp_buffer` so `buff` would be inconsistent.
Is `rb_str_pool(VALUE)` useful?
I think it could be `rb_str_uminus()` (or just `rb_func... -
04:19 AM Feature #13381: [PATCH] Expose rb_fstring and its family to C extensions
- Nobu and I discussed the name, we want to choose `rb_str_pool` terminology.
* `rb_str_pool` prefix
* `rb_str_pool(VALUE)`
* `rb_str_pool_buff(const char *ptr, long len)`
* `rb_str_pool_cstr(const char *ptr)`
* `rb_enc_st... -
12:07 AM Bug #17033: Infinite Traceback when encountering an Exception while catching an Exception
- (Oh I see, this and https://bugs.ruby-lang.org/issues/14566#change-71448 were independent)
07/16/2020
-
05:47 PM Feature #16470: Issue with nanoseconds in Time#inspect
- I also don't see much use for fractional nanoseconds.
`clock_gettime()` never has higher resolution than nanoseconds.
In fact both JRuby and TruffleRuby always round to an integer number of nanonseconds, because `java.time` supports nan... -
05:25 PM Feature #16470: Issue with nanoseconds in Time#inspect
- mame (Yusuke Endoh) wrote in #note-12:
> I guess nanosecond (nine digits after the decimal point) would be enough in many use cases, but I'm not 100% sure.
I don't think support for fractional nanoseconds is important. Does anyone h... -
09:32 AM Feature #16470: Issue with nanoseconds in Time#inspect
- We need to understand the use case precisely. Does OP want to pass a general Float value to `Time.utc`? Or does he just want to specify nanosecond?
I think of no practical use case for the former (passing a general/calculated Float). ... -
05:17 PM Bug #17017: Range#max & Range#minmax incorrectly use Float end as max
- I've added a pull request to restore compatibility for Range#max with integer beginning and Float::Infinity end: https://github.com/ruby/ruby/pull/3326
I think this pull request should require matz approval because it is a deliberate ... -
09:31 AM Bug #17017: Range#max & Range#minmax incorrectly use Float end as max
- Let me provide another incompatibility/breaking change since this commit.
One of the Rails validation, `validates_length_of(:title, within: 5..Float::INFINITY)` raises `Infinity (FloatDomainError)` with Ruby 2.8.0dev.
This behavior o... -
04:31 PM Feature #11689: Add methods allow us to get visibility from Method and UnboundMethod object.
- I'd also like to advocate for this. We're working on a gem that allows you to easily memoize a method while still preserving that method's visibility, and without `Method#visibility` we have to [awkwardly hack around it](https://github.c...
-
08:36 AM Bug #14541: Class variables have broken semantics, let's fix them
- Note that while setting a top-level immediately raises:
```
$ ruby -e '@@a=42'
-e:1:in `<main>': class variable access from toplevel (RuntimeError)
``... -
05:17 AM Feature #17016: Enumerable#accumulate
- Is this what you want?
```
irb(main):001:0> (1..).lazy.enum_for(:inject, 0).map {|a, b| a + b }.take(10).force
=> [1, 3, 6, 10, 15, 21, 28, 36, 45, 55]
``` -
04:14 AM Misc #17019: DevelopersMeeting20200720Japan
- * [Feature #16812] Allow slicing arrays with ArithmeticSequence
* I made a patch.
* [Feature #14722] python's buffer protocol clone
* I made a implementation proposal. -
04:13 AM Feature #14722: python's buffer protocol clone
- I'm working on writing a patch for this issue in https://github.com/ruby/ruby/pull/3261.
-
02:49 AM Revision 1fb4e280 (git): skip inlining cexpr! that are not attr! inline
- Requested by ko1.
- 01:44 AM Revision 5d5b8a33 (git): * 2020-07-16 [ci skip]
- 01:43 AM Revision 23846486 (git): Remove fiber HTTP test.
- The HTTP test hits a remote website which isn't always available and is
not self-contained. Ideally we will rewrite this test with an internal
web server.
07/15/2020
-
11:44 PM Bug #17023: How to prevent String memory to be relocated in ruby-ffi
- tenderlove@ruby-lang.org wrote:
> Right, that makes sense. I really need to document this (and
> I apologize for not doing so already), but
> `rb_gc_register_address` will pin your objects. When you know
> you're done with the ref... -
08:00 PM Bug #17023: How to prevent String memory to be relocated in ruby-ffi
- larskanis (Lars Kanis) wrote in #note-7:
> So actually I was looking for something like `rb_obj_mark_unmovable()` to pin the string. FFI could call this function on all string pointers passed to C. In FFI we don't know how long the stri... -
07:35 PM Bug #17023: How to prevent String memory to be relocated in ruby-ffi
- Thank you Aaron for looking into this! The patch avoids that the particular string is relocated, but unfortunately the patch is not sufficient to avoid relocation of any strings given to FFI. A slightly modified version of the script fai...
-
04:56 PM Feature #16987: Enumerator::Lazy vs Array methods
- I used Lazy all the time. There is nothing to be done here about its popularity.
FWIW, People knew about it, but choose not to rely on it because they want to support old versions of Ruby.
Hence, it is not very popular in open-source s... -
04:40 PM Bug #17017: Range#max & Range#minmax incorrectly use Float end as max
- jeremyevans0 (Jeremy Evans) wrote in #note-10:
> With current Ruby, you should use an endless range instead of range with an infinite end.
Endless ranges are 2.6+. Ruby 2.5 is not yet EOL. RuboCop supports 2.4 and other gems support ... -
03:58 PM Bug #17017: Range#max & Range#minmax incorrectly use Float end as max
- marcandre (Marc-Andre Lafortune) wrote in #note-9:
> jeremyevans0 (Jeremy Evans) wrote in #note-7:
> ...
With current Ruby, you should use an endless range instead of range with an infinite end.
The previous behavior of returning `F... -
03:37 PM Bug #17017 (Open): Range#max & Range#minmax incorrectly use Float end as max
- jeremyevans0 (Jeremy Evans) wrote in #note-7:
> koic (Koichi ITO) wrote in #note-6:
> ...
I should have been more clear when I commented to take care of Infinity, but I believe that previous behavior should remain. Since there is no `I... -
07:19 AM Bug #17017: Range#max & Range#minmax incorrectly use Float end as max
- Thank you for your reply. For now I've learned that updating to `(42.to_f..Float::INFINITY)` will prevent the error.
-
05:24 AM Bug #17017: Range#max & Range#minmax incorrectly use Float end as max
- koic (Koichi ITO) wrote in #note-6:
> I encountered a breaking change in RuboCop repository when using ruby 2.8.0dev.
> ...
Yes, it is expected behavior, at least to me. I believe the Ruby 2.7 behavior is wrong, because a range that s... -
12:47 AM Bug #17017: Range#max & Range#minmax incorrectly use Float end as max
- I encountered a breaking change in RuboCop repository when using ruby 2.8.0dev.
https://github.com/rubocop-hq/rubocop/blob/v0.88.0/lib/rubocop/comment_config.rb#L110
So, I have a question. Is this an expected behaviour?
Ruby 2.7.1... -
04:11 PM Bug #17031: `Kernel#caller_locations(m, n)` should be optimized
- Sure
```
Calculating -------------------------------------
short_backtrace 28.315k (± 7.1%) i/s - 141.984k in 5.044733s
long_backtrace 24.168k (± 8.7%) i/s - 120.900k in 5.050243s
no_caller_locations ... -
02:30 PM Bug #17031: `Kernel#caller_locations(m, n)` should be optimized
- Could you post the results of running that on your computer?
Then it's easier to see your point without needing to reproduce. -
02:33 PM Revision 9f4b7fc8 (git): Check warning flags only if available to run with old versions
-
02:32 PM Feature #17016: Enumerable#accumulate
- For the name I think just `scan` would be best then.
And accept the fact it's completely unrelated to `String#scan`. -
02:04 PM Bug #17033 (Closed): Infinite Traceback when encountering an Exception while catching an Exception
- Applied in changeset commit:git|579645d9f870fa4116dcd3200bbbb6e2c0b7f400.
----------
Fixed infinite loop at error in printing cause [Bug #17033] -
04:45 AM Bug #17033: Infinite Traceback when encountering an Exception while catching an Exception
- NickHackman (Nick Hackman) wrote:
> In Ruby 2.7.1 when an Exception occurs and another occurs when handling the first one it results in an infinite Traceback that doesn't mention the error.
> ...
If this is an actual issue is it possib... -
04:39 AM Bug #17033 (Closed): Infinite Traceback when encountering an Exception while catching an Exception
- In Ruby 2.7.1 when an Exception occurs and another occurs when handling the first one it results in an infinite Traceback that doesn't mention the error.
```ruby
class MyException < StandardError
def initialize(obj)
@obj = ob... -
12:39 PM Revision 579645d9 (git): Fixed infinite loop at error in printing cause [Bug #17033]
-
07:36 AM Revision 79d06483 (git): Close sockets if blocking to fix leaked fds
-
07:05 AM Revision 5783d0db (git): Import remaining changes
- The "sync with commits" scripts failed to properly import these for some
reason. -
07:05 AM Revision 0c8d90b5 (git): [rubygems/rubygems] Unswallow `Gem::Package::FormatError`
- This error happen in a CI run, and as it is currently, it doesn't give
any useful information about the underlying cause. Let's not swallow the
original error.
https://github.com/rubygems/rubygems/commit/8c17ba2f45 -
07:05 AM Revision 1f719542 (git): [rubygems/rubygems] July man pages
- https://github.com/rubygems/rubygems/commit/58d9a3de5b
-
07:05 AM Revision fd709382 (git): [rubygems/rubygems] Tag the specs with :readline
- The newly added specs needs to be tagged as
:readline, otherwise they fail on Windows with
the backtrace: `ZeroDivisionError: divided by 0`.
Such issues are already being skipped on Windows.
Signed-off-by: Utkarsh Gupta <utkarsh@debian... -
07:05 AM Revision c44c7019 (git): [rubygems/rubygems] Add tests with different flag combinations
- Since this PR was made because we missed checking
RuboCop offenses with different flags, therefore
adding tests so that all flag combinations are
tested.
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
https://github.com/rubygems/rub... -
07:05 AM Revision 4f9c673c (git): [rubygems/rubygems] Allow setting a tag prefix to be used by gem release tasks
- https://github.com/rubygems/rubygems/commit/679008f23a
-
07:05 AM Revision ca133c03 (git): [rubygems/rubygems] Fix line spacing to make Layout/EmptyLines happy
- The Gemfile wasn't properly put in the last commit.
As a result, Layout/EmptyLines inspected an offense
in the Gemfile.
This also fixes the spec w.r.t change in the task
default.
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
https... -
07:05 AM Revision 95f90e3d (git): [rubygems/rubygems] Add blank lines to make Bundler/OrderedGems happy
- If the blank lines aren't used, then rubocop tries to
sort them in alphabetical order within their section.
Thus, adding lines so rubocop considers them as
different sections and doesn't try to sort them.
Signed-off-by: Utkarsh Gupta <u... -
07:05 AM Revision 281898ed (git): [rubygems/rubygems] Fix Rakefile to make Style/SymbolArray happy
- In case of multiple Rake tasks, the default tasks would
look something like this:
`task default: [:spec, :rubocop]`
Instead, they should use %i and look something like this:
`task default: %i[spec rubocop]`
Signed-off-by: Utkarsh Gupta... -
07:05 AM Revision 8c65f612 (git): [rubygems/rubygems] Fix remaining RuboCop issues
- With #3731 and #3740 merged, this covers up the
remaining part of the issues.
This was discovered when one tries to create a gem
with a different framework.
Could be reproduced with:
`bundle gem foo --ext --test=test-unit`
Signed-off-by... -
07:05 AM Revision 40f73b3a (git): [rubygems/rubygems] Avoid calling LoadError#message because of its slowness
- Instead we can rely on `LoadError#path`
https://github.com/rubygems/rubygems/commit/16d5c3b43c -
07:05 AM Revision 2fafc08a (git): [rubygems/rubygems] Remove unneeded trailing conditions on exitstatus
- https://github.com/rubygems/rubygems/commit/27e0e4ecb6
-
07:05 AM Revision 547ba660 (git): [rubygems/rubygems] Easier way to find path to ruby binary
- https://github.com/rubygems/rubygems/commit/cdc201f5c4
-
07:05 AM Revision 16823d4a (git): [rubygems/rubygems] Remove unnecessary assertions on exitstatus
- Since our helpers now raise by default if the subcommand fails, these
will never actually fail and are not necessary.
https://github.com/rubygems/rubygems/commit/6153b9321e -
07:05 AM Revision e2837a77 (git): [rubygems/rubygems] Constrain (shipped) RuboCop's version
- Right now, we're not specifying the version constraints
on RuboCop that is shipped when a new gem is created.
This can break specs which runs rubocop on a new
skeleton gem as the newer versions of RuboCop are
released.
This commit ensur... -
07:05 AM Revision 17b92d22 (git): [rubygems/rubygems] No need to update remotes
- Everything is already fetched locally.
https://github.com/rubygems/rubygems/commit/9c304639b1 -
07:05 AM Revision d189d31c (git): [rubygems/rubygems] Git clone already takes care of this
- https://github.com/rubygems/rubygems/commit/6e0c28d3ab
-
07:05 AM Revision a73ea212 (git): [rubygems/rubygems] Clone rubygems from the local repo
- It simplifies things and should avoid issues like the one we had where
the master branch had a bad `.gitattributes` file and changing it on a
PR would be disregarded.
In order for this to work, we need to make sure to fetch all tags fro... -
07:05 AM Revision 5ebca6d7 (git): [rubygems/rubygems] Skip this spec on ruby_core workflow
- ruby_core has an 'ast.rb' file that gets in the
middle and breaks this spec, so it's better we skip
this test on this workflow for now.
Also, slightly change the spec name from "run" to
"runs" and change the last assertion, it's cleaner... -
07:05 AM Revision d0810fde (git): [rubygems/rubygems] Use latest version of rubocop for RUBY_VERSION > 2.4
- With older versions of rubocop, the dependency on
`jaro_winkler` seems to be a pain.
However, in the later versions of rubocop, this
dependency was dropped. So we only need to use
the older version for ruby2.3.
Signed-off-by: Utkarsh Gu... -
07:05 AM Revision 077dcacb (git): [rubygems/rubygems] Use `--config .rubocop.yml` instead
- because rubocop configuration inheritance is
messed up and when using `--ignore-parent-exclusion`,
even though the exit status is 0, the example
still fails because of the configuration issue.
Signed-off-by: Utkarsh Gupta <utkarsh@debia... -
07:05 AM Revision ecb87b55 (git): [rubygems/rubygems] Lock rubocop version to 0.80.1
- The later RuboCop versions don't work with ruby2.3
so we should lock the version to what works with
ruby2.3 as we haven't dropped the support yet.
And since we're using the older version of rubocop,
also fix `Max` value of `LineLength` ... -
07:05 AM Revision 215f7c31 (git): [rubygems/rubygems] Fix linting and make Style/RedundantInterpolation happy
- Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
https://github.com/rubygems/rubygems/commit/83e330fa87 -
07:05 AM Revision 4875a96e (git): [rubygems/rubygems] Fix test to run rubocop on the generated gem
- With this, it will be ensured that the generated
(skeleton) gem will have no offenses.
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
https://github.com/rubygems/rubygems/commit/47411262e0 -
07:05 AM Revision b28c6d04 (git): [rubygems/rubygems] Make Style/HashSyntax cop happy
- Previously, we were using the old syntax like:
`task :default => :spec`, but now this commit
uses the new Ruby 1.9 hash syntax.
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
https://github.com/rubygems/rubygems/commit/b41d0fdb56 -
07:05 AM Revision 449d2420 (git): [rubygems/rubygems] WIP: add test to run rubocop on the generated gem
- Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
https://github.com/rubygems/rubygems/commit/730b770f8a -
07:05 AM Revision cbe4d29c (git): [rubygems/rubygems] Roll back to Dir.chdir block
- since without that, evaluating the gemspec from
outside `File.expand_path( __dir__)` won't work.
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
https://github.com/rubygems/rubygems/commit/9e5e52a1d9 -
07:05 AM Revision 084489be (git): [rubygems/rubygems] Fix tests pertaining to newgem
- Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
https://github.com/rubygems/rubygems/commit/e2ee0b7de3 -
07:05 AM Revision 3b0d2a3d (git): [rubygems/rubygems] Fix RuboCop offenses
- These offenses appear when you create a gem with
`bundle gem foo` and run `rubocop` over it.
Initially, there were around 45 offenses detected,
but with #3731 and this, the number of offenses
have been reduced to 2.
Signed-off-by: Utka... -
07:05 AM Revision 2b73f26f (git): [rubygems/rubygems] Show also output from all commands on rubygems checkout errors
- https://github.com/rubygems/rubygems/commit/1fe24e471d
-
07:05 AM Revision 5ae80c52 (git): [rubygems/rubygems] Remove `--quiet` flag to `git checkout`
- Since we don't show this output by default, it's better to be verbose
in case we happen to need more info.
https://github.com/rubygems/rubygems/commit/baa4ccf5a6 -
07:05 AM Revision 23cf99e9 (git): [rubygems/rubygems] Bundler specs - Windows - remove skips, File.open => File.readlines
- Using File.open without a block leaves a file reference that causes issues with file operations
commands/binstubs_spec.rb
install/gems/compact_index_spec.rb
install/gems/dependency_api_spec.rb
install/gems/standalone_spec.rb
runtime/exe... -
07:05 AM Revision ad743337 (git): [rubygems/rubygems] bundler/spec/commands/binstubs_spec.rb - remove global Windows skip
- Added one skip for:
bundle binstubs <gem>
when the gem exists in the lockfile
when generating bundle binstub outside bundler
should abort
https://github.com/rubygems/rubygems/commit/b77b484889 -
07:05 AM Revision f3ad8a00 (git): [rubygems/rubygems] bundler/lib/bundler/installer.rb - fix Windows 'executable_stubs'
- Windows normal shell requires binstubs with *.cmd extensions
https://github.com/rubygems/rubygems/commit/b46326eb1f - 06:57 AM Revision 48ba9b61 (git): Update actions/cache from v1 to v2
- Signed-off-by: Sora Morimoto <sora@morimoto.io>
-
04:36 AM Revision c25d249e (git): RBasci::flags (VALUE) doesn't match int.
- The type of RBasic::flags is VALUE, and INT2FIX(flags) does not
make sense. Use correct type to represent. - 02:22 AM Revision dfe88350 (git): * 2020-07-15 [ci skip]
-
02:21 AM Revision fc220b12 (git): rubygems is needed to run solo-file test
-
02:21 AM Revision c87ee800 (git): rubygems is needed to run solo-file test
07/14/2020
-
07:56 PM Bug #17032 (Closed): BigDecimal's `to_d` behaves inconsistent compared to `to_f`
- I would expect `to_f` and `to_d` to behave identically. Specifically, `nil.to_d` should behave like `nil.to_f`.
```ruby
require 'bigdecimal'
require 'bigdecimal/util'
nil.to_f # => 0.0
nil.to_d # >> NoMethodError (undefined method... -
07:07 PM Bug #17031 (Closed): `Kernel#caller_locations(m, n)` should be optimized
- `Kernel#caller_locations(1, 1)` currently appears to needlessly allocate memory for the whole backtrace.
It allocates ~20kB for a 800-deep stacktrace, vs 1.6 kB for a shallow backtrace.
It is also much slower for long stacktraces: ab... -
06:20 PM Feature #17016: Enumerable#accumulate
- Eregon (Benoit Daloze) wrote in #note-6:
> Maybe `prefix_sum` or just `prefix` or something like that would work?
> ...
I agree that including "sum" in the name is confusing. I think that "prefix_sum" is just used to describe the sum o... -
05:50 PM Feature #17016: Enumerable#accumulate
- shyouhei (Shyouhei Urabe) wrote in #note-10:
> It might be possible to let inject be lazy if we ignore backwards compatibility. But how do we partially evaluate that lazy enumerator then?
I think this is the crux of the issue. Becau... -
01:46 PM Bug #17030: Enumerable#grep{_v} should be optimized for Regexp
- nobu (Nobuyoshi Nakada) wrote in #note-4:
> Even without a block, `grep` sets `$~` to the last match result.
I agree with @eregon, doesn't seem like it makes much sense to use that.
There's also no valid reason it should set `$~` ... -
01:28 PM Bug #17030: Enumerable#grep{_v} should be optimized for Regexp
- nobu (Nobuyoshi Nakada) wrote in #note-4:
> Even without a block, `grep` sets `$~` to the last match result.
I guess cases using `$~` after the call to `grep` are very rare (notably because only the last match of the Enumerable would... -
10:25 AM Bug #17030: Enumerable#grep{_v} should be optimized for Regexp
- Even without a block, `grep` sets `$~` to the last match result.
-
03:37 AM Bug #17030: Enumerable#grep{_v} should be optimized for Regexp
- You are right for `grep` with a block, we can't necessarily optimize, but we should optimize `grep` without a block, no?
-
01:24 AM Bug #17030: Enumerable#grep{_v} should be optimized for Regexp
- Yes but E#grep's allocating MatchData is by spec. You can observe `$&` etc. by passing a block to it.
```ruby
p %w[q w e r].grep(/./) { $~ }
```
So this is at least a breaking change. -
04:19 AM Revision e60cd14d (git): ON_DEBUG: delete unused macro
- This is no longer used.
-
04:15 AM Revision 8d3a0845 (git): _mjit_compile_invokebuiltin: sp_inc can be negative
- Was my bad to assume sp_inc was positive. Real criteria is the
calculated sp is non-negative. We have to assert that. -
03:30 AM Bug #17028: On the latest OpenSSL adaptation
- OpenSSL 1.1.1d is out-of-date a little.
With which version of ruby did you build it?
07/13/2020
-
10:06 PM Bug #17027: Connection leak possibility in Net::FTP#transfercmd
- https://github.com/ruby/net-ftp/pull/2
-
04:57 PM Bug #17027: Connection leak possibility in Net::FTP#transfercmd
- Your patch looks good to me. However, the net/ftp library is maintained in a separate repository. Please submit your patch as a pull request to https://github.com/ruby/net-ftp/pulls.
-
11:00 AM Bug #17027: Connection leak possibility in Net::FTP#transfercmd
- Is this patch correct?
Should I close connection use `shutdown` and `read`?
```diff
--- /Users/koshigoe/.rbenv/versions/2.7.1/lib/ruby/2.7.0/net/ftp.rb.orig 2020-07-13 19:41:53.000000000 +0900
+++ /Users/koshigoe/.rbenv/versions/2.... -
10:51 AM Bug #17027: Connection leak possibility in Net::FTP#transfercmd
- Fixed only about ACTIVE mode?
-
10:46 AM Bug #17027: Connection leak possibility in Net::FTP#transfercmd
- Oops
https://bugs.ruby-lang.org/issues/9872 -
10:44 AM Bug #17027 (Closed): Connection leak possibility in Net::FTP#transfercmd
- https://github.com/ruby/ruby/blob/bad7ab35d1e38f47b09f15fc5750387ac73b2286/lib/net/ftp.rb#L542-L556
https://github.com/ruby/net-ftp/blob/14d2544190f7e4b77b41a3fd0c676f5b8ebd238c/lib/net/ftp.rb#L542-L556
The connection `conn` may not ... -
09:51 PM Feature #16984: Remove write barrier exemption for T_ICLASS
- Edit: I noticed that T_ICLASS wasn't marking the shared method and constant table on master. My notes
about reducing the number of `gc_mark` references on the heap were incorrect.
-
09:01 PM Bug #17029: URI.parse considers https://example.com/### invalid when browsers consider it valid
- It's not valid according to RFC 3986 (the URI standard) but that is pretty old now. I suspect switching from the IETF URI spec to the WHATWG URL spec would have other consequences, too.
-
05:38 PM Bug #17029: URI.parse considers https://example.com/### invalid when browsers consider it valid
- This does seem like a bug to me. It looks like `https://example.com/###` should be an valid URL with a fragment of `##`. However, the uri library is maintained in a separate repository. Please submit this as an issue to https://github...
-
05:33 PM Bug #17029 (Closed): URI.parse considers https://example.com/### invalid when browsers consider it valid
- I have a form with `<input type="url" required>` and in the backend, I try to extract the domain with `URI.parse(url).host`
A user was able to submit a value like `https://example.com/###` which passed the browser's validation check, ... -
08:27 PM Bug #17030: Enumerable#grep{_v} should be optimized for Regexp
- Code to reproduce by @fatkodima:
```ruby
require 'benchmark-ips'
require 'benchmark-memory'
arr = %w[foobar foobaz bazquux hello world just making this array longer]
REGEXP = /o/
def select_match(arr)
arr.select { |e| e.match?(REGE... -
08:26 PM Bug #17030 (Closed): Enumerable#grep{_v} should be optimized for Regexp
- Currently,
```ruby
array.select { |e| e.match?(REGEXP) }
```
is about three times faster and six times more memory efficient than
```ruby
array.grep(REGEXP)
```
This is because `grep` calls `Regexp#===`, which creates use... -
05:55 PM Bug #17023: How to prevent String memory to be relocated in ruby-ffi
- This is fixed in 6e7e7c1e577d6c2276e9a8cc85c28c55c46c2618. I tried cherry picking the commit to ruby_2_7, but got a conflict. I've attached the patch with the conflict resolved.
Thanks for reporting this! -
05:09 PM Bug #17017 (Closed): Range#max & Range#minmax incorrectly use Float end as max
- Applied in changeset commit:git|8900a25581822759daca528d46a75e0b743fc22e.
----------
Fix Range#{max,minmax} for range with integer beginning and non-integer end
Previously, for inclusive ranges, the max would show up as the
end of the ... -
05:09 PM Revision 8900a255 (git): Fix Range#{max,minmax} for range with integer beginning and non-integer end
- Previously, for inclusive ranges, the max would show up as the
end of the range, even though the end was not an integer and would
not be the maximum value. For exclusive ranges, max/minmax would
previously raise a TypeError, even though... - 05:07 PM Revision a1bcfbe3 (git): * 2020-07-14 [ci skip]
-
05:06 PM Revision 46d1777a (git): Remove --jit-min-calls for now
- --jit-min-calls=5 is too unstable
-
05:03 PM Bug #16116 (Closed): ruby2.6.3(x86/x64) use win32ole could not new Object, return 0x80070057
-
04:47 PM Feature #10911: IPAddr.new should ignore zone identifiers
- I've submitted a pull request to the ipaddr repository for this: https://github.com/ruby/ipaddr/pull/24
-
01:06 PM Bug #17028 (Feedback): On the latest OpenSSL adaptation
- Can you file its details to http://github.com/ruby/openssl?
-
12:19 PM Bug #17028 (Closed): On the latest OpenSSL adaptation
- I just compiled ruby, but it failed to compile under OpenSSL 1.1.1d. Due to changes in ABI and detection macro, there were various errors. I even modified the following file to complete the compilation:
1. Note the full code of `opens... -
10:07 AM Bug #17026 (Closed): Backport 26c179d7e7e7ae0eb21050659c3e8778358230ab to fix ObjectSpace._id2ref
- [26c179d7e7e7] fixes SEGV at non-numeric argument to `ObjectSpace._id2ref`.
[26c179d7e7e7]: https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/26c179d7e7e7ae0eb21050659c3e8778358230ab -
09:45 AM Bug #16896 (Closed): MakeMakefile methods should be private
- Applied in changeset commit:git|c2a6295ec04a191c689d22254ac1ad5d665e27ad.
----------
Make the mkmf methods private in the global [Bug #16896] -
09:44 AM Revision c2a6295e (git): Make the mkmf methods private in the global [Bug #16896]
-
05:10 AM Revision d99d96cc (git): Add --jit-min-calls=5 (#3313)
- * RUN_OPTS needs to be specified for overriding it
* Add --jit-min-calls=5 -
04:28 AM Bug #17025 (Closed): `Time#ceil` does not work like `Rational#ceil` or `Float#ceil`
- ## Current behavior
```
irb(main):011:0> time = Time.utc(2016, 4, 23, 0, 0, "0.123456789".to_r)
irb(main):012:0> time.ceil(9)
=> 2016-04-23 00:00:00.12345679 UTC
irb(main):013:0> time.ceil(10)
=> 2016-04-23 00:00:00 1234567891/10... -
04:28 AM Misc #17019: DevelopersMeeting20200720Japan
- * [Feature #13381] Expose rb_fstring and its family to C extensions (tenderlove)
* Can we expose the fstring family of functions? It seems the answer is "yes" but we need a better name (is this the current status?) -
03:45 AM Revision 2e5a711f (git): common.mk: add missing dependency
-
03:30 AM Revision 927fe242 (git): mk_builtin_loader.rb: STACK_ADDR_FROM_TOP unusable
- Stacks are emulated in MJIT, must not touch the original VM stack.
See also http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3061353 -
02:33 AM Revision 16bc9bf7 (git): [DOC] Use https:// instead of http:// [ci skip]
07/12/2020
-
11:56 PM Revision 7e536b3b (git): builtin.h: avoid copy&paste
- Instead of doubling the invokebuiltin logic here and there, use the same
insns.def definition for both MJIT/non-JIT situations. -
11:56 PM Revision 802bcd3e (git): fix MJIT link error
-
11:56 PM Revision 4506f611 (git): %p is not portable accross platforms
- This commit fixes compiler error on MSVC. %p on that platform is not
suitable to represent a compile-time constant.
https://ci.appveyor.com/project/ruby/ruby/builds/34017163/job/vj2a8uk3gwv9yxak#L24381 -
11:56 PM Revision 2363a16e (git): add comments
-
11:56 PM Revision 5783d84a (git): fix typo
-
11:56 PM Revision 9721f477 (git): inline Primitive.cexpr!
- We can obtain the verbatim source code of Primitive.cexpr!. Why not
paste that content into the JITed program. -
11:56 PM Revision f66e0212 (git): precalc invokebuiltin destinations
- Noticed that struct rb_builtin_function is a purely compile-time
constant. MJIT can eliminate some runtime calculations by statically
generate dedicated C code generator for each builtin functions. -
11:51 PM Feature #17016: Enumerable#accumulate
- It might be possible to let inject be lazy if we ignore backwards compatibility. But how do we partially evaluate that lazy enumerator then?
-
11:32 AM Feature #17016: Enumerable#accumulate
- nobu (Nobuyoshi Nakada) wrote in #note-8:
> It has a backward incompatibility on the return value.
> ...
Right, `inject` might return anything, not necessarily an Array and so returning a "lazy Enumerator" instead will be unwanted in a... -
08:52 AM Feature #17016: Enumerable#accumulate
- Eregon (Benoit Daloze) wrote in #note-7:
> nobu (Nobuyoshi Nakada) wrote in #note-5:
> ...
It has a backward incompatibility on the return value.
I’m afraid if it’s acceptable.
-
04:51 PM Bug #17023: How to prevent String memory to be relocated in ruby-ffi
- Stack scanning should prevent `a` from moving, so you shouldn’t need to do anything to pin this. I will also try this against the master branch, and if it’s fixed there I’ll find the commit that fixed it. Regardless objects that are on...
-
03:57 PM Bug #16896: MakeMakefile methods should be private
- Right, it's used here: https://github.com/ruby/ruby/blob/5d02c1dd14648d95178ac5ec756f5b03fe00d549/ext/-test-/cxxanyargs/extconf.rb#L12
The PR sounds good then, thanks! -
02:25 PM Bug #16896: MakeMakefile methods should be private
- Eregon (Benoit Daloze) wrote in #note-8:
> I think `MakeMakefile.foo` usages are fine, so how about using `module_function`, so on `include` they are private, and when used on the singleton class (`MakeMakefile.foo`) they are public?
... -
11:40 AM Bug #16896: MakeMakefile methods should be private
- nobu (Nobuyoshi Nakada) wrote in #note-3:
> Why do you need to use mkmf outside extconf.rb?
Actually the issue above happened inside `extconf.rb`.
But `extconf.rb` might require anything, including `FFI`, so there can conflicts in `... -
11:37 AM Bug #16896: MakeMakefile methods should be private
- I think `MakeMakefile.foo` usages are fine, so how about using `module_function`, so on `include` they are private, and when used on the singleton class (`MakeMakefile.foo`) they are public?
-
04:07 AM Bug #16896: MakeMakefile methods should be private
- shyouhei (Shyouhei Urabe) wrote in #note-5:
> I'd be happy to rewrite cxxanyargs' extconf.rb if there is an alternative way without a receiver.
I don't think you have to rewrite it, it feels better way for the future.
https://github... -
02:37 AM Bug #16896: MakeMakefile methods should be private
- I'd be happy to rewrite cxxanyargs' extconf.rb if there is an alternative way without a receiver.
- 03:35 PM Revision 5d02c1dd (git): * 2020-07-13 [ci skip]
-
03:31 PM Revision 6c8af6b6 (git): sync_default_gems.rb: Updated comments
- * removed out-of-date and duplicate list
* stated that everything synced from github -
03:30 PM Revision 49cb2345 (git): sync_default_gems.rb: Added `list` subcommand
-
03:14 PM Revision 6cd600ef (git): sync_default_gems.rb: Ignore conflicted files in toplevel more
-
02:41 PM Revision 162d08b8 (git): sync_default_gems.rb: Added -e option to edit when conflicted
-
02:31 PM Bug #17024 (Closed): Times with timezones return incorrect wday and yday
- Applied in changeset commit:git|99a9c3fe2eaab8157765d792dc871da6daea0327.
----------
Fixed yday and wday with timezone [Bug #17024] -
01:01 PM Bug #17024: Times with timezones return incorrect wday and yday
- https://github.com/ruby/ruby/pull/3312
-
12:58 PM Revision 99a9c3fe (git): Fixed yday and wday with timezone [Bug #17024]
- 08:30 AM Revision 90935ff2 (git): * 2020-07-12 [ci skip]
- 08:30 AM Revision 9b433d34 (git): bidecimal: improve tests' independence (#3297)
- Tests depending on the rounding mode must specify the appropriate rounding
mode and restore to the original mode at the end.
07/11/2020
-
05:49 PM Feature #17016: Enumerable#accumulate
- nobu (Nobuyoshi Nakada) wrote in #note-5:
> That sounds like `Enumerator::Lazy` needs `#inject` and `#each_with_object` methods to me.
A lazy `#inject` sounds useful. -
05:47 PM Feature #17016: Enumerable#accumulate
- parker (Parker Finch) wrote in #note-4:
Thanks for your reply, I think it will help to discuss this issue at the dev meeting.
Maybe `prefix_sum` or just `prefix` or something like that would work?
Having `sum` in it is kind of con... -
05:46 AM Feature #17016: Enumerable#accumulate
- parker (Parker Finch) wrote in #note-2:
> Good question! Using `#inject` or `#each_with_object` cannot be done lazily. We need to pass a lazy enumerator *after* applying the fold-like operation. As a toy example, instead of `[1, 2, 3]` w... -
01:01 PM Revision 3b96ad9b (git): Enhanced RDoc for Array#fill (#3301)
- * Enhanced RDoc for Array#fill
* Update array.c
There's one more at 5072. I'll get it.
Co-authored-by: Eric Hodel <drbrain@segment7.net>
* Update array.c
Co-authored-by: Eric Hodel <drbrain@segment7.net>
* Update array.c
Co-autho... -
12:40 PM Bug #17024: Times with timezones return incorrect wday and yday
- For example:
```
$ irb -r tzinfo
irb(main):001:0> Time.new(2020, 1, 1, 0, 0, 0, TZInfo::Timezone.get('America/New_York')).wday
=> 7
irb(main):002:0> Time.new(2020, 1, 1, 0, 0, 0, TZInfo::Timezone.get('America/New_York')).yday
=> 0
... -
10:22 AM Bug #17024 (Closed): Times with timezones return incorrect wday and yday
- The timezone support added to Time in Ruby 2.6 does not appear to handle wday and yday.
I don't know what the most appropriate fix is, but looking at time.c and [the commit which introduced the timezone feature](https://github.com/rub... -
10:11 AM Bug #17023 (Closed): How to prevent String memory to be relocated in ruby-ffi
- As it doesn't seem to occur in the master but only in 2.7, I'll close this and set "Backport to 2.7" required, although I'm not sure if it is a bug.
Aaron, could you tell which commit fixed this? -
12:24 AM Bug #17023 (Assigned): How to prevent String memory to be relocated in ruby-ffi
-
08:01 AM Feature #17022: Addition of method Kernel#Date
- > IMHO, as Date.parse is too heuristic & magical for humans
I agree, what about ISO-8601? -
06:06 AM Feature #17022 (Third Party's Issue): Addition of method Kernel#Date
- Please file at https://github.com/ruby/date.
IMHO, as `Date.parse` is too heuristic & magical for humans, I don't think we should encourage using it. -
07:33 AM Bug #16896: MakeMakefile methods should be private
- I found that `ext/-test-/cxxanyargs/extconf.rb` calls `try_link` with a receiver.
-
06:29 AM Bug #16896 (Feedback): MakeMakefile methods should be private
- Why do you need to use mkmf outside extconf.rb?
-
07:23 AM Revision bad7ab35 (git): test/lib/jit_support.rb: Let JIT tests skip on centos8
- It has the same issue as RHEL 8. k0kubun said he will fix later
-
07:10 AM Revision b4c893a6 (git): OpenSSL 1.1.1 introduces a new '.include' directive. Update our config
- parser to support that.
As mentioned in the referenced GitHub issue, we should use the OpenSSL
API instead of implementing the parsing logic ourselves, but it will
need backwards-incompatible changes which we can't backport to stable
ve... -
06:21 AM Revision eaa2de31 (git): Fixed a comment, wrong binary prefix [ci skip]
-
02:42 AM Revision cbf52087 (git): Fix missing imemo cases in objspace_dump by refactoring
- imemo_callcache and imemo_callinfo were not handled by the `objspace`
module and were showing up as "unknown" in the dump. Extract the code for
naming imemos and use that in both the GC and the `objspace` module.