diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-12-16 16:01:06 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-12-16 17:44:12 +0900 |
commit | 32ee6f80ee1737699ead57bf577f0b1b90c2523e (patch) | |
tree | 0a90d6c002ff7bb2fc7a76f76ce52f0d12fb8c70 | |
parent | 6c87f8fc2935ac91e8e3d1067d629510a8acbe43 (diff) |
Restore the global random seed
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5281
-rw-r--r-- | spec/ruby/core/kernel/srand_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/ruby/core/kernel/srand_spec.rb b/spec/ruby/core/kernel/srand_spec.rb index 39c78b4ffe..95bb406f46 100644 --- a/spec/ruby/core/kernel/srand_spec.rb +++ b/spec/ruby/core/kernel/srand_spec.rb @@ -2,6 +2,14 @@ require_relative '../../spec_helper' require_relative 'fixtures/classes' describe "Kernel#srand" do + before :each do + @seed = srand + end + + after :each do + srand(@seed) + end + it "is a private method" do Kernel.should have_private_instance_method(:srand) end |