Skip to content
Permalink
Browse files

Check input for definedness instead of passing everything to &val and…

… muting potential warnings.
  • Loading branch information...
jkramer committed Jul 4, 2018
1 parent 0275ea2 commit 07b032d0466cb8eaad8befacf67540ec6c719283
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/io_operators.pm6
@@ -63,13 +63,13 @@ multi sub gist(|) {

proto sub prompt($?, *%) {*}
multi sub prompt() {
quietly val $*IN.get
nqp::defined(my \res := $*IN.get) ?? val(res) !! res;
}
multi sub prompt($msg) {
my $out := $*OUT;
$out.print($msg);
$out.flush();
quietly val $*IN.get;
nqp::defined(my \res := $*IN.get) ?? val(res) !! res;
}

proto sub dir(|) {*}

0 comments on commit 07b032d

Please sign in to comment.
You can’t perform that action at this time.