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

ruby-changes:45736

From: nobu <ko1@a...>
Date: Wed, 8 Mar 2017 17:20:00 +0900 (JST)
Subject: [ruby-changes:45736] nobu:r57809 (trunk): fix paren

nobu	2017-03-08 17:19:56 +0900 (Wed, 08 Mar 2017)

  New Revision: 57809

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

  Log:
    fix paren
    
    * string.c (str_byte_substr): fix misplaced parenthesis at r56155.

  Modified files:
    trunk/string.c
Index: string.c
===================================================================
--- string.c	(revision 57808)
+++ string.c	(revision 57809)
@@ -5266,7 +5266,7 @@ str_byte_substr(VALUE str, long beg, lon https://github.com/ruby/ruby/blob/trunk/string.c#L5266
     else
 	p = s + beg;
 
-    if (!STR_EMBEDDABLE_P(len, TERM_LEN(str) && SHARABLE_SUBSTRING_P(beg, len, n))) {
+    if (!STR_EMBEDDABLE_P(len, TERM_LEN(str)) && SHARABLE_SUBSTRING_P(beg, len, n)) {
 	str2 = rb_str_new_frozen(str);
 	str2 = str_new_shared(rb_obj_class(str2), str2);
 	RSTRING(str2)->as.heap.ptr += beg;

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

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