1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

never evaluated

* test/ruby/test_basicinstructions.rb (test_regexp): fix never
  evaluated assertion.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-07-05 14:42:25 +00:00
parent 0f020f7ca4
commit e57bc077f3

View file

@ -85,7 +85,9 @@ class TestBasicInstructions < Test::Unit::TestCase
s = "OK" s = "OK"
prev = nil prev = nil
3.times do 3.times do
assert_equal prev.object_id, (prev ||= /#{s}/o).object_id if prev re = /#{s}/o
assert_same prev, re if prev
prev = re
end end
end end