summaryrefslogtreecommitdiff
path: root/lib/drb
AgeCommit message (Collapse)Author
2024-01-22Extract drbHiroshi SHIBATA
2023-11-07[ruby/drb] Removed old version on doc sectionHiroshi SHIBATA
https://github.com/ruby/drb/commit/104f1a4db3
2023-11-07[ruby/drb] Load DRb::VERSION automaticallyHiroshi SHIBATA
https://github.com/ruby/drb/commit/b250502c43
2023-11-07[ruby/drb] Bump up 2.2.0Hiroshi SHIBATA
https://github.com/ruby/drb/commit/c62076f940
2023-10-18[ruby/drb] Support :SSL{Min,Max}Version config optionsJeremy Evans
These are necessary to get the tests passing with LibreSSL 3.8.1+, which dropped support for TLSv1.0 and TLSv1.1 for security reasons. This updates the tests to use TLSv1.2 on OpenBSD. This is only strictly necessary on OpenBSD 7.4+, but it will work fine in previous versions as well. https://github.com/ruby/drb/commit/32707b2db5
2022-12-05[ruby/drb] Bump version to 2.1.1Hiroshi SHIBATA
https://github.com/ruby/drb/commit/7c2d56e9f3
2022-01-17lib/drb/drb.rb: Prevent a "warning: assigned but unused variable"Yusuke Endoh
... by replacing the variable with a underscore-prefixed name
2022-01-15to prevent collection, keep the last result.Masatoshi SEKI
2022-01-14clear `@result` after `setup_message`Koichi Sasada
For the remote object `ro`, method chain like `ro.foo.bar` the result of `ro.foo` is stored in `@result`, but cleared just before `setup_message` and it seems GCed on specific machine. ``` 1) Error: DRbTests::TestDRbCore#test_05_eq: RangeError: "140" is recycled object (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:366:in `_id2ref' (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:366:in `to_obj' (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1528:in `to_obj' (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1847:in `to_obj' (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:620:in `recv_request' (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:931:in `recv_request' (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1656:in `init_with_client' (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1668:in `setup_message' (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1632:in `perform' (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1725:in `block (2 levels) in main_loop' (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1721:in `loop' (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1721:in `block in main_loop' /tmp/ruby/v3/src/trunk-repeat20-asserts/test/drb/drbtest.rb:206:in `test_05_eq' ``` To prevent collecting, clear `@result` just after `setup_message` and `setup_message` can get the last result object. Notes: Merged: https://github.com/ruby/ruby/pull/5439
2021-12-27[ruby/drb] Fix method names "regist" as "register"Nobuyoshi Nakada
https://github.com/ruby/drb/commit/9a1ff286bc
2021-10-14[ruby/drb] Bump up drb version to 2.1.0Hiroshi SHIBATA
https://github.com/ruby/drb/commit/e4b7b68d67
2021-10-14[ruby/drb] Bump up drb version to 2.0.5Hiroshi SHIBATA
https://github.com/ruby/drb/commit/7edf67654c
2021-09-28[ruby/drb] 6d890ec5979ec72586dd5f66dd8d33f7a9aefd1e was introduced to ↵Hiroshi SHIBATA
support only Ruby 2.7+ https://github.com/ruby/drb/commit/bec410d184
2021-09-28[ruby/drb] gemspec: Remove "executables" configurationOlle Jonsson
This gem exposes 0 executables. https://github.com/ruby/drb/commit/ed4d0363e5
2021-01-18Added ruby2_keywords for Ruby 2.5 and 2.6Hiroshi SHIBATA
2020-12-28[ruby/drb] Removed needless files from Gem::Specification#filesHiroshi SHIBATA
https://github.com/ruby/drb/commit/61c49af71b
2020-10-27Separate `send` into `public_send` and `__send__`Nobuyoshi Nakada
2020-10-14Promote drb to the default gemsHiroshi SHIBATA
2020-09-11Removed DRb.default_safe_level and DRb#safe_levelHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3531
2020-06-29Avoid deprecated OpenSSL::Digest constantsBart de Water
Notes: Merged: https://github.com/ruby/ruby/pull/3270
2020-02-15lib/drb/drb.rb: Use ruby2_keywords for keyword separationYusuke Endoh
[Bug #16634]
2019-12-10Stop Thread.new in `DRb::TimerIdConv::TimerHolder2#on_gc`Kazuhiro NISHIYAMA
and add more stop_pool after stop_service
2019-12-06Do not start thread when `require 'drb/drb'` onlyKazuhiro NISHIYAMA
2019-12-05lib/drb/drb.rb: suppress warning: instance variable @pool_proxy not initializedYusuke Endoh
2019-12-04Fix thread leak in drbKazuhiro NISHIYAMA
Notes: Merged: https://github.com/ruby/ruby/pull/2724
2019-11-18Deprecate taint/trust and related methods, and make the methods no-opsJeremy Evans
This removes the related tests, and puts the related specs behind version guards. This affects all code in lib, including some libraries that may want to support older versions of Ruby. Notes: Merged: https://github.com/ruby/ruby/pull/2476
2019-11-18Warn on access/modify of $SAFE, and remove effects of modifying $SAFEJeremy Evans
This removes the security features added by $SAFE = 1, and warns for access or modification of $SAFE from Ruby-level, as well as warning when calling all public C functions related to $SAFE. This modifies some internal functions that took a safe level argument to no longer take the argument. rb_require_safe now warns, rb_require_string has been added as a version that takes a VALUE and does not warn. One public C function that still takes a safe level argument and that this doesn't warn for is rb_eval_cmd. We may want to consider adding an alternative method that does not take a safe level argument, and warn for rb_eval_cmd. Notes: Merged: https://github.com/ruby/ruby/pull/2476
2019-10-16Fix DRbServer#any_to_sJeremy Evans
My previous fix in d0ed935d5bf8c3fce9800742a36e44fb7f63dda4 was not correct, as pointed out by cremno on GitHub. This simplifies things by just using Kernel#to_s. Also switch to bind_call(obj) instead of bind(obj).call for better performance. Notes: Merged: https://github.com/ruby/ruby/pull/2554
2019-10-16Do not raise an exception on a closed DRb socketJeremy Evans
This rescues some exceptions that could happen with a closed or shutdown DRb socket. This can prevent the server from exiting if an client socket is closed directly after it is accepted. Fixes [Bug #8039] Notes: Merged: https://github.com/ruby/ruby/pull/2554
2019-10-16Handle subclasses of Exception in drbJeremy Evans
This makes it so that client instances that call a method on a server-side object that raise a subclass of Exception are handled similarly to those that raise a subclass of StandardError. Only reraise exceptions that we are fairly sure we don't want to rescue. Fixes [Bug #5618] Notes: Merged: https://github.com/ruby/ruby/pull/2554
2019-10-14add require "monitor"Masatoshi SEKI
2019-10-14Automatically close fds on fork (and GC). The connection pools are ↵Masatoshi SEKI
maintained at thread scope.
2019-10-14Fix some DRb issues (#2552)Jeremy Evans
* Handle BasicObject in drb Also fix a bug in rescue clause of any_to_s because sprintf does not handle the %l modifier. Fixes [Bug #7833] * Do not send a reply to the client if there is a connection error This allows for normal TCP shutdown (fin-ack-fin-ack instead of fin-ack-push-rst). Patch from pierre@mouraf.org (Pierre-Alexandre Meyer). Fixes [Bug #2339] * Detect fork and do not reuse forked connections in drb This associates each DRbConn with a pid, and if the pid changes, it closes any DRbConns in the pool with a pid that no longer matches. This fixes DRb servers from sending messages intended for one client to another client after forking. Fixes [Bug #2718] Fixes [Bug #14471]
2019-07-13change default value of load_limit (ignore load_limit)Masatoshi SEKI
2019-05-04* remove trailing spaces.git
2019-05-04add DRb::WeakIdConv (Bug #15711)Masatoshi SEKI
2018-12-03drb: fix tests on Debian sid/unstable with OpenSSL 1.1.1anormal
OpenSSL complains abour our keys being small and weak :< Make them big and strong with 2048-bit RSA keys and SHA256 digests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-05Fix up r65505 [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-02lib/*: Prefer require_relative over require.marcandre
[#15206] [Fix GH-1976] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20Revert "Revert "Reset primary_server when remove_server"" [ci skip]kazu
This reverts commit d2671c96f32e6fbbd39162a2c9042dcaf3bf2d68. previous reverting is commit miss git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20Allow to stop by push(nil) for testkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20Revert "Reset primary_server when remove_server"kazu
This reverts commit 2948d3bd2e78b5b9110454a7135a81c3fecb2575. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20Reset primary_server when remove_serverkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25drb: close graceful shutdown pipe before socketnormal
Closing a listen socket while entering select(2) may trigger IOError or even deadlock because another thread may give the file descriptor to another file description; meaning the kernel can wait on the wrong description. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25drb: simplify shutdown pipe close logicnormal
IO#close is idempotent, so we don't need to waste bytecode to check or nil it at shutdown time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-28Fix typo of file path [ci skip]a_matsuda
Patch by: yuuji.yaginuma <yuuji.yaginuma@gmail.com> https://github.com/ruby/ruby/pull/1900 [Fix GH-1900] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-19lib/drb/extservm.rb (service): do not return `false'normal
invoke_service_command may set entries in @servers to `false', making it incompatible with the intended use of the safe navigation operator. This caused occasional DRb test failures, but they were hidden with automatic retry. [ruby-core:87524] [Bug #14856] Fixes: r53111 ("use safe navigation operator") commit 059c9c1cf371e049c7481c78b76e9620da52757f [GH-1142] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-17If host of URI is omitted, make it with IP address. seki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-30drb: use \A and \znobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-28`$SAFE` as a process global state. [Feature #14250]ko1
* vm_core.h (rb_vm_t): move `rb_execution_context_t::safe_level` to `rb_vm_t::safe_level_` because `$SAFE` is a process (VM) global state. * vm_core.h (rb_proc_t): remove `rb_proc_t::safe_level` because `Proc` objects don't need to keep `$SAFE` at the creation. Also make `is_from_method` and `is_lambda` as 1 bit fields. * cont.c (cont_restore_thread): no need to keep `$SAFE` for Continuation. * eval.c (ruby_cleanup): use `rb_set_safe_level_force()` instead of access `vm->safe_level_` directly. * eval_jump.c: End procs `END{}` doesn't keep `$SAFE`. * proc.c (proc_dup): removed and introduce `rb_proc_dup` in vm.c. * safe.c (rb_set_safe_level): don't check `$SAFE` 1 -> 0 changes. * safe.c (safe_setter): use `rb_set_safe_level()`. * thread.c (rb_thread_safe_level): `Thread#safe_level` returns `$SAFE`. It should be obsolete. * transcode.c (load_transcoder_entry): `rb_safe_level()` only returns 0 or 1 so that this check is not needed. * vm.c (vm_proc_create_from_captured): don't need to keep `$SAFE` for Proc. * vm.c (rb_proc_create): renamed to `proc_create`. * vm.c (rb_proc_dup): moved from proc.c. * vm.c (vm_invoke_proc): do not need to set and restore `$SAFE` for `Proc#call`. * vm_eval.c (rb_eval_cmd): rename a local variable to represent clearer meaning. * lib/drb/drb.rb: restore `$SAFE`. * lib/erb.rb: restore `$SAFE`, too. * test/lib/leakchecker.rb: check `$SAFE == 0` at the end of tests. * test/rubygems/test_gem.rb: do not set `$SAFE = 1`. * bootstraptest/test_proc.rb: catch up this change. * spec/ruby/optional/capi/string_spec.rb: ditto. * test/bigdecimal/test_bigdecimal.rb: ditto. * test/fiddle/test_func.rb: ditto. * test/fiddle/test_handle.rb: ditto. * test/net/imap/test_imap_response_parser.rb: ditto. * test/pathname/test_pathname.rb: ditto. * test/readline/test_readline.rb: ditto. * test/ruby/test_file.rb: ditto. * test/ruby/test_optimization.rb: ditto. * test/ruby/test_proc.rb: ditto. * test/ruby/test_require.rb: ditto. * test/ruby/test_thread.rb: ditto. * test/rubygems/test_gem_specification.rb: ditto. * test/test_tempfile.rb: ditto. * test/test_tmpdir.rb: ditto. * test/win32ole/test_win32ole.rb: ditto. * test/win32ole/test_win32ole_event.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e