[jQuery] Trouble with extending Object prototype

[jQuery] Trouble with extending Object prototype


Hi all,
I extended the Object object with a method called getKeys() that works
like Perl's keys() function -- given a hash, or associative array, the
method returns an array containing all keys:
Object.prototype.getKeys = function() {
    var arr = new Array();
    for (var s in this) {
        if (this.hasOwnProperty(s)) arr.push(s);
    }
    return arr;
}
However, when I include this function definition anywhere in a page,
jQuery reports the following error:
name.replace is not a function
name = name.replace(/-([a-z])/ig, function(all, letter)
{ jquery-1.2.6.js (line 1115)
Any idea why this might be happening?
Thank you kindly,
--Bill