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

ruby-changes:18548

From: yugui <ko1@a...>
Date: Sun, 16 Jan 2011 21:41:02 +0900 (JST)
Subject: [ruby-changes:18548] Ruby:r30572 (ruby_1_9_2): merges r30526 and r30527 from trunk into ruby_1_9_2.

yugui	2011-01-16 21:35:15 +0900 (Sun, 16 Jan 2011)

  New Revision: 30572

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

  Log:
    merges r30526 and r30527 from trunk into ruby_1_9_2.
    --
    * io.c (rb_f_syscall): Some syscall return unsigned or pointer value.
      Therefore we should only check the result is -1 or not. [ruby-core:34062]
    --
    * io.c (rb_f_syscall): Add warning messages. [ruby-core:34062]

  Modified files:
    branches/ruby_1_9_2/ChangeLog
    branches/ruby_1_9_2/io.c
    branches/ruby_1_9_2/version.h

Index: ruby_1_9_2/ChangeLog
===================================================================
--- ruby_1_9_2/ChangeLog	(revision 30571)
+++ ruby_1_9_2/ChangeLog	(revision 30572)
@@ -1,3 +1,12 @@
+Thu Jan 13 00:06:38 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* io.c (rb_f_syscall): Add warning messages. [ruby-core:34062]
+
+Thu Jan 13 00:00:07 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* io.c (rb_f_syscall): Some syscall return unsigned or pointer value.
+	  Therefore we should only check the result is -1 or not. [ruby-core:34062]
+
 Wed Jan 12 16:25:12 2011  Yuki Sonoda (Yugui)  <yugui@y...>
 
 	* lib/net/http.rb (Net::HTTP#connect): makes it timeout during 
Index: ruby_1_9_2/io.c
===================================================================
--- ruby_1_9_2/io.c	(revision 30571)
+++ ruby_1_9_2/io.c	(revision 30572)
@@ -7562,6 +7562,10 @@
     int num, retval = -1;
 #endif
     int i;
+ 
+    if (RTEST(ruby_verbose)) {
+	rb_warning("We plan to remove a syscall function at future release. DL(Fiddle) provides safer alternative.");
+    }
 
     rb_secure(2);
     if (argc == 0)
@@ -7635,7 +7639,8 @@
 #endif
     }
 
-    if (retval < 0) rb_sys_fail(0);
+    if (retval == -1)
+	rb_sys_fail(0);
     return RETVAL2NUM(retval);
 #undef SYSCALL
 #undef NUM2SYSCALLID
Index: ruby_1_9_2/version.h
===================================================================
--- ruby_1_9_2/version.h	(revision 30571)
+++ ruby_1_9_2/version.h	(revision 30572)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.2"
-#define RUBY_PATCHLEVEL 152
+#define RUBY_PATCHLEVEL 153
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 9
 #define RUBY_VERSION_TEENY 1

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

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