rspec-enriched_json 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d601f3b9829a2dd3bc4af4a42e65b01819ec6152156552f25b9e188ad47d828d
|
4
|
+
data.tar.gz: 1a08c66c4308c8f7e33ab3769c7bc1bc0601ace0588c242690d7edb2d02175d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86d612e624b12e6da7e6a32d877479a548ee301d79e5c231a6741843c83f07f635c11415e9945d84c68b076dda67b96712a5786a7d3cd4967923d4526be2f6d8
|
7
|
+
data.tar.gz: 5478f0f570d46b58139d82f16f1e305290370ca41ee99045ff382dfa4e77644afab8dd6fd408e98c495d2c23f14fc7c227120e87d1ab08da533dcb77df4e225f
|
@@ -85,7 +85,15 @@ module RSpec
|
|
85
85
|
|
86
86
|
def unescape_string_double_quotes(str)
|
87
87
|
if str.start_with?('"') && str.end_with?('"')
|
88
|
-
|
88
|
+
begin
|
89
|
+
# Only undump if it's a valid dumped string
|
90
|
+
# Check if the string is properly escaped by attempting undump
|
91
|
+
str.undump
|
92
|
+
rescue RuntimeError => e
|
93
|
+
# If undump fails, just return the original string
|
94
|
+
# This handles cases where the string has quotes but isn't a valid dump format
|
95
|
+
str
|
96
|
+
end
|
89
97
|
else
|
90
98
|
str
|
91
99
|
end
|