ruby-changes:40007
From: nobu <ko1@a...>
Date: Fri, 9 Oct 2015 13:16:02 +0900 (JST)
Subject: [ruby-changes:40007] nobu:r52088 (trunk): test_iseq.rb: fix meaningless assertion
nobu 2015-10-09 13:15:53 +0900 (Fri, 09 Oct 2015) New Revision: 52088 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52088 Log: test_iseq.rb: fix meaningless assertion * test/ruby/test_iseq.rb (test_frozen_string_literal_compile_option): fix meaningless assertion. object_id of same object is always same. Modified files: trunk/test/ruby/test_iseq.rb Index: test/ruby/test_iseq.rb =================================================================== --- test/ruby/test_iseq.rb (revision 52087) +++ test/ruby/test_iseq.rb (revision 52088) @@ -169,10 +169,10 @@ class TestISeq < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_iseq.rb#L169 ['foo', 'foo', "#{$f}foo", "#{'foo'}"] EOS s1, s2, s3, s4 = RubyVM::InstructionSequence.compile(code, __FILE__, __FILE__, line, {frozen_string_literal: true}).eval - assert_equal(true, s1.frozen?) - assert_equal(true, s2.frozen?) - assert_equal(false, s3.frozen?) - assert_equal(true, s4.frozen?) - assert_equal(s2.object_id, s2.object_id) + assert_predicate(s1, :frozen?) + assert_predicate(s2, :frozen?) + assert_not_predicate(s3, :frozen?) + assert_predicate(s4, :frozen?) + assert_same(s1, s2) end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/