i18n_data 0.9.0 → 0.9.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: 9b640e3bebf22ae663b78b71ed37a29cd52a772a61ab0495598e5e3156292c97
4
- data.tar.gz: 9dc4ab54b9d771120a18c0c776edc50ca8d87b948bf1fa71a45cefb071f5f669
3
+ metadata.gz: 9f6c5d2fd7892ae09db4bd6dd2b7ce38fa6895a94d823c666b0af763fb0be646
4
+ data.tar.gz: efea2ece2e8f0a1d725303cfc9c43d54887bd8958a96538a511f17717b559fa1
5
5
  SHA512:
6
- metadata.gz: e5c7bcbff2b8b28bb356bea9f88d85e69d60668df3861e98e8b997e007031d79a182503478524f6bab1c5fde2a2860302415d8af3456238f632e3cf0bdf8fb27
7
- data.tar.gz: e8473bf361f325e8f476d6fb42094fe4e90b00a1dad82a8df4232b74728fba8b6de79d7aeb514ef0c3a278aaf1562e47fcc9d2b17464caaa71b6559edb10f633
6
+ metadata.gz: 128c9bb8a1479702dd00919de3ccdb867c2cc7bb904ad768517ea1bd79bd3c1360a5e8c9b6442d34819d0c945a15934387d763bbba25922f24f5eebe61424a6c
7
+ data.tar.gz: d159a8289f57daeaa27bd0225baa04283fe60944c7e028892625590b5a07f7b35013e3aa86ef9addc68dbf10e55bb9e7811b64d7f6a39d879a322df027aa5245
@@ -47,13 +47,9 @@ module I18nData
47
47
 
48
48
  private
49
49
 
50
- def fetch(*args)
51
- @cache ||= {}
52
- if @cache.key?(args)
53
- @cache[args]
54
- else
55
- @cache[args] = yield
56
- end
50
+ def fetch(type, language_code)
51
+ @cache ||= Hash.new { |h, k| h[k] = {} }
52
+ @cache[type].fetch(language_code) { @cache[type][language_code] = yield }
57
53
  end
58
54
 
59
55
  # hardcode languages that do not have a default type
@@ -1,3 +1,3 @@
1
1
  module I18nData
2
- VERSION = Version = "0.9.0"
2
+ VERSION = Version = "0.9.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser