<commit_before>require_relative 'object/blank.rb'
require_relative 'object/duplicable.rb'
require_relative 'object/deep_dup.rb'

# The ReactiveSupport module implements methods from ActiveSupport. It can be
# included in Ruby's +Object+ class by adding +require 'reactive_support'+ to
# your project file. Then, ReactiveSupport methods can be called on any Ruby
# object just like the object's own methods.
# 
# In this example, ReactiveSupport's #try method is called on an array:
#     require 'reactive_support'
#     
#     arr = %w(foo, bar, baz)
#     arr.try(:join, '.') 

module ReactiveSupport

  # The +#deep_dup+ method returns a duplicate of a duplicable object. If the 
  # object calling +#deep_dup+ is not duplicable, the object itself is returned.
  # +#deep_dup+ is overwritten in the Array and Hash classes (see +./object/deep_dup.rb+).
  # In those classes, it duplicates the object recursively so the members of the
  # enumerable can be manipulated without affecting the original object.

  def deep_dup
    duplicable? ? self.dup : self
  end

  # The +#duplicable?+ method checks whether an object may be safely duplicated.
  # It returns true, unless the object calling it has its own method called 
  # +#duplicable?+. The +#duplicable?+ method is defined for non-duplicable
  # classes in +./object/duplicable.rb+.

  def duplicable?
    true<commit_msg>Require lib files recursively<commit_after>Dir['./lib/object/**/*.rb'].each {|f| require f }

# The ReactiveSupport module implements methods from ActiveSupport. It can be
# included in Ruby's +Object+ class by adding +require 'reactive_support'+ to
# your project file. Then, ReactiveSupport methods can be called on any Ruby
# object just like the object's own methods.
# 
# In this example, ReactiveSupport's #try method is called on an array:
#     require 'reactive_support'
#     
#     arr = %w(foo, bar, baz)
#     arr.try(:join, '.') 

module ReactiveSupport

  # The +#deep_dup+ method returns a duplicate of a duplicable object. If the 
  # object calling +#deep_dup+ is not duplicable, the object itself is returned.
  # +#deep_dup+ is overwritten in the Array and Hash classes (see +./object/deep_dup.rb+).
  # In those classes, it duplicates the object recursively so the members of the
  # enumerable can be manipulated without affecting the original object.

  def deep_dup
    duplicable? ? self.dup : self
  end

  # The +#duplicable?+ method checks whether an object may be safely duplicated.
  # It returns true, unless the object calling it has its own method called 
  # +#duplicable?+. The +#duplicable?+ method is defined for non-duplicable
  # classes in +./object/duplicable.rb+.

  def duplicable?
    true
{'fraction_non_alphanumeric': 0.08846295613711758, 'fraction_numerical': 0.0, 'mean_word_length': 3.9166666666666665, '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': '7185277', 'n_tokens_mistral': 816, 'n_tokens_neox': 775, 'n_words': 330}