Fix problem with "string" keys.
This commit is contained in:
parent
2eaaa9f9b5
commit
8d62787cec
|
@ -46,6 +46,7 @@ See `kitchen_sink.sh` examples.
|
|||
|
||||
# Current Status
|
||||
|
||||
- [ ] CLI is wrapping `FILE.` and `FEED.` multihahshes in "string quotes". Why?
|
||||
- [ ] Update Dev docs in protocol spec to reflect changes to `lipmaa` header.
|
||||
- [ ] Update spec document CLI usage examples to reflect API changes in 2020.
|
||||
- [ ] 100% class / module documentation
|
||||
|
|
|
@ -22,12 +22,11 @@ module Pigeon
|
|||
|
||||
def []=(key, value)
|
||||
raise STRING_KEYS_ONLY unless key.is_a?(String)
|
||||
|
||||
case value[0..4]
|
||||
when BLOB_SIGIL, MESSAGE_SIGIL, IDENTITY_SIGIL, STRING_SIGIL
|
||||
when BLOB_SIGIL, MESSAGE_SIGIL, IDENTITY_SIGIL
|
||||
body[key] = value
|
||||
else
|
||||
body[key] = value.inspect
|
||||
body[key] = value.start_with?(STRING_SIGIL) ? value : value.inspect
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue