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

ruby-changes:2643

From: ko1@a...
Date: 8 Dec 2007 17:12:50 +0900
Subject: [ruby-changes:2643] akr - Ruby:r14134 (trunk): * ruby.c (proc_options): make rb_raise format as a string literal to

akr	2007-12-08 17:11:52 +0900 (Sat, 08 Dec 2007)

  New Revision: 14134

  Modified files:
    trunk/ChangeLog
    trunk/ruby.c

  Log:
    * ruby.c (proc_options): make rb_raise format as a string literal to 
      avoid warning.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ruby.c?r1=14134&r2=14133
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14134&r2=14133

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 14133)
+++ ChangeLog	(revision 14134)
@@ -1,3 +1,8 @@
+Sat Dec  8 17:07:10 2007  Tanaka Akira  <akr@f...>
+
+	* ruby.c (proc_options): make rb_raise format as a string literal to
+	  avoid warning.
+
 Sat Dec  8 16:18:16 2007  Tanaka Akira  <akr@f...>
 
 	* re.c (rb_reg_check_preprocess): new function for validating regexp
Index: ruby.c
===================================================================
--- ruby.c	(revision 14133)
+++ ruby.c	(revision 14134)
@@ -856,16 +856,16 @@
 
 	  default:
 	    {
-		const char *format;
 		if (ISPRINT(*s)) {
-		    format =
-			"invalid option -%c  (-h will show valid options)";
+                    rb_raise(rb_eRuntimeError,
+			"invalid option -%c  (-h will show valid options)",
+                        (int)(unsigned char)*s);
 		}
 		else {
-		    format =
-			"invalid option -\\%03o  (-h will show valid options)";
+                    rb_raise(rb_eRuntimeError,
+			"invalid option -\\%03o  (-h will show valid options)",
+                        (int)(unsigned char)*s);
 		}
-		rb_raise(rb_eRuntimeError, format, (int)(unsigned char)*s);
 	    }
 	    goto switch_end;
 

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

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