From 675ba20cea54714b90b20ba2e465b92e29ba8360 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 25 May 2013 02:28:51 +0000 Subject: no clearing method cache * variable.c (set_const_visibility): return without clearing method cache if no arguments. * vm_method.c (set_method_visibility): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ variable.c | 1 + vm_method.c | 1 + 3 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 87c6ffc2ab..7b39e5b478 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat May 25 11:28:49 2013 Nobuyoshi Nakada + + * variable.c (set_const_visibility): return without clearing method + cache if no arguments. + + * vm_method.c (set_method_visibility): ditto. + Sat May 25 11:27:32 2013 Nobuyoshi Nakada * vm_method.c (set_method_visibility): quote unprintable method name. diff --git a/variable.c b/variable.c index 5f06a9d5ae..b5040f4d20 100644 --- a/variable.c +++ b/variable.c @@ -2232,6 +2232,7 @@ set_const_visibility(VALUE mod, int argc, VALUE *argv, rb_const_flag_t flag) if (argc == 0) { rb_warning("%"PRIsVALUE" with no argument is just ignored", QUOTE_ID(rb_frame_callee())); + return; } for (i = 0; i < argc; i++) { 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++) { -- cgit v1.2.3