mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	merge revision(s) 57375:
More description about the protected attribute of a method git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									cc3540ba81
								
							
						
					
					
						commit
						cf45a681c0
					
				
					 2 changed files with 12 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
#define RUBY_VERSION "2.4.0"
 | 
			
		||||
#define RUBY_RELEASE_DATE "2017-03-12"
 | 
			
		||||
#define RUBY_PATCHLEVEL 30
 | 
			
		||||
#define RUBY_PATCHLEVEL 31
 | 
			
		||||
 | 
			
		||||
#define RUBY_RELEASE_YEAR 2017
 | 
			
		||||
#define RUBY_RELEASE_MONTH 3
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										11
									
								
								vm_method.c
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								vm_method.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1669,6 +1669,15 @@ rb_mod_public(int argc, VALUE *argv, VALUE module)
 | 
			
		|||
 *  defined methods to protected. With arguments, sets the named methods
 | 
			
		||||
 *  to have protected visibility.
 | 
			
		||||
 *  String arguments are converted to symbols.
 | 
			
		||||
 *
 | 
			
		||||
 *  If a method has protected visibility, it is callable only where
 | 
			
		||||
 *  <code>self</code> of the context is the same as the method.
 | 
			
		||||
 *  (method definition or instance_eval). This behavior is different from
 | 
			
		||||
 *  Java's protected method. Usually <code>private</code> should be used.
 | 
			
		||||
 *
 | 
			
		||||
 *  Note that a protected method is slow because it can't use inline cache.
 | 
			
		||||
 *
 | 
			
		||||
 *  To show a private method on RDoc, use <code>:doc:</code> instead of this.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
static VALUE
 | 
			
		||||
| 
						 | 
				
			
			@ -1696,6 +1705,8 @@ rb_mod_protected(int argc, VALUE *argv, VALUE module)
 | 
			
		|||
 *       private :a
 | 
			
		||||
 *     end
 | 
			
		||||
 *     Mod.private_instance_methods   #=> [:a, :c]
 | 
			
		||||
 *
 | 
			
		||||
 *  Note that to show a private method on RDoc, use <code>:doc:</code>.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
static VALUE
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue