Fix problem with "string" keys.

This commit is contained in:
Netscape Navigator 2020-06-06 15:20:14 -05:00
parent 2eaaa9f9b5
commit 8d62787cec
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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