summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/error.c b/error.c
index b8bf252530..c316e88d9c 100644
--- a/error.c
+++ b/error.c
@@ -274,8 +274,7 @@ exc_initialize(argc, argv, exc)
{
VALUE mesg;
- rb_scan_args(argc, argv, "01", &mesg);
- if (NIL_P(mesg)) {
+ if (rb_scan_args(argc, argv, "01", &mesg) == 0) {
mesg = str_new(0, 0);
}
else {