ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:55633] [ruby-trunk - Bug #8567][Open] Logger#add can never return +false+
@ 2013-06-24 18:16 timpease (Tim Pease)
  2013-06-24 19:34 ` [ruby-core:55634] [ruby-trunk - Bug #8567] " drbrain (Eric Hodel)
  2013-07-10  4:11 ` [ruby-core:55901] [ruby-trunk - Bug #8567][Assigned] " zzak (Zachary Scott)
  0 siblings, 2 replies; 3+ messages in thread
From: timpease (Tim Pease) @ 2013-06-24 18:16 UTC (permalink / raw
  To: ruby-core


Issue #8567 has been reported by timpease (Tim Pease).

----------------------------------------
Bug #8567: Logger#add can never return +false+
https://bugs.ruby-lang.org/issues/8567

Author: timpease (Tim Pease)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.3.0]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


The ruby Logger in the stdlib has a discrepancy between the documentation and the source code. The documentation states "=== Return +true+ if successful, +false+ otherwise" (https://github.com/ruby/ruby/blob/trunk/lib/logger.rb#L342-L347). However, there is no code path that allows +false+ to be returned from this method.

The code was originally included in the stdlib by @nahi back in 2003. The documentation was clarified in 2012 by @drbrain to indicate that the method will return +true+ regardless of the success or failure of the method.

My expectation would be for this method to return +false+ if the message was not logged. This code block (https://github.com/ruby/ruby/blob/trunk/lib/logger.rb#L370-L372) would be the logical place in the code to return +false+; in this case the message was not logged successfully.

This affects all version of Ruby.


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:55634] [ruby-trunk - Bug #8567] Logger#add can never return +false+
  2013-06-24 18:16 [ruby-core:55633] [ruby-trunk - Bug #8567][Open] Logger#add can never return +false+ timpease (Tim Pease)
@ 2013-06-24 19:34 ` drbrain (Eric Hodel)
  2013-07-10  4:11 ` [ruby-core:55901] [ruby-trunk - Bug #8567][Assigned] " zzak (Zachary Scott)
  1 sibling, 0 replies; 3+ messages in thread
From: drbrain (Eric Hodel) @ 2013-06-24 19:34 UTC (permalink / raw
  To: ruby-core


Issue #8567 has been updated by drbrain (Eric Hodel).


Likely the documentation of the return value is in error and should be removed.
----------------------------------------
Bug #8567: Logger#add can never return +false+
https://bugs.ruby-lang.org/issues/8567#change-40119

Author: timpease (Tim Pease)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.3.0]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


The ruby Logger in the stdlib has a discrepancy between the documentation and the source code. The documentation states "=== Return +true+ if successful, +false+ otherwise" (https://github.com/ruby/ruby/blob/trunk/lib/logger.rb#L342-L347). However, there is no code path that allows +false+ to be returned from this method.

The code was originally included in the stdlib by @nahi back in 2003. The documentation was clarified in 2012 by @drbrain to indicate that the method will return +true+ regardless of the success or failure of the method.

My expectation would be for this method to return +false+ if the message was not logged. This code block (https://github.com/ruby/ruby/blob/trunk/lib/logger.rb#L370-L372) would be the logical place in the code to return +false+; in this case the message was not logged successfully.

This affects all version of Ruby.


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:55901] [ruby-trunk - Bug #8567][Assigned] Logger#add can never return +false+
  2013-06-24 18:16 [ruby-core:55633] [ruby-trunk - Bug #8567][Open] Logger#add can never return +false+ timpease (Tim Pease)
  2013-06-24 19:34 ` [ruby-core:55634] [ruby-trunk - Bug #8567] " drbrain (Eric Hodel)
@ 2013-07-10  4:11 ` zzak (Zachary Scott)
  1 sibling, 0 replies; 3+ messages in thread
From: zzak (Zachary Scott) @ 2013-07-10  4:11 UTC (permalink / raw
  To: ruby-core


Issue #8567 has been updated by zzak (Zachary Scott).

Category set to doc
Status changed from Open to Assigned
Assignee set to zzak (Zachary Scott)


----------------------------------------
Bug #8567: Logger#add can never return +false+
https://bugs.ruby-lang.org/issues/8567#change-40401

Author: timpease (Tim Pease)
Status: Assigned
Priority: Normal
Assignee: zzak (Zachary Scott)
Category: doc
Target version: 
ruby -v: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.3.0]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


The ruby Logger in the stdlib has a discrepancy between the documentation and the source code. The documentation states "=== Return +true+ if successful, +false+ otherwise" (https://github.com/ruby/ruby/blob/trunk/lib/logger.rb#L342-L347). However, there is no code path that allows +false+ to be returned from this method.

The code was originally included in the stdlib by @nahi back in 2003. The documentation was clarified in 2012 by @drbrain to indicate that the method will return +true+ regardless of the success or failure of the method.

My expectation would be for this method to return +false+ if the message was not logged. This code block (https://github.com/ruby/ruby/blob/trunk/lib/logger.rb#L370-L372) would be the logical place in the code to return +false+; in this case the message was not logged successfully.

This affects all version of Ruby.


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-10  4:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-24 18:16 [ruby-core:55633] [ruby-trunk - Bug #8567][Open] Logger#add can never return +false+ timpease (Tim Pease)
2013-06-24 19:34 ` [ruby-core:55634] [ruby-trunk - Bug #8567] " drbrain (Eric Hodel)
2013-07-10  4:11 ` [ruby-core:55901] [ruby-trunk - Bug #8567][Assigned] " zzak (Zachary Scott)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).