https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112020-06-11T09:11:03ZRuby Issue Tracking SystemRuby master - Bug #16950: Stop nonsense keyword argument warnings in 2.6https://redmine.ruby-lang.org/issues/16950?journal_id=860912020-06-11T09:11:03Zkamipo (Ryuta Kamizono)
<ul></ul><p>Using non-keyword argument is not always workaround for that.</p>
<p>For example, redis 4.2.0 gem has changed options hash to kwargs.</p>
<p>To address kwargs warnings, we need to add ** to the method call, it works for both redis 4.2.0 and 4.1.4 with using Ruby 2.7.</p>
<p>But if we use Ruby 2.6, adding ** works for redis 4.2.0, but raise the warning for redis 4.1.4.</p>
<p><a href="https://github.com/redis/redis-rb/blob/v4.2.0/lib/redis.rb#L816" class="external">https://github.com/redis/redis-rb/blob/v4.2.0/lib/redis.rb#L816</a><br>
<a href="https://github.com/redis/redis-rb/blob/v4.1.4/lib/redis.rb#L790" class="external">https://github.com/redis/redis-rb/blob/v4.1.4/lib/redis.rb#L790</a></p>
<p>Strictly speaking, there is a way to avoid the warning by checking RUBY_VERSION (and gem version).</p>
<p>But I've finally given up to address the warning in the Rails codebase.</p>
<p><a href="https://github.com/rails/rails/commit/37c19f7ebcf542af968a4983b3296b9fa283a0dc#diff-60aba42516f795d80ed6f18ad14c1f6aR401" class="external">https://github.com/rails/rails/commit/37c19f7ebcf542af968a4983b3296b9fa283a0dc#diff-60aba42516f795d80ed6f18ad14c1f6aR401</a></p> Ruby master - Bug #16950: Stop nonsense keyword argument warnings in 2.6https://redmine.ruby-lang.org/issues/16950?journal_id=860972020-06-11T14:05:12Zjeremyevans0 (Jeremy Evans)merch-redmine@jeremyevans.net
<ul><li><strong>Is duplicate of</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/16632">Bug #16632</a>: Remove verbose warning on treating keyword splat as positional argument in Ruby 2.6</i> added</li></ul> Ruby master - Bug #16950: Stop nonsense keyword argument warnings in 2.6https://redmine.ruby-lang.org/issues/16950?journal_id=862232020-06-18T08:24:26Zusa (Usaku NAKAMURA)usa@garbagecollect.jp
<ul></ul><p>I see, I'll patch later.</p> Ruby master - Bug #16950: Stop nonsense keyword argument warnings in 2.6https://redmine.ruby-lang.org/issues/16950?journal_id=905962021-02-25T22:27:58Zjeremyevans0 (Jeremy Evans)merch-redmine@jeremyevans.net
<ul></ul><p><a class="user active user-mention" href="https://redmine.ruby-lang.org/users/9">@usa (Usaku NAKAMURA)</a> It looks like this hasn't yet been fixed in Ruby 2.6. Is it possible to fix this in Ruby 2.6 before Ruby 2.6 goes into security maintenance mode?</p> Ruby master - Bug #16950: Stop nonsense keyword argument warnings in 2.6https://redmine.ruby-lang.org/issues/16950?journal_id=906542021-02-28T14:33:19Zusa (Usaku NAKAMURA)usa@garbagecollect.jp
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>Backport</strong> changed from <i>2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN</i> to <i>2.5: DONTNEED, 2.6: DONE, 2.7: DONTNEED</i></li></ul><p>patched to ruby_2_6 at r67899.</p>