<commit_before># coding: utf-8
require 'yaml'
module I18n::Tasks
  module Data
    module Adapter
      module YamlAdapter
        extend self

        # @return [Hash] locale tree
        def parse(str, options)
          YAML.load(str, options || {})
        end

        # @return [String]
        def dump(tree, options)
          tree.to_yaml(options || {})
        end

      end
    end
  end
end<commit_msg>try fix rbx-2 compat<commit_after># coding: utf-8
require 'yaml'
module I18n::Tasks
  module Data
    module Adapter
      module YamlAdapter
        extend self

        # @return [Hash] locale tree
        def parse(str, options)
          if YAML.method(:load).arity.abs == 2
            YAML.load(str, options || {})
          else
            # older jruby and rbx 2.2.7 do not accept options
            YAML.load(str)
          end
        end

        # @return [String]
        def dump(tree, options)
          tree.to_yaml(options || {})
        end

      end
    end
  end
end
{'fraction_non_alphanumeric': 0.09262948207171315, 'fraction_numerical': 0.010956175298804782, 'mean_word_length': 1.6587301587301588, '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': '6636020', 'n_tokens_mistral': 312, 'n_tokens_neox': 300, 'n_words': 89}