diff options
-rw-r--r-- | gv.c | 2 | ||||
-rw-r--r-- | pp_sys.c | 2 | ||||
-rw-r--r-- | t/op/coreamp.t | 1 |
3 files changed, 3 insertions, 2 deletions
@@ -1358,7 +1358,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, case KEY_lstat: case KEY_pop: case KEY_push: - case KEY_setpgrp: case KEY_shift: case KEY_sleep: + case KEY_setpgrp: case KEY_shift: case KEY_splice: case KEY_srand: case KEY_stat: case KEY_substr: case KEY_sysopen: @@ -4579,7 +4579,7 @@ PP(pp_sleep) Time_t when; (void)time(&lasttime); - if (MAXARG < 1) + if (MAXARG < 1 || (!TOPs && !POPs)) PerlProc_pause(); else { duration = POPi; diff --git a/t/op/coreamp.t b/t/op/coreamp.t index 06464f1a8d..03fc14f098 100644 --- a/t/op/coreamp.t +++ b/t/op/coreamp.t @@ -655,6 +655,7 @@ test_proto "set$_" for qw ' test_proto "shm$_" for qw "ctl get read write"; test_proto 'shutdown'; test_proto 'sin'; +test_proto 'sleep'; test_proto "socket$_" for "", "pair"; test_proto 'sprintf'; |