aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_string.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_string.rb')
-rw-r--r--test/ruby/test_string.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index 37278b192a..6dd46895eb 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -687,9 +687,10 @@ class TestString < Test::Unit::TestCase
str = 'abc'
a = [str.hash.to_s]
3.times {
- EnvUtil.rubyexec("-e", "print #{str.dump}.hash") {|i,o,e|
- a << o.read
- }
+ assert_in_out_err(["-e", "print #{str.dump}.hash"], "") do |r, e|
+ a += r
+ assert_equal([], e)
+ end
}
assert_not_equal([str.hash.to_s], a.uniq)
end