From 3d4376d16777cb97ebd1d12e338462ef7311223e Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 23 Feb 2005 13:52:19 +0000 Subject: * array.c (rb_ary_s_create): no need for negative argc check. [ruby-core:04463] * array.c (rb_ary_unshift_m): ditto. * lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass of StandardError class, not Exception class. [ruby-core:04429] * lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE. fixed: [ruby-core:04444] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 17 +++++++++++++++++ array.c | 6 ------ lib/open3.rb | 2 +- lib/xmlrpc/parser.rb | 2 +- process.c | 4 ++-- sample/test.rb | 4 ++-- 6 files changed, 23 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 759ac04679..4a45032b80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,13 @@ Thu Feb 23 15:04:32 2005 akira yamada * lib/uri/generic.rb (split_userinfo): should split ":pass" into "" and "pass". [ruby-dev:25667] +Wed Feb 23 08:00:18 2005 Yukihiro Matsumoto + + * array.c (rb_ary_s_create): no need for negative argc check. + [ruby-core:04463] + + * array.c (rb_ary_unshift_m): ditto. + Wed Feb 23 01:57:46 2005 Shugo Maeda * lib/net/imap.rb (initialize): handle certs correctly. Thanks, @@ -55,6 +62,11 @@ Sat Feb 19 01:32:03 2005 Hirokazu Yamamoto * ext/bigdecimal/lib/bigdecimal/nlsolve.rb: removed because this file is sample script and same file exists in ext/bigdecimal/sample. +Fri Feb 18 17:14:00 2005 Yukihiro Matsumoto + + * lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass + of StandardError class, not Exception class. [ruby-core:04429] + Thu Feb 17 20:11:18 2005 Hirokazu Yamamoto * lib/drb/drb.rb (DRbServer.default_safe_level): fix typo. @@ -75,6 +87,11 @@ Thu Feb 17 11:54:00 2005 Nathaniel Talbott * lib/test/unit.rb: ditto. +Thu Feb 17 04:21:47 2005 Yukihiro Matsumoto + + * lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE. + fixed: [ruby-core:04444] + Thu Feb 17 00:09:45 2005 Masatoshi SEKI * test/drb/ignore_test_drb.rb: move TestDRbReusePort to new file diff --git a/array.c b/array.c index 4ba3f7390d..c31e5fbc8f 100644 --- a/array.c +++ b/array.c @@ -334,9 +334,6 @@ rb_ary_s_create(argc, argv, klass) { VALUE ary = ary_alloc(klass); - if (argc < 0) { - rb_raise(rb_eArgError, "negative number of arguments"); - } if (argc > 0) { RARRAY(ary)->ptr = ALLOC_N(VALUE, argc); MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc); @@ -552,9 +549,6 @@ rb_ary_unshift_m(argc, argv, ary) { long len = RARRAY(ary)->len; - if (argc < 0) { - rb_raise(rb_eArgError, "negative number of arguments"); - } if (argc == 0) return ary; /* make rooms by setting the last item */ diff --git a/lib/open3.rb b/lib/open3.rb index 407cd7662c..59db1a4cc5 100644 --- a/lib/open3.rb +++ b/lib/open3.rb @@ -35,7 +35,7 @@ module Open3 exec(*cmd) } - exit! + exit!(0) } pw[0].close diff --git a/lib/xmlrpc/parser.rb b/lib/xmlrpc/parser.rb index da214ba1ce..49b99b2958 100644 --- a/lib/xmlrpc/parser.rb +++ b/lib/xmlrpc/parser.rb @@ -51,7 +51,7 @@ end # module NQXML module XMLRPC - class FaultException < Exception + class FaultException < StandardError attr_reader :faultCode, :faultString def initialize(faultCode, faultString) diff --git a/process.c b/process.c index 9541c600d3..8a83aed98a 100644 --- a/process.c +++ b/process.c @@ -1539,13 +1539,13 @@ rb_f_system(argc, argv) /* * call-seq: - * sleep(duration=0) => fixnum + * sleep([duration]) => fixnum * * Suspends the current thread for _duration_ seconds (which may be * any number, including a +Float+ with fractional seconds). Returns the actual * number of seconds slept (rounded), which may be less than that asked * for if the thread was interrupted by a +SIGALRM+, or if - * another thread calls Thread#run. An argument of zero + * another thread calls Thread#run. Zero arguments * causes +sleep+ to sleep forever. * * Time.new #=> Wed Apr 09 08:56:32 CDT 2003 diff --git a/sample/test.rb b/sample/test.rb index 65cfcad475..e7f2d251b7 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -787,10 +787,10 @@ test_ok($x.has_value?(4)) test_ok($x.values_at(2,3) == [4,6]) test_ok($x == {1=>2, 2=>4, 3=>6}) -$z = $y.keys.join(":") +$z = $y.keys.sort.join(":") test_ok($z == "1:2:3") -$z = $y.values.join(":") +$z = $y.values.sort.join(":") test_ok($z == "2:4:6") test_ok($x == $y) -- cgit v1.2.3