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

ruby-changes:50288

From: normal <ko1@a...>
Date: Thu, 15 Feb 2018 07:35:19 +0900 (JST)
Subject: [ruby-changes:50288] normal:r62406 (trunk): test/ruby/test_optimization.rb: fix compile kwarg

normal	2018-02-15 07:35:08 +0900 (Thu, 15 Feb 2018)

  New Revision: 62406

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

  Log:
    test/ruby/test_optimization.rb: fix compile kwarg
    
    Fixes: r62177 ("compile.c: fix string Range optimization with FSL")

  Modified files:
    trunk/test/ruby/test_optimization.rb
Index: test/ruby/test_optimization.rb
===================================================================
--- test/ruby/test_optimization.rb	(revision 62405)
+++ test/ruby/test_optimization.rb	(revision 62406)
@@ -557,8 +557,9 @@ class TestRubyOptimization < Test::Unit: https://github.com/ruby/ruby/blob/trunk/test/ruby/test_optimization.rb#L557
       when "1.8.0"..."1.8.8" then :bar
       end
     end;
-    [ nil, { frozen_string_literal: true } ].each do |opt|
-      iseq = RubyVM::InstructionSequence.compile(code, nil, nil, opt)
+    [ true, false ].each do |opt|
+      iseq = RubyVM::InstructionSequence.compile(code,
+                                                 frozen_string_literal: opt)
       insn = iseq.disasm
       assert_match %r{putobject\s+#{Regexp.quote('"1.8.0"..."1.8.8"')}}, insn
       assert_match %r{putobject\s+#{Regexp.quote('"2.0.0".."2.3.2"')}}, insn

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

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