1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

raise DRbConnError instead of ArgumentError if too many arguments.

[ruby-dev:41481]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
seki 2010-06-14 08:52:30 +00:00
parent 7eec027f06
commit b54b86d898
4 changed files with 12 additions and 3 deletions

View file

@ -1,3 +1,12 @@
Mon Jun 14 17:44:39 2010 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
* lib/drb/drb.rb: raise DRbConnError instead of ArgumentError if too
many arguments. [ruby-dev:41481]
* Test/drb/test_drb.rb: ditto.
* test/drb/drbtest.rb: ditto.
Mon Jun 14 04:03:55 2010 NARUSE, Yui <naruse@ruby-lang.org>
* ext/fiddle/closure.c (dealloc): refix workaround r28300.

View file

@ -613,7 +613,7 @@ module DRb
ro = DRb.to_obj(ref)
msg = load(stream)
argc = load(stream)
raise ArgumentError, 'too many arguments' if @argc_limit < argc
raise(DRbConnError, "too many arguments") if @argc_limit < argc
argv = Array.new(argc, nil)
argc.times do |n|
argv[n] = load(stream)

View file

@ -135,7 +135,7 @@ module DRbCore
def test_03
assert_equal(8, @there.sum(1, 1, 1, 1, 1, 1, 1, 1))
assert_raise(ArgumentError) do
assert_raise(DRb::DRbConnError) do
@there.sum(1, 1, 1, 1, 1, 1, 1, 1, 1)
end
assert_raise(DRb::DRbConnError) do

View file

@ -283,7 +283,7 @@ class TestDRbLarge < Test::Unit::TestCase
end
def test_04_many_arg
assert_raise(ArgumentError) {
assert_raise(DRb::DRbConnError) {
@there.arg_test(1, 2, 3, 4, 5, 6, 7, 8, 9, 0)
}
end