metanorma-utils 1.0.0 → 1.0.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: f5af94c8279744e0a0b72c5ab787493ac267594dfed2995fce689dbc1b23d59e
4
- data.tar.gz: 1dd672778666043bd46933a470c25969d1687a13f416ae0eeb724949b1adce9a
3
+ metadata.gz: a8ae87e8a2582071abee8bdf9dcedc29748752e841d8223d3ccea204fc6446c3
4
+ data.tar.gz: 6e49a57e3062b5ce3860de9ee92eab343f5c9bc8044687ae4ff13e38a3c79546
5
5
  SHA512:
6
- metadata.gz: d4f49c7aaa75452179e3a926f2c1d47d8b31cc028f943719900fa16ee3401ec1fdf09355192f43a6d6329e5a26dca8557d3215f17c632ebd24a7c8dd2397338d
7
- data.tar.gz: 11b38464fbbd28332163e8cc1d46d96b0e27223bbf0f38e6e5520675f30758d5e14b0bdf244b2c241740d6e713b07414ce8315e2c83bec7fa871beabc662049e
6
+ metadata.gz: d1659ee28aa09a7de7260f87676e5b6b07ae0efe9af2fdd48a2d15a980e80ade14d48a5f728112c41bf44c06da186b7a2991e966c75a06c8a507faf2f7bcc3e3
7
+ data.tar.gz: 40eb1d98da67ea6f743e9f57cc11dcd0ec5493947cc57078466be59d336fedf164b57bb3aa78b2bce3ab0acf674221e3dc40573972ec21b9a33f33332cb4eeb7
@@ -60,8 +60,8 @@ module Metanorma
60
60
  hash[key].nil? ? new_val : [hash[key], new_val]
61
61
  else
62
62
  if hash[key].is_a?(Array)
63
+ hash[key][-1] = {} if !hash[key].empty? && hash[key][-1].nil?
63
64
  hash[key] << {} if hash[key].empty? || !hash[key][-1].is_a?(Hash)
64
- hash[key][-1] = {} if hash[key][-1].nil?
65
65
  set_nested_value(hash[key][-1], keys[1..-1], new_val)
66
66
  elsif hash[key].nil? || hash[key].empty?
67
67
  hash[key] = {}
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Utils
3
- VERSION = "1.0.0".freeze
3
+ VERSION = "1.0.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.