mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	vm_insnhelper.c: update assertion [ci skip]
* vm_insnhelper.c (callable_class_p): update assertion as callable class may be T_MODULE or I_ICLASS which refines a module since r56213. [Feature #12534] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									a23878c3f5
								
							
						
					
					
						commit
						41f7aa646f
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		|  | @ -40,6 +40,13 @@ static int | |||
| callable_class_p(VALUE klass) | ||||
| { | ||||
| #if VM_CHECK_MODE >= 2 | ||||
|     if (!klass) return FALSE; | ||||
|     switch (RB_BUILTIN_TYPE(klass)) { | ||||
|       case T_ICLASS: | ||||
| 	if (!RB_TYPE_P(RCLASS_SUPER(klass), T_MODULE)) break; | ||||
|       case T_MODULE: | ||||
| 	return TRUE; | ||||
|     } | ||||
|     while (klass) { | ||||
| 	if (klass == rb_cBasicObject) { | ||||
| 	    return TRUE; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 nobu
						nobu