Feature #11955 » ruby-changes.patch
| ChangeLog | ||
|---|---|---|
| Tue Jan 5 21:45:12 2016 Richard Schneeman <richard.schneeman@gmail.com> | ||
| * lib/logger.rb add method Logger#destination | ||
| Tue Jan 5 21:44:37 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org> | ||
| * ChangeLog: fix wrong class name. | ||
| lib/logger.rb | ||
|---|---|---|
| end | ||
| end | ||
| # The object that will receive log messages. | ||
| def destination | ||
| @logdev.dev | ||
| end | ||
| # Program name to include in log messages. | ||
| attr_accessor :progname | ||
| test/logger/test_logger.rb | ||
|---|---|---|
| r.close | ||
| assert_equal("msg2\n\n", msg) | ||
| end | ||
| def test_log_object | ||
| r, w = IO.pipe | ||
| logger = Logger.new(w) | ||
| assert_equal(w, logger.destination) | ||
| end | ||
| end | ||