File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -3204,7 +3204,16 @@ private:
32043204
32053205 // Cache the last call's result.
32063206 static string lastResult;
3207- if (v != lastResult) lastResult = v.idup;
3207+ if (v.empty)
3208+ {
3209+ // Return non-null array for blank result to distinguish from
3210+ // not-present result.
3211+ lastResult = " " ;
3212+ }
3213+ else if (v != lastResult)
3214+ {
3215+ lastResult = v.idup;
3216+ }
32083217 value = lastResult;
32093218 return true ;
32103219 }
@@ -3233,11 +3242,18 @@ private:
32333242 assertThrown(environment[" std_process" ]);
32343243
32353244 // get() without default value
3236- assert (environment.get (" std_process" ) == null );
3245+ assert (environment.get (" std_process" ) is null );
32373246
32383247 // get() with default value
32393248 assert (environment.get (" std_process" , " baz" ) == " baz" );
32403249
3250+ version (Posix )
3251+ {
3252+ // get() on an empty (but present) value
3253+ environment[" std_process" ] = " " ;
3254+ assert (environment.get (" std_process" ) ! is null );
3255+ }
3256+
32413257 // Convert to associative array
32423258 auto aa = environment.toAA();
32433259 assert (aa.length > 0 );
You can’t perform that action at this time.
0 commit comments