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

ruby-changes:13688

From: yugui <ko1@a...>
Date: Sun, 25 Oct 2009 23:46:09 +0900 (JST)
Subject: [ruby-changes:13688] Ruby:r25475 (ruby_1_9_1): merges r25411 from trunk into ruby_1_9_1.

yugui	2009-10-25 23:45:54 +0900 (Sun, 25 Oct 2009)

  New Revision: 25475

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

  Log:
    merges r25411 from trunk into ruby_1_9_1.
    --
    * marshal.c (w_symbol, r_symreal): fixed the order of symbol and
      its encoding modifier, in order to make the dump readable from
      1.8.  [ruby-dev:39515]

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/marshal.c
    branches/ruby_1_9_1/version.h

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 25474)
+++ ruby_1_9_1/ChangeLog	(revision 25475)
@@ -1,3 +1,9 @@
+Tue Oct 20 17:57:31 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* marshal.c (w_symbol, r_symreal): fixed the order of symbol and
+	  its encoding modifier, in order to make the dump readable from
+	  1.8.  [ruby-dev:39515]
+
 Mon Aug 10 21:45:26 2009  Nobuyoshi Nakada  <nobu@r...>
  
  	* include/ruby/intern.h (rb_path2class): no deprecation.
Index: ruby_1_9_1/version.h
===================================================================
--- ruby_1_9_1/version.h	(revision 25474)
+++ ruby_1_9_1/version.h	(revision 25475)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.1"
-#define RUBY_PATCHLEVEL 284
+#define RUBY_PATCHLEVEL 285
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 9
 #define RUBY_VERSION_TEENY 1
Index: ruby_1_9_1/marshal.c
===================================================================
--- ruby_1_9_1/marshal.c	(revision 25474)
+++ ruby_1_9_1/marshal.c	(revision 25475)
@@ -412,13 +412,13 @@
 	}
 	w_byte(TYPE_SYMBOL, arg);
 	w_bytes(RSTRING_PTR(sym), RSTRING_LEN(sym), arg);
+	st_add_direct(arg->symbols, id, arg->symbols->num_entries);
 	if (encidx != -1) {
 	    struct dump_call_arg c_arg;
 	    c_arg.limit = 1;
 	    c_arg.arg = arg;
 	    w_encoding(sym, 0, &c_arg);
 	}
-	st_add_direct(arg->symbols, id, arg->symbols->num_entries);
     }
 }
 
@@ -1095,7 +1095,9 @@
     volatile VALUE s = r_bytes(arg);
     ID id;
     int idx = -1;
+    st_index_t n = arg->symbols->num_entries;
 
+    st_insert(arg->symbols, (st_data_t)n, (st_data_t)0);
     if (ivar) {
 	long num = r_long(arg);
 	while (num-- > 0) {
@@ -1106,7 +1108,7 @@
     if (idx < 0) idx = rb_usascii_encindex();
     rb_enc_associate_index(s, idx);
     id = rb_intern_str(s);
-    st_insert(arg->symbols, arg->symbols->num_entries, id);
+    st_insert(arg->symbols, (st_data_t)n, (st_data_t)id);
 
     return id;
 }

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

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