lib/i18n/exceptions.rb in i18n-1.0.0 vs lib/i18n/exceptions.rb in i18n-1.0.1

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'cgi' module I18n # Handles exceptions raised in the backend. All exceptions except for # MissingTranslationData exceptions are re-thrown. When a MissingTranslationData @@ -40,10 +42,10 @@ class MissingTranslation < ArgumentError module Base attr_reader :locale, :key, :options - def initialize(locale, key, options = {}) + def initialize(locale, key, options = EMPTY_HASH) @key, @locale, @options = key, locale, options.dup options.each { |k, v| self.options[k] = v.inspect if v.is_a?(Proc) } end def keys