Project

General

Profile

Feature #11955 ยป ruby-changes.patch

schneems (Richard Schneeman), 01/05/2016 09:58 PM

View differences:

ChangeLog
1
Tue Jan  5 21:45:12 2016  Richard Schneeman <richard.schneeman@gmail.com>
2

  
3
	* lib/logger.rb add method Logger#destination
4

  
1 5
Tue Jan  5 21:44:37 2016  SHIBATA Hiroshi  <hsbt@ruby-lang.org>
2 6

  
3 7
	* ChangeLog: fix wrong class name.
lib/logger.rb
271 271
    end
272 272
  end
273 273

  
274
  # The object that will receive log messages.
275
  def destination
276
    @logdev.dev
277
  end
278

  
274 279
  # Program name to include in log messages.
275 280
  attr_accessor :progname
276 281

  
test/logger/test_logger.rb
292 292
    r.close
293 293
    assert_equal("msg2\n\n", msg)
294 294
  end
295

  
296
  def test_log_object
297
    r, w = IO.pipe
298
    logger = Logger.new(w)
299
    assert_equal(w, logger.destination)
300
  end
295 301
end