[前][次][番号順一覧][スレッド一覧]

ruby-changes:16078

From: wyhaines <ko1@a...>
Date: Thu, 27 May 2010 02:27:29 +0900 (JST)
Subject: [ruby-changes:16078] Ruby:r28029 (ruby_1_8_6): Bug #911 ; This bug, and occasional ArgumentError in Resolv#resolv, was caused by a resolution timeout.

wyhaines	2010-05-27 02:27:17 +0900 (Thu, 27 May 2010)

  New Revision: 28029

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28029

  Log:
    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.

  Modified files:
    branches/ruby_1_8_6/ChangeLog
    branches/ruby_1_8_6/signal.c
    branches/ruby_1_8_6/version.h

Index: ruby_1_8_6/ChangeLog
===================================================================
--- ruby_1_8_6/ChangeLog	(revision 28028)
+++ ruby_1_8_6/ChangeLog	(revision 28029)
@@ -1,8 +1,12 @@
+Thu May 26 02:15:00 2010 Kirk Haines <khaines@r...>
+
+	* 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@r...>
 
-	* 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@r...>
 
Index: ruby_1_8_6/version.h
===================================================================
--- ruby_1_8_6/version.h	(revision 28028)
+++ ruby_1_8_6/version.h	(revision 28029)
@@ -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[];
Index: ruby_1_8_6/signal.c
===================================================================
--- ruby_1_8_6/signal.c	(revision 28028)
+++ ruby_1_8_6/signal.c	(revision 28029)
@@ -270,14 +270,17 @@
 }
 
 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];
 
-    argv[0] = INT2FIX(SIGINT);
-    argv[1] = mesg;
-    return rb_call_super(2, argv);
+    args[0] = INT2FIX(SIGINT);
+    rb_scan_args(argc, argv, "01", &args[1]);
+
+    return rb_call_super(2, args);
 }
 
 void
@@ -1078,7 +1081,7 @@
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]