File tree 2 files changed +21
-0
lines changed
2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -819,11 +819,21 @@ static REBSER *Read_All_File(char *fname)
819
819
argv = (REBCHR * * )SERIES_DATA (ser );
820
820
for (i = 0 ; i < argc ; i ++ ) {
821
821
REBVAL * param = VAL_BLK_SKIP (arg , i );
822
+ if (IS_GET_WORD (param )) {
823
+ param = Get_Var (param );
824
+ }
825
+ else if (IS_GET_PATH (param )) {
826
+ Do_Path (& param , NULL );
827
+ param = DS_POP ; // volatile stack reference
828
+ }
822
829
if (IS_FILE (param )) {
823
830
REBSER * path = Value_To_OS_Path (param , FALSE);
824
831
argv [i ] = (REBCHR * )SERIES_DATA (path );
825
832
} else if (ANY_STR (param )) {
826
833
argv [i ] = Val_Str_To_OS (param );
834
+ } else if (IS_WORD (param )) {
835
+ Set_Series (REB_STRING , D_RET , Copy_Form_Value (param , TRUE));
836
+ argv [i ] = Val_Str_To_OS (D_RET );
827
837
} else {
828
838
Trap_Arg (param );
829
839
}
Original file line number Diff line number Diff line change @@ -85,6 +85,17 @@ rebol-cmd: func[cmd][
85
85
date? transcode/one tmp
86
86
]
87
87
delete %issue-2582.r3
88
+ --test-- "Block input with word!, get-word! and get-path!"
89
+ --assert all [
90
+ file? try [write %probe-args.r3 {Rebol [] probe system/options/args} ]
91
+ tmp: clear ""
92
+ url: http://example.org
93
+ ;; not using reduce in this test...
94
+ 0 = call/wait/output [: system/options/boot %probe-args.r3 :url foo] tmp
95
+ ["http://example.org" "foo" ] = transcode/one tmp
96
+ ]
97
+ delete %probe-args.r3
98
+
88
99
===end-group===
89
100
90
101
You can’t perform that action at this time.
0 commit comments