File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -451,11 +451,11 @@ REBINT Mode_Syms[] = {
451
451
args = Find_Refines (ds , ALL_WRITE_REFS );
452
452
spec = D_ARG (2 ); // data (binary, string, or block)
453
453
454
- if (!(IS_BINARY (spec ) || IS_STRING (spec ) || IS_BLOCK ( spec ) )) {
454
+ if (!(IS_BINARY (spec ) || IS_STRING (spec ))) {
455
455
//Trap1(RE_INVALID_ARG, spec);
456
456
REB_MOLD mo = {0 };
457
457
Reset_Mold (& mo );
458
- Mold_Value (& mo , spec , 0 );
458
+ Mold_Value (& mo , spec , TRUE );
459
459
Set_String (spec , mo .series );
460
460
}
461
461
Original file line number Diff line number Diff line change @@ -84,6 +84,12 @@ Rebol [
84
84
--assert "test" = read /string write %foo "test"
85
85
delete %foo
86
86
87
+ --test-- "write non binary data to file"
88
+ ;@@ https://github.com/Oldes/Rebol3/issues/16
89
+ --assert "make object! [^/ type: 'foo^/ ]" = read /string write %foo object [type: 'foo]
90
+ --assert "[a: 1]" = read /string write %foo [a: 1 ]
91
+ --assert "<foo>" = read /string write %foo <foo >
92
+ delete %foo
87
93
88
94
===end-group===
89
95
You can’t perform that action at this time.
0 commit comments