[#97319] [Ruby master Feature#16667] Allow parameters to Symbol#to_proc and Method#to_proc — jgomo3@...

Issue #16667 has been reported by jgomo3 (Jes俍 Gez).

10 messages 2020/03/01

[#97344] [Ruby master Feature#16670] Reverse order of `expression` in `pattern` for 1-line pattern matching while it's still experimental — ttilberg@...

Issue #16670 has been reported by ttilberg (Tim Tilberg).

9 messages 2020/03/03

[#97355] [Ruby master Misc#16671] BASERUBY version policy — ko1@...

Issue #16671 has been reported by ko1 (Koichi Sasada).

10 messages 2020/03/04

[#97359] [Ruby master Bug#16672] net/http leaves original content-length header intact after inflating response — justin.reid@...

Issue #16672 has been reported by jmreid (Justin Reid).

15 messages 2020/03/04

[#97390] [Ruby master Bug#16677] Negative integer powered (**) to a float number results in a complex — camille.drapier@...

Issue #16677 has been reported by CamilleDrapier (Camille Drapier).

25 messages 2020/03/07

[#97410] [Ruby master Bug#16680] [Breaking Change] Ruby 2.7 not support symlinks folder in $LOAD_PATH to work with autoload. — vil963@...

Issue #16680 has been reported by zw963 (Wei Zheng).

8 messages 2020/03/07

[#97416] [Ruby master Bug#16682] Ruby 2.7.0p0 crash on exit if there is an active RUBY_INTERNAL_EVENT_GC_EXIT tracepoint — jean.boussier@...

Issue #16682 has been reported by byroot (Jean Boussier).

16 messages 2020/03/09

[#97448] [Ruby master Feature#16688] Allow #to_path object as argument to system() — daniel@...42.com

Issue #16688 has been reported by Dan0042 (Daniel DeLorme).

12 messages 2020/03/11

[#97528] [Ruby master Misc#16693] DevelopersMeeting20200410Japan — mame@...

Issue #16693 has been reported by mame (Yusuke Endoh).

12 messages 2020/03/16

[#97536] [Ruby master Bug#16694] JIT vs hardened GCC with PCH — v.ondruch@...

Issue #16694 has been reported by vo.x (Vit Ondruch).

11 messages 2020/03/18

[#97538] [Ruby master Bug#16695] Stack consistency error when using the return value — s.wakeup31@...

Issue #16695 has been reported by s4ichi (takamasa saichi).

10 messages 2020/03/18

[#97554] [Ruby master Bug#16697] Hash.ruby2_keywords_hash?(value) should support any object — eregontp@...

Issue #16697 has been reported by Eregon (Benoit Daloze).

12 messages 2020/03/19

[#97609] [Ruby master Bug#16740] Deprecating and removing the broken Process.clock_getres — eregontp@...

Issue #16740 has been reported by Eregon (Benoit Daloze).

14 messages 2020/03/28

[#97621] [Ruby master Bug#16743] problem with multi threading [BUG] Segmentation fault — pauloo.jansen@...

Issue #16743 has been reported by paulorja (paulo jansen).

12 messages 2020/03/29

[#97629] [Ruby master Feature#16744] Flag to load current bundle without using bundle exec — headius@...

Issue #16744 has been reported by headius (Charles Nutter).

11 messages 2020/03/30

[ruby-core:97483] [Ruby master Bug#16634] DRb remote method call with keyword argument occurs warning message of deprecated on Ruby 2.7.0, and fails on Ruby 2.8.0dev

From: naruse@...
Date: 2020-03-13 14:26:43 UTC
List: ruby-core #97483
Issue #16634 has been updated by naruse (Yui NARUSE).

Backport changed from 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONE

ruby_2_7 2339be74e737b4c5f5330f845af2e7db0c7450e1.

----------------------------------------
Bug #16634: DRb remote method call with keyword argument occurs warning message of deprecated on Ruby 2.7.0, and fails on Ruby 2.8.0dev
https://bugs.ruby-lang.org/issues/16634#change-84631

* Author: TOKI.Yoshinori (仁謙 土岐)
* Status: Closed
* Priority: Normal
* ruby -v: ruby 2.8.0dev (2020-02-14 master 78282d4655) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONE
----------------------------------------
DRb remote method call with keyword argument occurs warning message of deprecated on Ruby 2.7.0, and fails on Ruby 2.8.0dev

On Ruby 2.7.0 (`ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]`), DRb remote method call with keyword argument occurs warning message of deprecated.
On Ruby snapshot (`ruby 2.8.0dev (2020-02-14 master 78282d4655) [x86_64-linux]`), DRb remote method call with keyword argument fails.

Test Script:

```ruby
#!/usr/bin/env ruby

require 'drb'
require 'securerandom'
require 'test/unit'

def make_drbunix_uri
  "drbunix:/tmp/#{File.basename($0, '.rb')}.#{SecureRandom.uuid}"
end

DRb.start_service(make_drbunix_uri)

class DRbRemoteMethodCallTest < Test::Unit::TestCase
  class Example
    def ping
      :pong
    end

    def foo(test: 'default')
      test
    end

    def bar(test: 'default')
      yield(test)
    end
  end

  def wait_server(remote_object)
    begin
      remote_object.ping
    rescue DRb::DRbConnError
      sleep(0.1)
      retry
    end
  end

  def setup
    @uri = make_drbunix_uri
    @pid = fork{
      DRb.start_service(@uri, Example.new)
      DRb.thread.join
    }

    @remote_object = DRbObject.new_with_uri(@uri)
    wait_server(@remote_object)
  end

  def teardown
    Process.kill(:TERM, @pid)
    Process.wait
  end

  test 'pass keyword argument to remote method call' do
    assert_equal('halo', @remote_object.foo(test: 'halo'))
  end

  test 'pass keyword argument to remote method call with block' do
    assert_equal('halo', @remote_object.bar(test: 'halo') {|t| t })
  end
end
```

Output (`ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]`):

```
$ ruby test_drb_kw_args.rb -v
Loaded suite test_drb_kw_args
Started
DRbRemoteMethodCallTest:
  test: pass keyword argument to remote method call:                                                                            /usr/local/lib/ruby/2.7.0/drb/drb.rb:1690: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
test_drb_kw_args.rb:19: warning: The called method `foo' is defined here
.: (0.115401)
  test: pass keyword argument to remote method call with block:                                                                 /usr/local/lib/ruby/2.7.0/drb/invokemethod.rb:15: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
test_drb_kw_args.rb:23: warning: The called method `bar' is defined here
.: (0.114446)

Finished in 0.2303479 seconds.
------------------------------------------------------------------------------------------------------------------------------------------------------
2 tests, 2 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
------------------------------------------------------------------------------------------------------------------------------------------------------
8.68 tests/s, 8.68 assertions/s
```

Output (`ruby 2.8.0dev (2020-02-14 master 78282d4655) [x86_64-linux]`):

```
$ ruby test_drb_kw_args.rb -v
Loaded suite test_drb_kw_args
Started
DRbRemoteMethodCallTest:
  test: pass keyword argument to remote method call:                                                                            E
======================================================================================================================================================
test_drb_kw_args.rb:54:in `block in <class:DRbRemoteMethodCallTest>'
(drbunix:/tmp/test_drb_kw_args.f82f995e-265f-429c-a0fb-770e3fa8dd35) /usr/local/lib/ruby/2.8.0/drb/drb.rb:1730:in `block in main_loop'
(drbunix:/tmp/test_drb_kw_args.f82f995e-265f-429c-a0fb-770e3fa8dd35) /usr/local/lib/ruby/2.8.0/drb/drb.rb:1730:in `loop'
(drbunix:/tmp/test_drb_kw_args.f82f995e-265f-429c-a0fb-770e3fa8dd35) /usr/local/lib/ruby/2.8.0/drb/drb.rb:1734:in `block (2 levels) in main_loop'
(drbunix:/tmp/test_drb_kw_args.f82f995e-265f-429c-a0fb-770e3fa8dd35) /usr/local/lib/ruby/2.8.0/drb/drb.rb:1646:in `perform'
(drbunix:/tmp/test_drb_kw_args.f82f995e-265f-429c-a0fb-770e3fa8dd35) /usr/local/lib/ruby/2.8.0/drb/drb.rb:1690:in `perform_without_block'
(drbunix:/tmp/test_drb_kw_args.f82f995e-265f-429c-a0fb-770e3fa8dd35) test_drb_kw_args.rb:19:in `foo'
Error: test: pass keyword argument to remote method call(DRbRemoteMethodCallTest): ArgumentError: wrong number of arguments (given 1, expected 0)
======================================================================================================================================================
: (0.021710)
  test: pass keyword argument to remote method call with block:                                                                 E
======================================================================================================================================================
test_drb_kw_args.rb:58:in `block in <class:DRbRemoteMethodCallTest>'
(drbunix:/tmp/test_drb_kw_args.cdf13d27-0876-4ebb-ae7d-b5a79c6b58b8) /usr/local/lib/ruby/2.8.0/drb/drb.rb:1730:in `block in main_loop'
(drbunix:/tmp/test_drb_kw_args.cdf13d27-0876-4ebb-ae7d-b5a79c6b58b8) /usr/local/lib/ruby/2.8.0/drb/drb.rb:1730:in `loop'
(drbunix:/tmp/test_drb_kw_args.cdf13d27-0876-4ebb-ae7d-b5a79c6b58b8) /usr/local/lib/ruby/2.8.0/drb/drb.rb:1734:in `block (2 levels) in main_loop'
(drbunix:/tmp/test_drb_kw_args.cdf13d27-0876-4ebb-ae7d-b5a79c6b58b8) /usr/local/lib/ruby/2.8.0/drb/drb.rb:1644:in `perform'
(drbunix:/tmp/test_drb_kw_args.cdf13d27-0876-4ebb-ae7d-b5a79c6b58b8) /usr/local/lib/ruby/2.8.0/drb/invokemethod.rb:15:in `perform_with_block'
(drbunix:/tmp/test_drb_kw_args.cdf13d27-0876-4ebb-ae7d-b5a79c6b58b8) test_drb_kw_args.rb:23:in `bar'
Error: test: pass keyword argument to remote method call with block(DRbRemoteMethodCallTest): ArgumentError: wrong number of arguments (given 1, expected 0)
======================================================================================================================================================
: (0.009290)

Finished in 0.031537836 seconds.
------------------------------------------------------------------------------------------------------------------------------------------------------
2 tests, 0 assertions, 0 failures, 2 errors, 0 pendings, 0 omissions, 0 notifications
0% passed
------------------------------------------------------------------------------------------------------------------------------------------------------
63.42 tests/s, 0.00 assertions/s
```

Expected Output (`ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]`):

```
$ ruby test_drb_kw_args.rb -v
Loaded suite test_drb_kw_args
Started
DRbRemoteMethodCallTest:
  test: pass keyword argument to remote method call:                                                                            .: (0.107467)
  test: pass keyword argument to remote method call with block:                                                                 .: (0.109916)

Finished in 0.221072125 seconds.
------------------------------------------------------------------------------------------------------------------------------------------------------
2 tests, 2 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
------------------------------------------------------------------------------------------------------------------------------------------------------
9.05 tests/s, 9.05 assertions/s
```




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next