merge revision(s) 40915: [Backport #8448]

* variable.c (set_const_visibility): use rb_frame_this_func() instead
	  of rb_frame_callee() for getting the name of the called method

	* test/ruby/test_module.rb: add test for private_constant with no args


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagachika 2013-06-04 14:34:56 +00:00
parent 2392c12bd1
commit 205b5c9cd6
4 changed files with 18 additions and 2 deletions

View file

@ -2227,7 +2227,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()));
QUOTE_ID(rb_frame_this_func()));
}
for (i = 0; i < argc; i++) {