do not search ancestors when checking Test::Unit.const_defined? #73

Merged
merged 1 commit into from Sep 10, 2012

Conversation

Projects
None yet
2 participants
@seanwalbran

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: e7a0ff8
)

nicksieger added a commit that referenced this pull request Sep 10, 2012

Merge pull request #73 from seanwalbran/fix-const-defined-false-positive
do not search ancestors when checking Test::Unit.const_defined?

@nicksieger nicksieger merged commit d20a340 into ci-reporter:master Sep 10, 2012

@nicksieger

This comment has been minimized.

Show comment Hide comment
@nicksieger

nicksieger Sep 10, 2012

Member

Thanks Sean! (sigh on the const_defined? collision).

Member

nicksieger commented Sep 10, 2012

Thanks Sean! (sigh on the const_defined? collision).

@seanwalbran

This comment has been minimized.

Show comment Hide comment
@seanwalbran

seanwalbran Sep 10, 2012

Thanks for the quick merge, much appreciated!

Thanks for the quick merge, much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment