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

ruby-changes:9250

From: yugui <ko1@a...>
Date: Tue, 16 Dec 2008 19:31:16 +0900 (JST)
Subject: [ruby-changes:9250] Ruby:r20787 (ruby_1_9_1): merges r20715 from trunk into ruby_1_9_1.

yugui	2008-12-16 19:25:34 +0900 (Tue, 16 Dec 2008)

  New Revision: 20787

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

  Log:
    merges r20715 from trunk into ruby_1_9_1.
    * complex.c: use rb_usascii_str_new2 instead of rb_str_new2.
    * rational.c: ditto.

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/complex.c
    branches/ruby_1_9_1/rational.c

Index: ruby_1_9_1/complex.c
===================================================================
--- ruby_1_9_1/complex.c	(revision 20786)
+++ ruby_1_9_1/complex.c	(revision 20787)
@@ -941,7 +941,7 @@
 {
     VALUE s;
 
-    s = rb_str_new2("(");
+    s = rb_usascii_str_new2("(");
     rb_str_concat(s, nucomp_format(self, f_inspect));
     rb_str_cat2(s, ")");
 
@@ -1083,20 +1083,20 @@
     comp_pat2 = rb_reg_new(comp_pat2_source, sizeof comp_pat2_source - 1, 0);
     rb_gc_register_mark_object(comp_pat2);
 
-    a_slash = rb_str_new2("/");
+    a_slash = rb_usascii_str_new2("/");
     rb_gc_register_mark_object(a_slash);
 
-    a_dot_and_an_e = rb_str_new2(".eE");
+    a_dot_and_an_e = rb_usascii_str_new2(".eE");
     rb_gc_register_mark_object(a_dot_and_an_e);
 
-    null_string = rb_str_new2("");
+    null_string = rb_usascii_str_new2("");
     rb_gc_register_mark_object(null_string);
 
     underscores_pat = rb_reg_new(underscores_pat_source,
 				 sizeof underscores_pat_source - 1, 0);
     rb_gc_register_mark_object(underscores_pat);
 
-    an_underscore = rb_str_new2("_");
+    an_underscore = rb_usascii_str_new2("_");
     rb_gc_register_mark_object(an_underscore);
 }
 
@@ -1148,13 +1148,13 @@
 		sr = Qnil;
 		si = f_aref(m, INT2FIX(1));
 		if (NIL_P(si))
-		    si = rb_str_new2("");
+		    si = rb_usascii_str_new2("");
 		{
 		    VALUE t;
 
 		    t = f_aref(m, INT2FIX(2));
 		    if (NIL_P(t))
-			t = rb_str_new2("1");
+			t = rb_usascii_str_new2("1");
 		    rb_str_concat(si, t);
 		}
 		re = f_post_match(m);
@@ -1174,7 +1174,7 @@
 		si = f_aref(m, INT2FIX(3));
 		t = f_aref(m, INT2FIX(4));
 		if (NIL_P(t))
-		    t = rb_str_new2("1");
+		    t = rb_usascii_str_new2("1");
 		rb_str_concat(si, t);
 	    }
 	    re = f_post_match(m);
Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 20786)
+++ ruby_1_9_1/ChangeLog	(revision 20787)
@@ -1,3 +1,9 @@
+Sat Dec 13 13:03:20 2008  Tadayoshi Funaba  <tadf@d...>
+
+	* complex.c: use rb_usascii_str_new2 instead of rb_str_new2.
+
+	* rational.c: ditto.
+
 Fri Dec 12 22:12:46 2008  Tadayoshi Funaba  <tadf@d...>
 
 	* complex.c, rational.c: do not use RUBY_VERSION_CODE.
Index: ruby_1_9_1/rational.c
===================================================================
--- ruby_1_9_1/rational.c	(revision 20786)
+++ ruby_1_9_1/rational.c	(revision 20787)
@@ -1135,7 +1135,7 @@
 {
     VALUE s;
 
-    s = rb_str_new2("(");
+    s = rb_usascii_str_new2("(");
     rb_str_concat(s, nurat_format(self, f_inspect));
     rb_str_cat2(s, ")");
 
@@ -1289,7 +1289,7 @@
 				 sizeof underscores_pat_source - 1, 0);
     rb_gc_register_mark_object(underscores_pat);
 
-    an_underscore = rb_str_new2("_");
+    an_underscore = rb_usascii_str_new2("_");
     rb_gc_register_mark_object(an_underscore);
 }
 
@@ -1368,7 +1368,7 @@
 	    v = f_mul(v, f_expt(INT2FIX(10), f_to_i(exp)));
 #if 0
 	if (!NIL_P(de) && (!NIL_P(fp) || !NIL_P(exp)))
-	    return rb_assoc_new(v, rb_str_new2("dummy"));
+	    return rb_assoc_new(v, rb_usascii_str_new2("dummy"));
 #endif
 	if (!NIL_P(de))
 	    v = f_div(v, f_to_i(de));

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

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