mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	 bbaf9b2800
			
		
	
	
		bbaf9b2800
		
	
	
	
	
		
			
			operand of the not operator (e.g., not ()). [ruby-core:45976] [Bug #6674] * parse.y (parser_yylex): show no warning for a grouped expression as the operand of the not operator (e.g., not (a)) or as an argument of a method call without parentheses (e.g., foo (a)). [ruby-core:39050] [Bug #5214] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
		
			
				
	
	
		
			12 lines
		
	
	
	
		
			273 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
	
		
			273 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| require 'test/unit'
 | |
| 
 | |
| class TestIfunless < Test::Unit::TestCase
 | |
|   def test_not_with_grouped_expression
 | |
|     assert_equal(false, (not (true)))
 | |
|     assert_equal(true, (not (false)))
 | |
|   end
 | |
| 
 | |
|   def test_not_with_empty_grouped_expression
 | |
|     assert_equal(true, (not ()))
 | |
|   end
 | |
| end
 |