mirror of
				https://gitea.invidious.io/iv-org/shard-ameba.git
				synced 2024-08-15 00:53:29 +00:00 
			
		
		
		
	
							parent
							
								
									d7b0e10d1e
								
							
						
					
					
						commit
						12aa48c98f
					
				
					 2 changed files with 14 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -192,6 +192,19 @@ module Ameba::Rule::Style
 | 
			
		|||
      subject.catch(s).should_not be_valid
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    it "doesn't report if begin-end block in a proc literal" do
 | 
			
		||||
      s = Source.new %q(
 | 
			
		||||
        foo = ->{
 | 
			
		||||
          begin
 | 
			
		||||
            raise "Foo!"
 | 
			
		||||
          rescue ex
 | 
			
		||||
            pp ex
 | 
			
		||||
          end
 | 
			
		||||
        }
 | 
			
		||||
      )
 | 
			
		||||
      subject.catch(s).should be_valid
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    it "reports rule, pos and message" do
 | 
			
		||||
      s = Source.new %q(
 | 
			
		||||
        def method
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue