<commit_before>require File.expand_path('../../../../spec_helper', __FILE__)

process_is_foreground do
  with_feature :readline do
    require 'readline'

    describe "Readline::HISTORY.[]=" do
      before(:each) do
        Readline::HISTORY.push("1", "2", "3")
      end

      after(:each) do
        Readline::HISTORY.pop
        Readline::HISTORY.pop
        Readline::HISTORY.pop
      end

      it "returns the new value for the passed index" do
        (Readline::HISTORY[1] = "second test").should == "second test"
      end

      it "raises an IndexError when there is no item at the passed positive index" do
        lambda { Readline::HISTORY[10] = "test" }.should raise_error(IndexError)
      end

      it "sets the item at the given index" do<commit_msg>Make Readline::HISTORY.[]= spec test return value<commit_after>require File.expand_path('../../../../spec_helper', __FILE__)

process_is_foreground do
  with_feature :readline do
    require 'readline'

    describe "Readline::HISTORY.[]=" do
      before(:each) do
        Readline::HISTORY.push("1", "2", "3")
      end

      after(:each) do
        Readline::HISTORY.pop
        Readline::HISTORY.pop
        Readline::HISTORY.pop
      end

      it "returns the new value for the passed index" do
        Readline::HISTORY.[]=(1, "second test").should == "second test"
      end

      it "raises an IndexError when there is no item at the passed positive index" do
        lambda { Readline::HISTORY[10] = "test" }.should raise_error(IndexError)
      end

      it "sets the item at the given index" do
{'fraction_non_alphanumeric': 0.12128869235628553, 'fraction_numerical': 0.007580543272267846, 'mean_word_length': 2.6751740139211138, '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': '5155404', 'n_tokens_mistral': 498, 'n_tokens_neox': 484, 'n_words': 146}