<commit_before>require_relative '../../spec_helper'
require_relative 'fixtures/classes'

describe "Kernel.srand" do
  it "is a private method" do
    Kernel.should have_private_instance_method(:srand)
  end

  it "returns the previous seed value" do
    srand(10)
    srand(20).should == 10
  end

  it "returns the previous seed value on the first call" do
    ruby_exe('print srand(10)', options: '--disable-gems').should =~ /\A\d+\z/
  end

  it "seeds the RNG correctly and repeatably" do<commit_msg>Refine wording about the default random seed [ci skip]<commit_after>require_relative '../../spec_helper'
require_relative 'fixtures/classes'

describe "Kernel.srand" do
  it "is a private method" do
    Kernel.should have_private_instance_method(:srand)
  end

  it "returns the previous seed value" do
    srand(10)
    srand(20).should == 10
  end

  it "returns the system-initialized seed value on the first call" do
    ruby_exe('print srand(10)', options: '--disable-gems').should =~ /\A\d+\z/
  end

  it "seeds the RNG correctly and repeatably" do
{'fraction_non_alphanumeric': 0.11237016052880075, 'fraction_numerical': 0.015108593012275733, 'mean_word_length': 3.774774774774775, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6405253', 'n_tokens_mistral': 360, 'n_tokens_neox': 333, 'n_words': 111}