<commit_before>module Multitrap
  class Trap
    OWN_MRI_FRAME = %r{/multitrap/trap.rb:[0-9]{1,3}:in `block in store_trap'}

    OWN_RBX_FRAME = %r{/multitrap/trap.rb:[0-9]{1,3}:in `store_trap'}

    RESERVED_SIGNALS = %w|BUS SEGV ILL FPE VTALRM|

    KNOWN_SIGNALS = Signal.list.keys - RESERVED_SIGNALS

    def self.trap(original_trap, *args, &block)
      @@multitrap ||= new(original_trap)

      signal = args[0]
      command = args[1]

      @@multitrap.store_trap(signal, command, &block)
    end

    def self.__clear_all_handlers!
      @@multitrap ||= nil
      @@multitrap && @@multitrap.__clear_all_handlers!
    end

    def initialize(original_trap)
      @original_trap = original_trap
      @trap_list = create_trap_list
    end

    def store_trap(signal, command, &block)
      signal = signal.to_s
      command ||= block<commit_msg>Revert "Try to fix the JRuby failure on Travis"<commit_after>module Multitrap
  class Trap
    OWN_MRI_FRAME = %r{/lib/multitrap/trap.rb:[0-9]{1,3}:in `block in store_trap'}

    OWN_RBX_FRAME = %r{/lib/multitrap/trap.rb:[0-9]{1,3}:in `store_trap'}

    RESERVED_SIGNALS = %w|BUS SEGV ILL FPE VTALRM|

    KNOWN_SIGNALS = Signal.list.keys - RESERVED_SIGNALS

    def self.trap(original_trap, *args, &block)
      @@multitrap ||= new(original_trap)

      signal = args[0]
      command = args[1]

      @@multitrap.store_trap(signal, command, &block)
    end

    def self.__clear_all_handlers!
      @@multitrap ||= nil
      @@multitrap && @@multitrap.__clear_all_handlers!
    end

    def initialize(original_trap)
      @original_trap = original_trap
      @trap_list = create_trap_list
    end

    def store_trap(signal, command, &block)
      signal = signal.to_s
      command ||= block
{'fraction_non_alphanumeric': 0.12128146453089245, 'fraction_numerical': 0.011441647597254004, 'mean_word_length': 3.234866828087167, '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': '730563', 'n_tokens_mistral': 707, 'n_tokens_neox': 659, 'n_words': 121}