ruby-changes:29012
From: nagachika <ko1@a...>
Date: Tue, 4 Jun 2013 23:35:11 +0900 (JST)
Subject: [ruby-changes:29012] nagachika:r41064 (ruby_2_0_0): merge revision(s) 40915: [Backport #8448]
nagachika 2013-06-04 23:34:56 +0900 (Tue, 04 Jun 2013) New Revision: 41064 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41064 Log: 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 Modified directories: branches/ruby_2_0_0/ Modified files: branches/ruby_2_0_0/ChangeLog branches/ruby_2_0_0/test/ruby/test_module.rb branches/ruby_2_0_0/variable.c branches/ruby_2_0_0/version.h Index: ruby_2_0_0/ChangeLog =================================================================== --- ruby_2_0_0/ChangeLog (revision 41063) +++ ruby_2_0_0/ChangeLog (revision 41064) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1 +Tue Jun 4 23:32:12 2013 Charlie Somerville <charliesome@r...> + + * 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 + Tue Jun 4 23:27:24 2013 Yusuke Endoh <mame@t...> * vm_insnhelper.c (vm_callee_setup_keyword_arg, Index: ruby_2_0_0/variable.c =================================================================== --- ruby_2_0_0/variable.c (revision 41063) +++ ruby_2_0_0/variable.c (revision 41064) @@ -2227,7 +2227,7 @@ set_const_visibility(VALUE mod, int argc https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/variable.c#L2227 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++) { Index: ruby_2_0_0/version.h =================================================================== --- ruby_2_0_0/version.h (revision 41063) +++ ruby_2_0_0/version.h (revision 41064) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1 #define RUBY_VERSION "2.0.0" #define RUBY_RELEASE_DATE "2013-06-04" -#define RUBY_PATCHLEVEL 202 +#define RUBY_PATCHLEVEL 203 #define RUBY_RELEASE_YEAR 2013 #define RUBY_RELEASE_MONTH 6 Index: ruby_2_0_0/test/ruby/test_module.rb =================================================================== --- ruby_2_0_0/test/ruby/test_module.rb (revision 41063) +++ ruby_2_0_0/test/ruby/test_module.rb (revision 41064) @@ -1192,6 +1192,15 @@ class TestModule < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/test_module.rb#L1192 assert_equal("bar", c.class_eval("BAR")) end + def test_private_constant_with_no_args + assert_in_out_err([], <<-RUBY, [], ["-:3: warning: private_constant with no argument is just ignored"]) + $-w = true + class X + private_constant + end + RUBY + end + class PrivateClass end private_constant :PrivateClass Property changes on: ruby_2_0_0 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r40915 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/