Hey Jimbo,

This is not a Prototype issue.  Besides Prototype, you're using a 
JSON-related library that patches Object.prototype to provide it with a 
toJSONString method, probably http://www.json.org/json.js.  This issue 
is widely held against its official implementation...

This breaks just about every for...in loop in every piece of JS code 
you'll ever run when this lib is loaded (including the one in 
setRequestHeaders).  Which is why extending Object.prototype is widely 
regarded as a malpractice.  Actually, earlier versions of Prototype used 
to do this, and quickly reverted to a cleaner behavior.

Note that Prototype's trunk (current development version) finally adds 
JSON-related methods, so in the next point release you'll have them 
without the hassle.  However, we use a namespaced Object.toJSONString 
method for generic objects (and a regular method for specific object 
types), to avoid this problem.

-- 
Christophe Porteneuve aka TDD
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to