<commit_before>::SByC::RubySystem = ::SByC::System.new {|t|

  # Some standard unary operators on strings
  t.add_operator(:capitalize, [String],          String,  "$0.capitalize()")
  t.add_operator(:downcase,   [String],          String,  "$0.downcase()")
  t.add_operator(:empty?,     [String],          Boolean, "$0.empty?()")
  t.add_operator(:hashcode,   [String],          Integer, "$0.hash()")
  t.add_operator(:length,     [String],          Integer, "$0.length()")
  t.add_operator(:reverse,    [String],          Integer, "$0.reverse()")
  t.add_operator(:rstrip,     [String],          String,  "$0.rstrip()")
  t.add_operator(:strip,      [String],          String,  "$0.strip()")
  t.add_operator(:to_i,       [String],          String,  "$0.to_i()")
  t.add_operator(:to_f,       [String],          String,  "$0.to_f()")
  t.add_operator(:to_s,       [String],          String,  "$0")
  t.add_operator(:upcase,     [String],          String,  "$0.upcase()")

  # Some standard binary operators on strings
  t.add_operator([:at, :slice], [String, Fixnum],  String,  "$0.slice($1)")
  t.add_operator([:at, :slice], [String, Range],   String,  "$0.slice($1)")
  t.add_operator(:center,       [String, Integer], String,  "$0.center($1)")
  t.add_operator(:concat,       [String, String],  String,  "$0.+($1)")
  t.add_operator(:format,       [String, String],  String,  "$0.%($1)")
  t.add_operator(:include?,     [String, String],  Boolean, "$0.include?($1)")
  t.add_operator(:matches?,     [String, Regexp],  Boolean, "(!!$0.=~($1))")
  t.add_operator(:times,        [String, Integer], String,  "$0.*($1)")

  # Some standard ternary operators on strings
  t.add_operator(:sub,        [String, Regexp, String], String,  "$0.sub($1, $2)")
  t.add_operator(:gsub,       [String, Regexp, String], String,  "$0.gsub($1, $2)")


  # Comparisons
  #t.add_operator(:eq, ::SByC::Signature::binary_signature(), )

}<commit_msg>Ruby type system continued.<commit_after>::SByC::RubySystem = ::SByC::System.new {|t|

  # Some standard unary operators on strings
  t.add_operator(:capitalize, [String],          String,  "$0.capitalize()")
  t.add_operator(:downcase,   [String],          String,  "$0.downcase()")
  t.add_operator(:empty?,     [String],          Boolean, "$0.empty?()")
  t.add_operator(:hashcode,   [String],          Integer, "$0.hash()")
  t.add_operator(:length,     [String],          Integer, "$0.length()")
  t.add_operator(:reverse,    [String],          Integer, "$0.reverse()")
  t.add_operator(:rstrip,     [String],          String,  "$0.rstrip()")
  t.add_operator(:strip,      [String],          String,  "$0.strip()")
  t.add_operator(:to_i,       [String],          String,  "$0.to_i()")
  t.add_operator(:to_f,       [String],          String,  "$0.to_f()")
  t.add_operator(:to_s,       [String],          String,  "$0")
  t.add_operator(:upcase,     [String],          String,  "$0.upcase()")

  # Some standard binary operators on strings
  t.add_operator([:at, :slice], [String, Fixnum],  String,  "$0.slice($1)")
  t.add_operator([:at, :slice], [String, Range],   String,  "$0.slice($1)")
  t.add_operator(:center,       [String, Integer], String,  "$0.center($1)")
  t.add_operator(:concat,       [String, String],  String,  "$0.+($1)")
  t.add_operator(:format,       [String, String],  String,  "$0.%($1)")
  t.add_operator(:include?,     [String, String],  Boolean, "$0.include?($1)")
  t.add_operator(:matches?,     [String, Regexp],  Boolean, "(!!$0.=~($1))")
  t.add_operator(:times,        [String, Integer], String,  "$0.*($1)")

  # Some standard ternary operators on strings
  t.add_operator(:sub,        [String, Regexp, String], String,  "$0.sub($1, $2)")
  t.add_operator(:gsub,       [String, Regexp, String], String,  "$0.gsub($1, $2)")

  # Comparisons
  [Numeric, String].each do |type|
    signature = ::SByC::System::Signature.coerce([type, type])
    t.add_operator(:eq,   signature, Boolean, "$0.==($1)")
    t.add_operator(:lt,   signature, Boolean, "$0.<($1)")
    t.add_operator(:lte,  signature, Boolean, "$0.<=($1)")
    t.add_operator(:gt,   signature, Boolean, "$0.>($1)")
    t.add_operator(:gte,  signature, Boolean, "$0.>=($1)")
  end

  # Arithmetic operators on numerics

}
{'fraction_non_alphanumeric': 0.2132768361581921, 'fraction_numerical': 0.018361581920903956, 'mean_word_length': 3.2194637537239323, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1530701', 'n_tokens_mistral': 1543, 'n_tokens_neox': 1544, 'n_words': 289}