immosquare-extensions 0.1.6 → 0.1.7

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: b217c241e856d71b6c96c67abbf74eab8ba153d99c50074913ad2ca1e21fd491
4
- data.tar.gz: c5c57c09e32e6f1a8170337875bb4affbac7697bbf756ce1005fccbcb0036f7e
3
+ metadata.gz: 94018ffd0ddd54cf8ee8914f26b0724424698f94e0bbcd008dbdba480580bdca
4
+ data.tar.gz: a3f004b8721b0e722ecd9b20c3aac54586ac0da7a44f289e6791169c4c40b754
5
5
  SHA512:
6
- metadata.gz: 0a121695c0a02bca0919b5e7f0d7e9eb72aa808845fa4f25fa053b96455e426e2bec41db3e79d3f6a32520931d2cb483df00fb3a99170920067a4475d9b132c8
7
- data.tar.gz: e1c27fb282f8d7a5745b04505a9de591de4ad3b8270717206aa7dbb5bda89f1a66e676ec3b5f5311d6522ecbb1d2c5681c13d9b7e13d8e0e552fcde822ad8c27
6
+ metadata.gz: b919e5f6e13c1759ad5f694fc0db3c07cd38c89b98db90482a70fe5f672c758e1d0b004435689967ff382234a1cdfa562f36906355e5df02b8d1787eb162e4cd
7
+ data.tar.gz: 8270ffd69a4cf5823996d9c58e8290bf82244e46dec58cd8ba4884d3ac4b8b6533508220cd58bfcb064948c3ec4b0abf30574677ee1d908f6eca9258d8c615db
@@ -124,7 +124,7 @@ class Hash
124
124
  if hash.is_a?(Hash)
125
125
  return "{}" if hash.empty?
126
126
 
127
- if hash.keys.count == 1
127
+ if hash.keys.count == 1 && indent > 0
128
128
  key, value = hash.first
129
129
  value_str = json_representation(value, align, indent_size, indent)
130
130
  return "{\"#{key}\": #{value_str}}"
@@ -147,7 +147,7 @@ class Hash
147
147
  elsif hash.is_a?(Array)
148
148
  return "[]" if hash.empty?
149
149
 
150
- if hash.length == 1
150
+ if hash.length == 1 && !hash.first.is_a?(Hash)
151
151
  value_str = json_representation(hash.first, align, indent_size, indent)
152
152
  return "[#{value_str}]"
153
153
  end
@@ -1,3 +1,3 @@
1
1
  module ImmosquareExtensions
2
- VERSION = "0.1.6".freeze
2
+ VERSION = "0.1.7".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: immosquare-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - IMMO SQUARE