Skip to content

Commit 5b22d85

Browse files
author
wyhaines
committed
Bug ruby#911 [ruby-core:20723]; This bug, and occasional ArgumentError in Resolv#resolv, was caused by a resolution timeout.
The timeout would raise an Resolv::ResolvTimeout exception. Following the chain of ancestors backwards from there, one would arrive at Interrupt, which descended from Signal. Signal#initialize required an argument, and Interrupt's own #initialize likewise did so, but should not. The fix was to backport r12226 from the 1.8.7 branch, which fixes Interrupt#initialize. Fixing that clears this bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@28029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 1da4e3b commit 5b22d85

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

ChangeLog

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
Thu May 26 02:15:00 2010 Kirk Haines <khaines@ruby-lang.org>
2+
3+
* signal.c: Bug #911 [ruby-core:20723]; this problem exists because Resolv::ResolvTimeout has Interrupt in its ancestry, and Interrupt, which descends from Signal, still used Signal's initialize() method, which requires an argument. Interrupt, however, should not require an argument. This is a backport of r12226 on the 1.8.7 branch, which fixed this problem.
4+
15
Mon May 25 06:59:00 2010 Kirk Haines <khaines@ruby-lang.org>
26

3-
* ChangeLog: Changed dates on the last commit records, because I didn't shift the day when I shifted timezones to JST.
7+
* ChangeLog: Changed dates on the last commit records, because I didn't shift the day when I shifted timezones to JST. r28003
48

5-
* io.c: Backport #776 [ruby-core:20043]; added an ifdef _#WIN32 to rb_io_flush to do an fsync on windows.
9+
* io.c: Backport #776 [ruby-core:20043]; added an ifdef _#WIN32 to rb_io_flush to do an fsync on windows. r28003
610

711
Mon May 25 06:26:00 2010 Kirk haines <khaines@ruby-lang.org>
812

signal.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,14 +270,17 @@ esignal_init(argc, argv, self)
270270
}
271271

272272
static VALUE
273-
interrupt_init(self, mesg)
274-
VALUE self, mesg;
273+
interrupt_init(argc, argv, self)
274+
int argc;
275+
VALUE *argv;
276+
VALUE self;
275277
{
276-
VALUE argv[2];
278+
VALUE args[2];
279+
280+
args[0] = INT2FIX(SIGINT);
281+
rb_scan_args(argc, argv, "01", &args[1]);
277282

278-
argv[0] = INT2FIX(SIGINT);
279-
argv[1] = mesg;
280-
return rb_call_super(2, argv);
283+
return rb_call_super(2, args);
281284
}
282285

283286
void
@@ -1078,7 +1081,7 @@ Init_signal()
10781081
rb_define_method(rb_eSignal, "initialize", esignal_init, -1);
10791082
rb_attr(rb_eSignal, rb_intern("signo"), 1, 0, 0);
10801083
rb_alias(rb_eSignal, rb_intern("signm"), rb_intern("message"));
1081-
rb_define_method(rb_eInterrupt, "initialize", interrupt_init, 1);
1084+
rb_define_method(rb_eInterrupt, "initialize", interrupt_init, -1);
10821085

10831086
install_sighandler(SIGINT, sighandler);
10841087
#ifdef SIGHUP

version.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#define RUBY_VERSION "1.8.6"
2-
#define RUBY_RELEASE_DATE "2010-05-25"
2+
#define RUBY_RELEASE_DATE "2010-05-27"
33
#define RUBY_VERSION_CODE 186
4-
#define RUBY_RELEASE_CODE 20100525
5-
#define RUBY_PATCHLEVEL 402
4+
#define RUBY_RELEASE_CODE 20100527
5+
#define RUBY_PATCHLEVEL 403
66

77
#define RUBY_VERSION_MAJOR 1
88
#define RUBY_VERSION_MINOR 8
99
#define RUBY_VERSION_TEENY 6
1010
#define RUBY_RELEASE_YEAR 2010
1111
#define RUBY_RELEASE_MONTH 5
12-
#define RUBY_RELEASE_DAY 25
12+
#define RUBY_RELEASE_DAY 27
1313

1414
#ifdef RUBY_EXTERN
1515
RUBY_EXTERN const char ruby_version[];

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy