title: JQuery Extend - operation is not supported in Firefox
body: <p>When using JQuery, extending an object that has an overridden toString() function causes an "Operation is not supported" error in Firefox. However in Chrome it works fine. Is this a bug in JQuery or am I doing something wrong in the below code snippet? </p>
  
  <pre><code>    var foo = function () {
          var that = this;
  
          that.toString = function () { return "foobar" };
  
          return that;
      }();
  
      var foo2 = function () {
          var that = this;            
  
          that = $.extend(true, {}, foo); // copy = options[ name ]; = "Operation is not supported" in Firefox 3.6.8
  
          return that;
      } ();
  
      alert(foo.toString()); //"foobar" in Chrome
      alert(foo2.toString()); //"foobar" in Chrome
  </code></pre>
  
  <p><strong>JQuery version 1.4.2</strong></p>
  
  <p>Many thanks,</p>
  
  <p>Godders</p>