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

ruby-changes:41777

From: naruse <ko1@a...>
Date: Wed, 17 Feb 2016 16:23:49 +0900 (JST)
Subject: [ruby-changes:41777] naruse:r53851 (trunk): fix rubyspec error from r53850

naruse	2016-02-17 16:24:13 +0900 (Wed, 17 Feb 2016)

  New Revision: 53851

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53851

  Log:
    fix rubyspec error from r53850
    
    http://rubyci.s3.amazonaws.com/tk2-243-31075/ruby-trunk/log/20160217T061402Z.fail.html.gz

  Modified files:
    trunk/string.c
Index: string.c
===================================================================
--- string.c	(revision 53850)
+++ string.c	(revision 53851)
@@ -1363,6 +1363,7 @@ rb_str_resurrect(VALUE str) https://github.com/ruby/ruby/blob/trunk/string.c#L1363
  *  times (and call many realloc).
  */
 
+static inline void str_modifiable(VALUE str);
 static VALUE
 rb_str_init(int argc, VALUE *argv, VALUE str)
 {
@@ -1414,6 +1415,9 @@ rb_str_init(int argc, VALUE *argv, VALUE https://github.com/ruby/ruby/blob/trunk/string.c#L1415
     }
     else if (n == 1) {
 	StringValue(orig);
+	if (OBJ_FROZEN(str)) {
+	    rb_error_frozen_object(str);
+	}
 	str_replace(str, orig);
     }
     return str;

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

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