diff options
author | wyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-26 17:27:17 +0000 |
---|---|---|
committer | wyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-26 17:27:17 +0000 |
commit | 5b22d85363ae370f92f629b5278aa7bf6bc7e58e (patch) | |
tree | 791b77536a295d566bd77799894f5e8da443b404 | |
parent | 1da4e3b919e99e6128ab017f215a909304dd6743 (diff) |
Bug #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
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | signal.c | 17 | ||||
-rw-r--r-- | version.h | 8 |
3 files changed, 20 insertions, 13 deletions
@@ -1,8 +1,12 @@ +Thu May 26 02:15:00 2010 Kirk Haines <khaines@ruby-lang.org> + + * 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. + Mon May 25 06:59:00 2010 Kirk Haines <khaines@ruby-lang.org> - * ChangeLog: Changed dates on the last commit records, because I didn't shift the day when I shifted timezones to JST. + * ChangeLog: Changed dates on the last commit records, because I didn't shift the day when I shifted timezones to JST. r28003 - * io.c: Backport #776 [ruby-core:20043]; added an ifdef _#WIN32 to rb_io_flush to do an fsync on windows. + * io.c: Backport #776 [ruby-core:20043]; added an ifdef _#WIN32 to rb_io_flush to do an fsync on windows. r28003 Mon May 25 06:26:00 2010 Kirk haines <khaines@ruby-lang.org> @@ -270,14 +270,17 @@ esignal_init(argc, argv, self) } static VALUE -interrupt_init(self, mesg) - VALUE self, mesg; +interrupt_init(argc, argv, self) + int argc; + VALUE *argv; + VALUE self; { - VALUE argv[2]; + VALUE args[2]; + + args[0] = INT2FIX(SIGINT); + rb_scan_args(argc, argv, "01", &args[1]); - argv[0] = INT2FIX(SIGINT); - argv[1] = mesg; - return rb_call_super(2, argv); + return rb_call_super(2, args); } void @@ -1078,7 +1081,7 @@ Init_signal() rb_define_method(rb_eSignal, "initialize", esignal_init, -1); rb_attr(rb_eSignal, rb_intern("signo"), 1, 0, 0); rb_alias(rb_eSignal, rb_intern("signm"), rb_intern("message")); - rb_define_method(rb_eInterrupt, "initialize", interrupt_init, 1); + rb_define_method(rb_eInterrupt, "initialize", interrupt_init, -1); install_sighandler(SIGINT, sighandler); #ifdef SIGHUP @@ -1,15 +1,15 @@ #define RUBY_VERSION "1.8.6" -#define RUBY_RELEASE_DATE "2010-05-25" +#define RUBY_RELEASE_DATE "2010-05-27" #define RUBY_VERSION_CODE 186 -#define RUBY_RELEASE_CODE 20100525 -#define RUBY_PATCHLEVEL 402 +#define RUBY_RELEASE_CODE 20100527 +#define RUBY_PATCHLEVEL 403 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 #define RUBY_VERSION_TEENY 6 #define RUBY_RELEASE_YEAR 2010 #define RUBY_RELEASE_MONTH 5 -#define RUBY_RELEASE_DAY 25 +#define RUBY_RELEASE_DAY 27 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; |