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/branches/ruby_1_8@28317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7d9714b4a0
commit
36c13a6d55
4 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,12 @@
|
|||
Mon Jun 14 18:32:38 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.
|
||||
|
||||
Sat Jun 12 10:02:26 2010 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* io.c (rb_f_syscall): should check argument string taint before
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -141,7 +141,7 @@ module DRbCore
|
|||
|
||||
def test_03
|
||||
assert_equal(8, @there.sum(1, 1, 1, 1, 1, 1, 1, 1))
|
||||
assert_raises(ArgumentError) do
|
||||
assert_raises(DRb::DRbConnError) do
|
||||
@there.sum(1, 1, 1, 1, 1, 1, 1, 1, 1)
|
||||
end
|
||||
assert_raises(DRb::DRbConnError) do
|
||||
|
|
|
@ -283,7 +283,7 @@ class TestDRbLarge < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_04_many_arg
|
||||
assert_raises(ArgumentError) {
|
||||
assert_raises(DRb::DRbConnError) {
|
||||
@there.arg_test(1, 2, 3, 4, 5, 6, 7, 8, 9, 0)
|
||||
}
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue