jquery/jquery — pull request #1905 by meetselva (2014-12-05 18:33:10+00:00)
Title: Fix to .data update if key was added as-is when using dash

When adding data using object argument, the keys are not camel cased as internally it uses `.extend` to create data cache. This fails when trying to update the value currently as the update is always camel cased.

Test Scenario: Creating a data using [object argument](http://api.jquery.com/data/#data-obj) with keys in object has dash(es).

Code:
````
//creates a data for the element with keys data-test-1 and data-test-2 instead of camel cased notation as internally it is using .extend.
$('#data-test').data({'data-test-1': 1, 'data-test-2': 2});
//logs 1
console.log($('#data-test').data('data-test-1'));
//creates a new data dataTest1 and updates the value 4
$('#data-test').data('data-test-1', 4);
//
console.log($('#data-test').data('data-test-1'));
````

Test Case: http://jsfiddle.net/c0k0owkq/

The fix is to either use a different method instead of `.extend` to add data from an object or check if the key exist as-is when updating. The later was an easy change.