URI::InvalidURIError has been in COSE::KEY.cbor_decode's the rescue list since 00cbf5d, but nothing in the gem requires uri. Ruby checks rescue classes one by one, left to right, and stops at the first match. URI::InvalidURIError is last. So when the raised error matches none of the earlier classes, Ruby tries to resolve URI and fails:
require "cose/key"
deep = 0
129.times { deep = [deep] }
COSE::Key.cbor_decode(deep.to_cbor)
# master: NameError: uninitialized constant COSE::Key::URI
We should make it so that unlisted errors are propagated normally.
URI::InvalidURIErrorhas been inCOSE::KEY.cbor_decode's the rescue list since 00cbf5d, but nothing in the gem requiresuri. Ruby checks rescue classes one by one, left to right, and stops at the first match.URI::InvalidURIErroris last. So when the raised error matches none of the earlier classes, Ruby tries to resolve URI and fails:We should make it so that unlisted errors are propagated normally.