Navigation Menu

Skip to content

Commit

Permalink
[info args] complains if invoked a non-proc.
Browse files Browse the repository at this point in the history
  • Loading branch information
coke committed Jul 11, 2010
1 parent 2b618be commit aabb9e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/Partcl/commands/info.pm
Expand Up @@ -102,7 +102,11 @@ our sub dispatch_command(*@args) {
}

my sub args($procname) {
pir::getprop__PsP('args', pir::get_hll_global__PS($procname));
my $sub := pir::get_hll_global__PS($procname);
error("\"$procname\" isn't a procedure")
if pir::isnull($sub);

pir::getprop__PsP('args', $sub);
}

my sub body($procname) {
Expand Down
2 changes: 1 addition & 1 deletion t/cmd_info.t
Expand Up @@ -36,7 +36,7 @@ eval_is {
catch {rename me ""}
eval_is {
info args me
} {"me" isn't a procedure} {info args no proc} {TODO NQPRX}
} {"me" isn't a procedure} {info args no proc}

eval_is {
proc foo {a {b 2}} {puts a; puts b}
Expand Down

0 comments on commit aabb9e5

Please sign in to comment.