summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/error.c b/error.c
index 4d56f80e70..010a27243a 100644
--- a/error.c
+++ b/error.c
@@ -718,6 +718,10 @@ rb_sys_fail(mesg)
int n = errno;
VALUE ee;
+ if (errno == 0) {
+ rb_bug("rb_sys_fail() - errno == 0");
+ }
+
err = strerror(errno);
if (mesg) {
volatile VALUE tmp = rb_str_inspect(rb_str_new2(mesg));