<commit_before># encoding: utf-8

require "socket"

module WatirSpec
  class Server < Sinatra::Base
    class << self
      attr_accessor :autorun

      def run_async
        if WatirSpec.platform == :java || (WatirSpec.platform == :windows && RUBY_VERSION =~ /1\.9/ && !defined?(WIN32OLE)) #WIN32OLE and Thread.new do not play nicely together (https://github.com/ruby/ruby/blob/trunk/test/ruby/test_thread.rb#L607 )
          Thread.new { run! }
          sleep 0.1 until WatirSpec::Server.running?
        elsif WatirSpec.platform == :windows
          # FIXME: this makes use lose implementation-specific routes!
          run_in_child_process
          sleep 0.5 until listening?
        else
          pid = fork { run! }<commit_msg>Conflicting Win32OLE and Thread has been fixed years ago<commit_after># encoding: utf-8

require "socket"

module WatirSpec
  class Server < Sinatra::Base
    class << self
      attr_accessor :autorun

      def run_async
        if WatirSpec.platform == :java
          Thread.new { run! }
          sleep 0.1 until WatirSpec::Server.running?
        elsif WatirSpec.platform == :windows
          # FIXME: this makes use lose implementation-specific routes!
          run_in_child_process
          sleep 0.5 until listening?
        else
          pid = fork { run! }
{'fraction_non_alphanumeric': 0.09236641221374046, 'fraction_numerical': 0.01603053435114504, 'mean_word_length': 2.4682539682539684, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '3685255', 'n_tokens_mistral': 397, 'n_tokens_neox': 384, 'n_words': 110}