File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -402,7 +402,7 @@ read: action [
402
402
write: action [
403
403
{Writes to a file, URL, or port - auto-converts text strings.}
404
404
destination [port! file! url! block! ]
405
- data [ binary! string! block! ] {Data to write (non-binary converts to UTF-8)}
405
+ data {Data to write (non-binary converts to UTF-8)}
406
406
/part {Partial write a given number of units}
407
407
length [number! ]
408
408
/seek {Write at a specific position}
Original file line number Diff line number Diff line change @@ -447,6 +447,14 @@ REBINT Mode_Syms[] = {
447
447
args = Find_Refines (ds , ALL_WRITE_REFS );
448
448
spec = D_ARG (2 ); // data (binary, string, or block)
449
449
450
+ if (!(IS_BINARY (spec ) || IS_STRING (spec ) || IS_BLOCK (spec ))) {
451
+ //Trap1(RE_INVALID_ARG, spec);
452
+ REB_MOLD mo = {0 };
453
+ Reset_Mold (& mo );
454
+ Mold_Value (& mo , spec , 0 );
455
+ Set_String (spec , mo .series );
456
+ }
457
+
450
458
// Handle the READ %file shortcut case:
451
459
if (!IS_OPEN (file )) {
452
460
REBCNT nargs = AM_OPEN_WRITE ;
You can’t perform that action at this time.
0 commit comments