lib/i18n/tasks/data/adapter/yaml_adapter.rb in i18n-tasks-1.0.9 vs lib/i18n/tasks/data/adapter/yaml_adapter.rb in i18n-tasks-1.0.10

- old
+ new

@@ -3,11 +3,11 @@ require 'yaml' module I18n::Tasks module Data module Adapter module YamlAdapter - EMOJI_REGEX = /\\u[\da-f]{8}/i + EMOJI_REGEX = /\\u[\da-f]{8}/i.freeze class << self # @return [Hash] locale tree def parse(str, options) if YAML.method(:load).arity.abs == 2 @@ -23,10 +23,10 @@ restore_emojis(tree.to_yaml(options || {})) end # @return [String] def restore_emojis(yaml) - yaml.gsub(EMOJI_REGEX) { |m| [m[-8..].to_i(16)].pack("U") } + yaml.gsub(EMOJI_REGEX) { |m| [m[-8..].to_i(16)].pack('U') } end end end end end