mirror of
				https://gitea.invidious.io/iv-org/shard-ameba.git
				synced 2024-08-15 00:53:29 +00:00 
			
		
		
		
	Always return Bool value from Rule#excluded?
				
					
				
			This commit is contained in:
		
							parent
							
								
									39cc286263
								
							
						
					
					
						commit
						31392046e0
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -88,7 +88,7 @@ module Ameba::Rule
 | 
				
			||||||
    # my_rule.excluded?(source) # => true or false
 | 
					    # my_rule.excluded?(source) # => true or false
 | 
				
			||||||
    # ```
 | 
					    # ```
 | 
				
			||||||
    def excluded?(source)
 | 
					    def excluded?(source)
 | 
				
			||||||
      excluded.try &.any? do |path|
 | 
					      !!excluded.try &.any? do |path|
 | 
				
			||||||
        source.matches_path?(path) ||
 | 
					        source.matches_path?(path) ||
 | 
				
			||||||
          Dir.glob(path).any? { |glob| source.matches_path?(glob) }
 | 
					          Dir.glob(path).any? { |glob| source.matches_path?(glob) }
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue