.attr() brakes the chain if setting to value 'undefined'

.attr() brakes the chain if setting to value 'undefined'

<div>Given the following:</div><div>
</div><div>$.fn.foo = function() { alert('foo'); return this };</div><div>
</div><div>$( [] ).attr('id', bar).foo();</div><div>
</div><div>.foo() is never executed because bar was never initialized and is 'undefined'. The attr() method then thinks that it's getting instead of setting and returns undefined thus breaking the chain.</div>
<div>
</div><div>jQuery.fn.attr currently tests to see if a value needs to be set by the following case:</div><div>attr: function( elem, name, value ) {</div><div>    ...</div><div>    set = value !== undefined;</div><div>
</div><div>In this case value really was passed in but fails to be a valid value for setting.</div><div>
</div><div>Expected:</div><div>If an attribute is attempted to be set with an undefined value, either attempt to set the value to 'undefined' or at least return the jQuery object to continue chaining.</div>
<div>
</div><div>Core team, want me to open a bug?</div><br clear="all">Cheers,
- Jonathan