diff --git a/src/boot/natives.reb b/src/boot/natives.reb index 397796c05d..35a4f3565e 100644 --- a/src/boot/natives.reb +++ b/src/boot/natives.reb @@ -394,7 +394,7 @@ construct: native [ debase: native [ {Decodes binary-coded string to binary value.} - value [binary! string!] {The string to decode} + value [binary! any-string!] {The string to decode} base [integer!] {Binary base to use: 85, 64, 16, or 2} /url {Base 64 Decoding with URL and Filename Safe Alphabet} /part {Limit the length of the input} diff --git a/src/tests/units/enbase-test.r3 b/src/tests/units/enbase-test.r3 index b93d21860b..eefe8d30c8 100644 --- a/src/tests/units/enbase-test.r3 +++ b/src/tests/units/enbase-test.r3 @@ -97,6 +97,13 @@ Rebol [ --assert strict-equal? "A multi-line\nstring" to string! debase "41206d756c74692d6c696e655c6e737472696e67" 16 + --test-- "debase other strings" + ;@@ https://github.com/Oldes/Rebol-issues/issues/2453 + --assert #{1234} = debase "1234" 16 + --assert #{1234} = debase <1234> 16 + --assert #{1234} = debase @1234 16 + --assert #{01} = debase @00000001 2 + ===end-group===