Ruud H.G. van Tol on Sun, 27 Aug 2023 15:04:54 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: unexpected type of strjoin(), bug?



On 2023-08-26 21:13, Karim Belabas wrote:
* Ruud H.G. van Tol [2023-08-26 18:46]:
? version()
% [2, 15, 4]

? type(strjoin(binary(1)))
% "t_INT"
This is in principle already fixed in master. Same problem as you
reported to this list on 2023-08-21; it manifested itself as a
'bug in simplify_shallow' then.

ACK, thanks.



Just for fun:

? #1 == #"1"
% 1

? #0 == #"0"
% 0

:)  (for details, see ??length and #t_INT)



Related:

? my( v= ["x"] ); strjoin(v)
  ***   bug in simplify_shallow, type unknown, please report.


For now, I'm using a workaround:

? my( v= ["x"] ); Str(strjoin(v))
% "x"

Alternative:

? my( v= ["x"] ); concat(v)
% "x"

-- Ruud