Skip to content

Commit

Permalink
FIX: using MOLD/ONLY instead of FORM when saving data as a *.txt file
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed May 29, 2019
1 parent 88ec458 commit eef497e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/mezz/sys-codec.r
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ encode: function [
data: either handle? try [cod/entry] [
; original codecs were only natives
if type = 'text [
return either binary? data [to string! data][form data]
return either binary? data [to string! data][mold/only data]
]
do-codec cod/entry 'encode data
][
Expand Down
1 change: 1 addition & 0 deletions src/tests/units/codecs-test.r3
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Rebol [
--test-- "SAVE %test.txt"
--assert [1 2] = load save %temp.bin [1 2]
--assert "1 2" = load save %temp.txt [1 2] ;-- note that result is STRING
--assert "%a %b" = load save %temp.txt [%a %b]
--assert "1 2^/" = read/string %temp.bin ;@@ should be there the newline char?!
--assert "1 2" = read/string %temp.txt

Expand Down

0 comments on commit eef497e

Please sign in to comment.