summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vm_method.c b/vm_method.c
index c9f04942e1..fe0df18af5 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -1276,6 +1276,7 @@ set_method_visibility(VALUE self, int argc, VALUE *argv, rb_method_flag_t ex)
if (argc == 0) {
rb_warning("%"PRIsVALUE" with no argument is just ignored",
QUOTE_ID(rb_frame_callee()));
+ return;
}
for (i = 0; i < argc; i++) {