mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	variable.c: escape erred name
* variable.c (rb_path_to_class): escape erred name. as precision delimits the formatted result only, not region of an argument string, need to make a substring for the particular region. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									d54bedb7f8
								
							
						
					
					
						commit
						74768415d8
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -387,8 +387,8 @@ rb_path_to_class(VALUE pathname)
 | 
			
		|||
	}
 | 
			
		||||
	if (!id || !rb_const_defined_at(c, id)) {
 | 
			
		||||
	  undefined_class:
 | 
			
		||||
	    rb_raise(rb_eArgError, "undefined class/module %.*"PRIsVALUE,
 | 
			
		||||
		     (int)(p-path), pathname);
 | 
			
		||||
	    rb_raise(rb_eArgError, "undefined class/module % "PRIsVALUE,
 | 
			
		||||
		     rb_str_subseq(pathname, 0, p-path));
 | 
			
		||||
	}
 | 
			
		||||
	c = rb_const_get_at(c, id);
 | 
			
		||||
	if (!RB_TYPE_P(c, T_MODULE) && !RB_TYPE_P(c, T_CLASS)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue