<commit_before>class Regexp {
  """
  Regular Expression class. Used by Regexp literals in Fancy.
  """

  ruby_alias: 'inspect
  ruby_alias: 'to_s

  def === string {
    ruby: 'match args: [string]
  }

  def i {
    Regexp new(source(), true)
  }
}<commit_msg>Added Regexp#new: and Regexp#[] to create Regexp's from Strings.<commit_after>class Regexp {
  """
  Regular Expression class. Used by Regexp literals in Fancy.
  """

  ruby_alias: 'inspect
  ruby_alias: 'to_s

  def === string {
    ruby: 'match args: [string]
  }

  def i {
    Regexp new(source(), true)
  }

  def Regexp new: string {
    new(string)
  }

  def Regexp [string] {
    new(string)
  }
}
{'fraction_non_alphanumeric': 0.12835820895522387, 'fraction_numerical': 0.0, 'mean_word_length': 2.9239766081871346, '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': '760572', 'n_tokens_mistral': 267, 'n_tokens_neox': 248, 'n_words': 69}