summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 7e57530..e93b339 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