Patch: Array#to_xml

10 views
Skip to first unread message

abriening

unread,
Aug 2, 2009, 12:38:49 PM8/2/09
to Ruby on Rails: Core
Array#to_xml always ignores the supplied block if the Array is empty.

There is a ticket with a patch to always yield to the block:
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2241

I added a patch that won't break the current API. It allows passing in
an ":always_yield => true" option to yield to the block even when
empty. Tests included.

Either patch would make me happy.
Reply all
Reply to author
Forward
0 new messages