diff options
Diffstat (limited to 'vm_method.c')
-rw-r--r-- | vm_method.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vm_method.c b/vm_method.c index 7cf816a66a..6e336036e8 100644 --- a/vm_method.c +++ b/vm_method.c @@ -963,6 +963,11 @@ set_method_visibility(VALUE self, int argc, VALUE *argv, rb_method_flag_t ex) { int i; secure_visibility(self); + + if (argc == 0) { + rb_warning("%s with no argument is just ignored", rb_id2name(rb_frame_callee())); + } + for (i = 0; i < argc; i++) { rb_export_method(self, rb_to_id(argv[i]), ex); } |