<commit_before>shared_context "a Celluloid Actor" do |included_module|
  class ExampleCrash < StandardError
    attr_accessor :foo
  end

  let(:actor_class) { ExampleActorClass.create(included_module) }

  it "returns the actor's class, not the proxy's" do
    actor = actor_class.new "<NAME>"
    actor.class.should == actor_class
  end

  it "compares with the actor's class in a case statement" do
    case actor_class.new("<NAME>")
    when actor_class
      true
    else
      false
    end.should be_true
  end

  it "can be stored in hashes" do
    actor = actor_class.new "<NAME>"
    actor.hash.should_not == Kernel.hash
    actor.object_id.should_not == Kernel.object_id
  end

  it "supports synchronous calls" do
    actor = actor_class.new "<NAME>"
    actor.greet.should == "Hi, I'm <NAME>"
  end

  it "supports synchronous calls with blocks" do
    actor = actor_class.new "<NAME>"

    block_executed = false
    actor.run { block_executed = true }
    block_executed.should be_true
  end

  it "supports synchronous calls via #method" do
    method = actor_class.new("<NAME>").method(:greet)
    method.call.should == "Hi, I'm <NAME>"
  end
<commit_msg>test #arity on Celluloid::Method<commit_after>shared_context "a Celluloid Actor" do |included_module|
  class ExampleCrash < StandardError
    attr_accessor :foo
  end

  let(:actor_class) { ExampleActorClass.create(included_module) }

  it "returns the actor's class, not the proxy's" do
    actor = actor_class.new "<NAME>"
    actor.class.should == actor_class
  end

  it "compares with the actor's class in a case statement" do
    case actor_class.new("<NAME>")
    when actor_class
      true
    else
      false
    end.should be_true
  end

  it "can be stored in hashes" do
    actor = actor_class.new "<NAME>"
    actor.hash.should_not == Kernel.hash
    actor.object_id.should_not == Kernel.object_id
  end

  it "supports synchronous calls" do
    actor = actor_class.new "<NAME>"
    actor.greet.should == "Hi, I'm <NAME>"
  end

  it "supports synchronous calls with blocks" do
    actor = actor_class.new "Block<NAME>"

    block_executed = false
    actor.run { block_executed = true }
    block_executed.should be_true
  end

  it "supports synchronous calls via #method" do
    method = actor_class.new("<NAME>").method(:greet)
    method.arity.should == 0
    
    method = actor_class.new("<NAME>").method(:change_name)
    method.arity.should == 1
  end
  
  it "supports #arity calls via #method" do
    
  end

{'fraction_non_alphanumeric': 0.10087719298245613, 'fraction_numerical': 0.0007974481658692185, 'mean_word_length': 3.2597623089983023, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 19, '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': '5754153', 'n_tokens_mistral': 836, 'n_tokens_neox': 798, 'n_words': 233}