aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-05 14:42:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-05 14:42:25 +0000
commite57bc077f330d81b5870d214087beb939062f2e8 (patch)
treef3ac0cff7e8b8db3a34a5008dcf5bd7d9dec0323
parent0f020f7ca43f357ee93129fd5d216ff2677af9a5 (diff)
downloadruby-e57bc077f330d81b5870d214087beb939062f2e8.tar.gz
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
-rw-r--r--test/ruby/test_basicinstructions.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_basicinstructions.rb b/test/ruby/test_basicinstructions.rb
index 7e57530d72..e93b339377 100644
--- a/test/ruby/test_basicinstructions.rb
+++ b/test/ruby/test_basicinstructions.rb
@@ -85,7 +85,9 @@ class TestBasicInstructions < Test::Unit::TestCase
s = "OK"
prev = nil
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