mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* lib/webrick/log.rb (BasicLog#log): get rid of as ineffectual
condition. * lib/webrick/log.rb (BasicLog#format): add "\n" to message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									54fec448f5
								
							
						
					
					
						commit
						df7c89b442
					
				
					 2 changed files with 10 additions and 5 deletions
				
			
		|  | @ -36,10 +36,8 @@ module WEBrick | |||
| 
 | ||||
|     def log(level, data) | ||||
|       if @log && level <= @level | ||||
|         if /\n\Z/ != data | ||||
|           @log << data | ||||
|           @log << "\n" if /\n\Z/ !~ data | ||||
|         end | ||||
|         data += "\n" if /\n\Z/ !~ data | ||||
|         @log << data | ||||
|       end | ||||
|     end | ||||
| 
 | ||||
|  | @ -64,7 +62,7 @@ module WEBrick | |||
|     def format(arg) | ||||
|       str = if arg.is_a?(Exception) | ||||
|         "#{arg.class}: #{arg.message}\n\t" << | ||||
|         arg.backtrace.join("\n\t") | ||||
|         arg.backtrace.join("\n\t") << "\n" | ||||
|       elsif arg.respond_to?(:to_str) | ||||
|         arg.to_str | ||||
|       else | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 gotoyuzo
						gotoyuzo