I have been doing some stuff with the XML Builder, and running into problems whenever I try to debug it with an IDE (trying both Eclipse and Netbeans). I believe the problem is that the Builder classes remove all the default instance methods from their objects, including such basics as .class and .inspect, which breaks the debugger. It does this by means of the BlankSlate class, which is also used elsewhere in Rails. I patched Builder to not use BlankSlate, which fixes my problems but means I can''t generate XML tags with common method names. That''s OK, but not a great fix. I wondered if anybody else has encountered this problem and has a better solution. I''ve heard that 1.9 changes this in some way. Oh, and the equality checking methods are also gone! So if you have an xml builder object, you can''t do equality checks on it because that will insert <==> tags into your generated XML. Not good. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
To explain what I mean: $ script/console Loading development environment (Rails 2.1.0)>> xml = Builder::XmlMarkup.new(:indent => 1)=> <inspect/>>> xml == nil=> "<inspect/>\n<==></==>\n" Yech. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Further discussion at the link. Apparently this bug is considered a feature. http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/909-xml-builder-redefines-some-methods-that-breaks-things#ticket-909-3 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---