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

ruby-changes:45555

From: nobu <ko1@a...>
Date: Tue, 14 Feb 2017 21:30:02 +0900 (JST)
Subject: [ruby-changes:45555] nobu:r57628 (trunk): string.c: assertion

nobu	2017-02-14 21:29:56 +0900 (Tue, 14 Feb 2017)

  New Revision: 57628

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

  Log:
    string.c: assertion
    
    * string.c (str_shared_replace): use RUBY_ASSERT for
      pre-condition.

  Modified files:
    trunk/string.c
Index: string.c
===================================================================
--- string.c	(revision 57627)
+++ string.c	(revision 57628)
@@ -1323,7 +1323,7 @@ str_shared_replace(VALUE str, VALUE str2 https://github.com/ruby/ruby/blob/trunk/string.c#L1323
     int cr;
     int termlen;
 
-    ASSUME(str2 != str);
+    RUBY_ASSERT(str2 != str);
     enc = STR_ENC_GET(str2);
     cr = ENC_CODERANGE(str2);
     str_discard(str);

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

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