<commit_before># encoding: UTF-8

module ArtDecomp describe B do

  context 'when representing ‘set bits’ concept' do

    it 'should provide proper representation (also across the Fixnum/Bignum boundary)' do
      B[].should     == 0b0
      B[0].should    == 0b1
      B[5,8].should  == 0b100100000
      B[30].should   == 2**30
      B[40].should   == 2**40
      B[1,69].should == 2**69 + 0b10
    end

    it 'should uniformly work inside Sets (also across the Fixnum/Bignum boundary)' do
      B[].hash.should     == 0b0.hash
      B[0].hash.should    == 0b1.hash
      B[5,8].hash.should  == 0b100100000.hash
      B[30].hash.should   == (2**30).hash
      B[40].hash.should   == (2**40).hash
      B[1,69].hash.should == (2**69 + 0b10).hash
    end

  end

end end<commit_msg>respec B.[] and #hash<commit_after>module ArtDecomp describe B do

  context '.[]' do

    it 'constructs an Integer with the given bits set' do
      B[].should     == 0b0
      B[0].should    == 0b1
      B[5,8].should  == 0b100100000
      B[30].should   == 2**30
      B[40].should   == 2**40
      B[1,69].should == 2**69 + 0b10
    end

  end

  context '#hash' do

    it 'hashes uniformly' do
      B[].hash.should     == 0b0.hash
      B[0].hash.should    == 0b1.hash
      B[5,8].hash.should  == 0b100100000.hash
      B[30].hash.should   == (2**30).hash
      B[40].hash.should   == (2**40).hash
      B[1,69].hash.should == (2**69 + 0b10).hash
    end

  end

end end
{'fraction_non_alphanumeric': 0.15789473684210525, 'fraction_numerical': 0.09911141490088858, 'mean_word_length': 2.1965065502183405, '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': '3276329', 'n_tokens_mistral': 630, 'n_tokens_neox': 538, 'n_words': 127}