define Object#blank? only if not defined yet #475

Merged
merged 1 commit into from Jan 19, 2013

Conversation

Projects
None yet
2 participants
Contributor

amatsuda commented Dec 8, 2012

Similar to #353

I found comment here is telling a lie https://github.com/mikel/mail/blob/9c16d9d/lib/mail/core_extensions/object.rb#L3

% ruby -we "require 'active_support/all'; require 'mail'"
.../gems/mail-2.5.3/lib/mail/core_extensions/object.rb:6: warning: method redefined; discarding old blank?
.../gems/activesupport-3.2.9/lib/active_support/core_ext/object/blank.rb:15: warning: previous definition of blank? was here

Either way, I think it's better to let Ruby check the existence of the target method before monkey-patching.

Collaborator

jeremy commented Dec 17, 2012

👍

@jeremy jeremy added a commit that referenced this pull request Jan 19, 2013

@jeremy jeremy Merge pull request #475 from amatsuda/object_blank_redefine_warning
define Object#blank? only if not defined yet
13d0db0

@jeremy jeremy merged commit 13d0db0 into mikel:master Jan 19, 2013

Contributor

amatsuda commented Jan 19, 2013

@jeremy ✌️

@jeremy jeremy added a commit that referenced this pull request Jan 23, 2013

@jeremy jeremy Update CHANGELOG for #471, #475, #489, #495 a0b88dd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment