Skip to content

Commit 3d4376d

Browse files
author
matz
committed
* 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
1 parent 616a75e commit 3d4376d

File tree

6 files changed

+23
-12
lines changed

6 files changed

+23
-12
lines changed

ChangeLog

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ Thu Feb 23 15:04:32 2005 akira yamada <akira@ruby-lang.org>
33
* lib/uri/generic.rb (split_userinfo): should split ":pass" into ""
44
and "pass". [ruby-dev:25667]
55

6+
Wed Feb 23 08:00:18 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
7+
8+
* array.c (rb_ary_s_create): no need for negative argc check.
9+
[ruby-core:04463]
10+
11+
* array.c (rb_ary_unshift_m): ditto.
12+
613
Wed Feb 23 01:57:46 2005 Shugo Maeda <shugo@ruby-lang.org>
714

815
* lib/net/imap.rb (initialize): handle certs correctly. Thanks,
@@ -55,6 +62,11 @@ Sat Feb 19 01:32:03 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
5562
* ext/bigdecimal/lib/bigdecimal/nlsolve.rb: removed because this file
5663
is sample script and same file exists in ext/bigdecimal/sample.
5764

65+
Fri Feb 18 17:14:00 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
66+
67+
* lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass
68+
of StandardError class, not Exception class. [ruby-core:04429]
69+
5870
Thu Feb 17 20:11:18 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
5971

6072
* lib/drb/drb.rb (DRbServer.default_safe_level): fix typo.
@@ -75,6 +87,11 @@ Thu Feb 17 11:54:00 2005 Nathaniel Talbott <ntalbott@ruby-lang.org>
7587

7688
* lib/test/unit.rb: ditto.
7789

90+
Thu Feb 17 04:21:47 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
91+
92+
* lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE.
93+
fixed: [ruby-core:04444]
94+
7895
Thu Feb 17 00:09:45 2005 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
7996

8097
* test/drb/ignore_test_drb.rb: move TestDRbReusePort to new file

array.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,6 @@ rb_ary_s_create(argc, argv, klass)
334334
{
335335
VALUE ary = ary_alloc(klass);
336336

337-
if (argc < 0) {
338-
rb_raise(rb_eArgError, "negative number of arguments");
339-
}
340337
if (argc > 0) {
341338
RARRAY(ary)->ptr = ALLOC_N(VALUE, argc);
342339
MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc);
@@ -552,9 +549,6 @@ rb_ary_unshift_m(argc, argv, ary)
552549
{
553550
long len = RARRAY(ary)->len;
554551

555-
if (argc < 0) {
556-
rb_raise(rb_eArgError, "negative number of arguments");
557-
}
558552
if (argc == 0) return ary;
559553

560554
/* make rooms by setting the last item */

lib/open3.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def popen3(*cmd)
3535

3636
exec(*cmd)
3737
}
38-
exit!
38+
exit!(0)
3939
}
4040

4141
pw[0].close

lib/xmlrpc/parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def nodeName
5151

5252
module XMLRPC
5353

54-
class FaultException < Exception
54+
class FaultException < StandardError
5555
attr_reader :faultCode, :faultString
5656

5757
def initialize(faultCode, faultString)

process.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,13 +1539,13 @@ rb_f_system(argc, argv)
15391539

15401540
/*
15411541
* call-seq:
1542-
* sleep(duration=0) => fixnum
1542+
* sleep([duration]) => fixnum
15431543
*
15441544
* Suspends the current thread for _duration_ seconds (which may be
15451545
* any number, including a +Float+ with fractional seconds). Returns the actual
15461546
* number of seconds slept (rounded), which may be less than that asked
15471547
* for if the thread was interrupted by a +SIGALRM+, or if
1548-
* another thread calls <code>Thread#run</code>. An argument of zero
1548+
* another thread calls <code>Thread#run</code>. Zero arguments
15491549
* causes +sleep+ to sleep forever.
15501550
*
15511551
* Time.new #=> Wed Apr 09 08:56:32 CDT 2003

sample/test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,10 +787,10 @@ def r(val); a,b,*c = *yield(); test_ok([a,b,c] == val, 2); end
787787
test_ok($x.values_at(2,3) == [4,6])
788788
test_ok($x == {1=>2, 2=>4, 3=>6})
789789

790-
$z = $y.keys.join(":")
790+
$z = $y.keys.sort.join(":")
791791
test_ok($z == "1:2:3")
792792

793-
$z = $y.values.join(":")
793+
$z = $y.values.sort.join(":")
794794
test_ok($z == "2:4:6")
795795
test_ok($x == $y)
796796

0 commit comments

Comments
 (0)