aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-12-16 15:07:23 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-12-16 15:12:12 +0900
commit69a7eaae389b49eb2a99c1c44c11b3d5004d186f (patch)
tree2b7d806fea1668b513534f1c42cd10ed3c62506e /spec/ruby/core
parent05c9dfe23a7d1b970f5b62feeba3199413567fa5 (diff)
downloadruby-69a7eaae389b49eb2a99c1c44c11b3d5004d186f.tar.gz
Use `to_s` and `puts` in tests
`to_s` has the explict specification while `inspect` is often vague.
Diffstat (limited to 'spec/ruby/core')
-rw-r--r--spec/ruby/core/kernel/srand_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/ruby/core/kernel/srand_spec.rb b/spec/ruby/core/kernel/srand_spec.rb
index 6774d19284..90c1d09b82 100644
--- a/spec/ruby/core/kernel/srand_spec.rb
+++ b/spec/ruby/core/kernel/srand_spec.rb
@@ -12,7 +12,7 @@ describe "Kernel.srand" do
end
it "returns the previous seed value on the first call" do
- ruby_exe('p srand(10)', options: '--disable-gems').chomp.should =~ /\A\d+\z/
+ ruby_exe('print srand(10)', options: '--disable-gems').should =~ /\A\d+\z/
end
it "seeds the RNG correctly and repeatably" do