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

ruby-changes:52790

From: nagachika <ko1@a...>
Date: Fri, 12 Oct 2018 00:12:11 +0900 (JST)
Subject: [ruby-changes:52790] nagachika:r65002 (ruby_2_5): merge revision(s) 64745: [Backport #15118]

nagachika	2018-10-12 00:12:06 +0900 (Fri, 12 Oct 2018)

  New Revision: 65002

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

  Log:
    merge revision(s) 64745: [Backport #15118]
    
    Use opt_{aref,aset} over opt_{aref,aset}_with
    
    * compile.c (iseq_compile_each0): Use `opt_aref`/`opt_aset` over
      `opt_aref_with`/`opt_aset_with` when frozen_string_literal: true,
      not to resurrect the index string on non-Hash receiver.
    
    [Fix GH-1957]
    
    From: chopraanmol1 <chopraanmol1@g...>

  Modified directories:
    branches/ruby_2_5/
  Modified files:
    branches/ruby_2_5/compile.c
    branches/ruby_2_5/version.h
Index: ruby_2_5/version.h
===================================================================
--- ruby_2_5/version.h	(revision 65001)
+++ ruby_2_5/version.h	(revision 65002)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_5/version.h#L1
 #define RUBY_VERSION "2.5.2"
-#define RUBY_RELEASE_DATE "2018-10-11"
-#define RUBY_PATCHLEVEL 100
+#define RUBY_RELEASE_DATE "2018-10-12"
+#define RUBY_PATCHLEVEL 101
 
 #define RUBY_RELEASE_YEAR 2018
 #define RUBY_RELEASE_MONTH 10
-#define RUBY_RELEASE_DAY 11
+#define RUBY_RELEASE_DAY 12
 
 #include "ruby/version.h"
 
Index: ruby_2_5/compile.c
===================================================================
--- ruby_2_5/compile.c	(revision 65001)
+++ ruby_2_5/compile.c	(revision 65002)
@@ -6036,6 +6036,7 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK https://github.com/ruby/ruby/blob/trunk/ruby_2_5/compile.c#L6036
 	    nd_type(node->nd_args) == NODE_ARRAY && node->nd_args->nd_alen == 1 &&
 	    nd_type(node->nd_args->nd_head) == NODE_STR &&
 	    ISEQ_COMPILE_DATA(iseq)->current_block == NULL &&
+            !ISEQ_COMPILE_DATA(iseq)->option->frozen_string_literal &&
 	    ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction) {
 	    VALUE str = freeze_literal(iseq, node->nd_args->nd_head->nd_lit);
 	    CHECK(COMPILE(ret, "recv", node->nd_recv));
@@ -7033,6 +7034,7 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK https://github.com/ruby/ruby/blob/trunk/ruby_2_5/compile.c#L7034
 	    nd_type(node->nd_args) == NODE_ARRAY && node->nd_args->nd_alen == 2 &&
 	    nd_type(node->nd_args->nd_head) == NODE_STR &&
 	    ISEQ_COMPILE_DATA(iseq)->current_block == NULL &&
+            !ISEQ_COMPILE_DATA(iseq)->option->frozen_string_literal &&
 	    ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction)
 	{
 	    VALUE str = freeze_literal(iseq, node->nd_args->nd_head->nd_lit);
Index: ruby_2_5
===================================================================
--- ruby_2_5	(revision 65001)
+++ ruby_2_5	(revision 65002)

Property changes on: ruby_2_5
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,1 ##
   Merged /trunk:r64745

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

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