mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	don't modify $/
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									ff9e26a7bb
								
							
						
					
					
						commit
						11e732660a
					
				
					 1 changed files with 6 additions and 12 deletions
				
			
		|  | @ -35,18 +35,12 @@ if defined? Zlib | |||
|       w << "abc" | ||||
|       w.close | ||||
|       r = Zlib::GzipReader.new(StringIO.new(s)) | ||||
|       begin | ||||
|         old_rs = $/ | ||||
|         $/ = "" | ||||
|         r.ungetc ?\n | ||||
|         assert_equal("abc", r.gets) | ||||
|         assert_nothing_raised { | ||||
|           r.read | ||||
|           r.close | ||||
|         } | ||||
|       ensure | ||||
|         $/ = old_rs | ||||
|       end | ||||
|       r.ungetc ?\n | ||||
|       assert_equal("abc", r.gets("")) | ||||
|       assert_nothing_raised { | ||||
|         r.read | ||||
|         r.close | ||||
|       } | ||||
|     end | ||||
|   end | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 akr
						akr