mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* test/ruby/test_iterator.rb (test_block_argument_without_paren): added.
(follows sample/test.rb) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									3d307549a5
								
							
						
					
					
						commit
						6e6b863d53
					
				
					 2 changed files with 16 additions and 6 deletions
				
			
		|  | @ -1,3 +1,8 @@ | |||
| Mon Oct  6 15:17:23 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org> | ||||
| 
 | ||||
| 	* test/ruby/test_iterator.rb (test_block_argument_without_paren): | ||||
| 	  added. (follows sample/test.rb) | ||||
| 
 | ||||
| Mon Oct  6 11:57:06 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org> | ||||
| 
 | ||||
| 	* test/ruby/test_beginendblock.rb, test/ruby/beginmainend.rb: added | ||||
|  |  | |||
|  | @ -56,14 +56,19 @@ class TestIterator < Test::Unit::TestCase | |||
|     tt{|i| break if i == 5} | ||||
|     assert_equal(5, i) | ||||
| 
 | ||||
|     $x = false | ||||
|     begin | ||||
|     assert_raises(ArgumentError) do | ||||
|       tt3{} | ||||
|     rescue ArgumentError | ||||
|       $x = true | ||||
|     rescue Exception | ||||
|     end | ||||
|     assert($x) | ||||
|   end | ||||
| 
 | ||||
|   def tt4 &block | ||||
|     tt2(raise(ArgumentError,""),&block) | ||||
|   end | ||||
| 
 | ||||
|   def test_block_argument_without_paren | ||||
|     assert_raises(ArgumentError) do | ||||
|       tt4{} | ||||
|     end | ||||
|   end | ||||
| 
 | ||||
|   # iterator break/redo/next/retry | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 nahi
						nahi