Closed seanwalbran closed 12 years ago
Fix a false-positive detection of Test::Unit::Notification being defined due to const_defined? searching up the object heirarchy by default, which results in an uninitialized-constant-name-error at runtime if e.g. :Notification is defined elsewhere.
[1] pry(main)> Test::Unit.const_defined?(:Notification) => true [2] pry(main)> Test::Unit.const_defined?(:Notification, false) => false [5] pry(main)> Object.const_defined?(:Notification, false) => true
(Introduced in this commit: https://github.com/nicksieger/ci_reporter/commit/e7a0ff810a9cf21678ad6704b41fc3ad093d38ff )
Thanks Sean! (sigh on the const_defined? collision).
Thanks for the quick merge, much appreciated!
Fix a false-positive detection of Test::Unit::Notification being defined due to const_defined? searching up the object heirarchy by default, which results in an uninitialized-constant-name-error at runtime if e.g. :Notification is defined elsewhere.
[1] pry(main)> Test::Unit.const_defined?(:Notification) => true [2] pry(main)> Test::Unit.const_defined?(:Notification, false) => false [5] pry(main)> Object.const_defined?(:Notification, false) => true
(Introduced in this commit: https://github.com/nicksieger/ci_reporter/commit/e7a0ff810a9cf21678ad6704b41fc3ad093d38ff )