summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/error.c b/error.c
index c316e88d9c..a0346a4c6b 100644
--- a/error.c
+++ b/error.c
@@ -393,12 +393,12 @@ exception(argc, argv)
}
for (i=0; i<argc; i++) { /* argument check */
id = rb_to_id(argv[i]);
- if (!rb_is_const_id(id)) {
- ArgError("identifier `%s' needs to be constant", rb_id2name(id));
- }
if (!rb_id2name(id)) {
ArgError("argument needs to be symbol or string");
}
+ if (!rb_is_const_id(id)) {
+ ArgError("identifier `%s' needs to be constant", rb_id2name(id));
+ }
}
for (i=0; i<argc; i++) {
v = rb_define_class_under(the_class,