lib/i18n/exceptions.rb in i18n-0.7.0 vs lib/i18n/exceptions.rb in i18n-0.8.0.beta1

- old
+ new

@@ -36,15 +36,15 @@ @filename, @exception_message = filename, exception_message super "can not load translations from #{filename}: #{exception_message}" end end - class MissingTranslation + class MissingTranslation < ArgumentError module Base attr_reader :locale, :key, :options - def initialize(locale, key, options = nil) - @key, @locale, @options = key, locale, options.dup || {} + def initialize(locale, key, options = {}) + @key, @locale, @options = key, locale, options.dup options.each { |k, v| self.options[k] = v.inspect if v.is_a?(Proc) } end def keys @keys ||= I18n.normalize_keys(locale, key, options[:scope]).tap do |keys|