summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/error.c b/error.c
index aeacc4d130..f97452941b 100644
--- a/error.c
+++ b/error.c
@@ -1261,12 +1261,13 @@ Init_syserr(void)
char *
rb_strerrno(int err)
{
+ if (err == 0) return "NOERROR";
#define defined_error(name, num) if (err == num) return name;
#define undefined_error(name)
#include "known_errors.inc"
#undef defined_error
#undef undefined_error
- return "NOERROR";
+ return "UNKNOWNERROR";
}
static void