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

describe "BasicObject" do
  it "raises NoMethodError for nonexistent methods after #method_missing is removed" do
    script = fixture __FILE__, "remove_method_missing.rb"
    ruby_exe(script).chomp.should == "NoMethodError"
  end

  it "raises NameError when referencing built-in constants" do
    lambda { class BasicObjectSpecs::BOSubclass; Kernel; end }.should raise_error(NameError)
  end

  it "does not define built-in constants (according to const_defined?)" do
    BasicObject.const_defined?(:Kernel).should be_false
  end

  it "does not define built-in constants (according to defined?)" do
    BasicObjectSpecs::BOSubclass.kernel_defined?.should be_nil
  end

  it "is included in Object's lists of constants" do
    Object.constants.should include(:BasicObject)
  end

  it "includes itself in its list of constants" do
    BasicObject.constants.should include(:BasicObject)
  end
end<commit_msg>Fix typo<commit_after>require_relative '../../spec_helper'
require_relative 'fixtures/common'

describe "BasicObject" do
  it "raises NoMethodError for nonexistent methods after #method_missing is removed" do
    script = fixture __FILE__, "remove_method_missing.rb"
    ruby_exe(script).chomp.should == "NoMethodError"
  end

  it "raises NameError when referencing built-in constants" do
    lambda { class BasicObjectSpecs::BOSubclass; Kernel; end }.should raise_error(NameError)
  end

  it "does not define built-in constants (according to const_defined?)" do
    BasicObject.const_defined?(:Kernel).should be_false
  end

  it "does not define built-in constants (according to defined?)" do
    BasicObjectSpecs::BOSubclass.kernel_defined?.should be_nil
  end

  it "is included in Object's list of constants" do
    Object.constants.should include(:BasicObject)
  end

  it "includes itself in its list of constants" do
    BasicObject.constants.should include(:BasicObject)
  end
end
{'fraction_non_alphanumeric': 0.08249496981891348, 'fraction_numerical': 0.0, 'mean_word_length': 4.682857142857143, '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': '507158', 'n_tokens_mistral': 589, 'n_tokens_neox': 572, 'n_words': 184}