From b67f65dbd65f7b672747ab7f7b13693441ca24d8 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 16 Feb 2018 00:54:50 +0000 Subject: [PATCH] test_rubyoptions.rb: assert_same to check identity git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_optimization.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/ruby/test_optimization.rb b/test/ruby/test_optimization.rb index 8aa5c39323..2ef5b5e080 100644 --- a/test/ruby/test_optimization.rb +++ b/test/ruby/test_optimization.rb @@ -571,14 +571,14 @@ class TestRubyOptimization < Test::Unit::TestCase def test_peephole_dstr code = "#{<<~'begin;'}\n#{<<~'end;'}" begin; - exp = (-'a').object_id + exp = -'a' z = 'a' - exp == (-"#{z}").object_id + [exp, -"#{z}"] end; [ false, true ].each do |fsl| iseq = RubyVM::InstructionSequence.compile(code, frozen_string_literal: fsl) - assert_equal(true, iseq.eval, + assert_same(*iseq.eval, "[ruby-core:85542] [Bug #14475] fsl: #{fsl}") end end