Add diagnostic notation for bytes
This commit is contained in:
parent
41f536bd46
commit
ed19ece346
1 changed files with 4 additions and 1 deletions
|
@ -14,8 +14,11 @@ class CBOR::Token
|
|||
case token
|
||||
when IntT
|
||||
token.value.to_s
|
||||
when BytesT
|
||||
return %(h'') if token.value.empty?
|
||||
"h'#{token.value.hexstring}'"
|
||||
else
|
||||
"NOT IMPLEMENTED YET!"
|
||||
raise "Diagnostic notation for type #{token.class} not implemented"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue