i18n 1.8.0 → 1.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1feacf530f7c7d776e429106178388b7f74a9d5dc2c56ff84f54cc69e3387f9d
4
- data.tar.gz: b718873f023bb27b997c6bd9e57711c61867aa011db33bab0c92c6863d2c6852
3
+ metadata.gz: d32ff36d5385248b7ee10b2f56290d334d8960c4bf2ad235586cb3ced8076ba3
4
+ data.tar.gz: 61ce5e019df9b588683df2f5d7450d9a59e11c1113149c621a52ade0e8008c12
5
5
  SHA512:
6
- metadata.gz: f50c1c99b2582d6fb03e6c6782c8213e2b52e2ef1f12dd91880cf33d1458f3b24b898189cf684070bfe4c6bc268ee2d1523fb0bc966d737ffbfbcc32dddc30c3
7
- data.tar.gz: c7e8e494a4c9d379f378fd6dda2320052b5be3c2ada7596ea32ba91535c491aa4581aaac1c7e672920fe5e4c70bfeaee872c7ef89b0e57791ca108077a397609
6
+ metadata.gz: 447fbf79001dabdeb67c2f40fced56fc33996c97e04aa9fafed6944f105c57d8b76f2a01a7f962501f3b9c746d0f20e14815210e9cdad5c38387f7ea75e95949
7
+ data.tar.gz: 0a520450edfe558d3441e1d14bbd5a23c6e3ee2814286979722a43c8e570f4d130c3a953c558ed1ab4e9149035752b59a0d2a41475ddb84122825839bdcf3ecd
@@ -101,7 +101,8 @@ module I18n
101
101
  init_translations unless initialized?
102
102
  translations
103
103
  end
104
- memo.deep_merge!(partial_translations) { |_, a, b| b || a }
104
+
105
+ memo.deep_merge!(partial_translations)
105
106
  end
106
107
  end
107
108
 
@@ -18,18 +18,12 @@ module I18n
18
18
  end
19
19
  end
20
20
 
21
- # deep_merge! from activesupport 5
22
- # Copyright (c) 2005-2019 David Heinemeier Hansson
23
- def deep_merge!(other_hash, &block)
24
- merge!(other_hash) do |key, this_val, other_val|
25
- if this_val.is_a?(Hash) && other_val.is_a?(Hash)
26
- this_val.deep_merge(other_val, &block)
27
- elsif block_given?
28
- block.call(key, this_val, other_val)
29
- else
30
- other_val
31
- end
21
+ # deep_merge_hash! by Stefan Rusterholz, see http://www.ruby-forum.com/topic/142809
22
+ def deep_merge!(data)
23
+ merger = lambda do |_key, v1, v2|
24
+ Hash === v1 && Hash === v2 ? v1.merge(v2, &merger) : v2
32
25
  end
26
+ merge!(data, &merger)
33
27
  end
34
28
 
35
29
  def symbolize_key(key)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module I18n
4
- VERSION = "1.8.0"
4
+ VERSION = "1.8.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Fuchs
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  - !ruby/object:Gem::Version
118
118
  version: 1.3.5
119
119
  requirements: []
120
- rubygems_version: 3.1.2
120
+ rubygems_version: 3.0.3
121
121
  signing_key:
122
122
  specification_version: 4
123
123
  summary: New wave Internationalization support for Ruby