From: Jeremy Kemper Date: 2007-12-18T10:27:58+09:00 Subject: Re: Some Ruby 1.9 loose ends to tie up On 12/17/07, David Flanagan wrote: > I've got a few lingering questions about Ruby 1.9 and I'm hoping you can > provide a definitive answer so I can document them definitively: > > 1) Will Proc.binding be made to work in 1.9? This is the only remaining incompatibility with Action View (part of Rails) on Ruby 1.9. Several methods grab ERB's _erbout buffer from the block binding rather than passing _erbout as an argument. This allows, for example: def concat(string, binding) binding.eval('_erbout') << string end def some_widget_container(&block) concat '
', block.binding yield concat '
', block.binding end <% some_widget_container do %> widget contents <% end %> Is there a new way to get the block's binding? Or even the caller's binding? Best, jeremy