<commit_before>module Sinatra
  
  #  Sinatra Irb is entered via <tt>ruby myapp.rb -c</tt> (replace myapp.rb with your app filename)
  #
  #  Be sure to also check out Sinatra::TestMethods for more cool stuff when your in Irb
  #
  module Irb
    extend self

    # taken from merb
    def start! #:nodoc:
      
      Object.send(:include, TestMethods) # added to allow post_to in console
      
      Object.class_eval do
        # Reload all Sinatra and App specific files
        def reload!
          Loader.reload!
        end
        
        # Show the +body+ with result info in your text editor!!! Great Job!
        def show!(editor = nil)
          editor = editor || ENV['EDITOR']
          IO.popen(editor, 'w') do |f| 
            f.puts "<!--"
            f.puts result_info
            f.puts "-->"
            f.puts
            f.puts body
          end
        end
        alias :mate :show!
        
        def result_info #:nodoc:
          info = <<-end_info
          # Status: #{status}
          # Headers: #{headers.inspect}
          end_info
        end
      end
      
      ARGV.clear # Avoid passing args to IRB 
      require 'irb' 
      require 'irb/completion' 
      def exit
        exit!
      end   
      if File.exists? ".irbrc"
        ENV['IRBRC'] = ".irbrc"
      end<commit_msg>don't show what the editor returns in irb<commit_after>module Sinatra
  
  #  Sinatra Irb is entered via <tt>ruby myapp.rb -c</tt> (replace myapp.rb with your app filename)
  #
  #  Be sure to also check out Sinatra::TestMethods for more cool stuff when your in Irb
  #
  module Irb
    extend self

    # taken from merb
    def start! #:nodoc:
      
      Object.send(:include, TestMethods) # added to allow post_to in console
      
      Object.class_eval do
        # Reload all Sinatra and App specific files
        def reload!
          Loader.reload!
        end
        
        # Show the +body+ with result info in your text editor!!! Great Job!
        def show!(editor = nil)
          editor = editor || ENV['EDITOR']
          IO.popen(editor, 'w') do |f| 
            f.puts "<!--"
            f.puts result_info
            f.puts "-->"
            f.puts
            f.puts body
          end
          nil
        end
        alias :mate :show!
        
        def result_info #:nodoc:
          info = <<-end_info
          # Status: #{status}
          # Headers: #{headers.inspect}
          end_info
        end
      end
      
      ARGV.clear # Avoid passing args to IRB 
      require 'irb' 
      require 'irb/completion' 
      def exit
        exit!
      end   
      if File.exists? ".irbrc"
        ENV['IRBRC'] = ".irbrc"
      end
{'fraction_non_alphanumeric': 0.08871566443949518, 'fraction_numerical': 0.0, 'mean_word_length': 1.4930619796484736, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 9, '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': '5066924', 'n_tokens_mistral': 832, 'n_tokens_neox': 808, 'n_words': 263}