From 07996ebc50f5906dbecc481ac83ed2adefc9ec6e Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 14 Nov 2013 15:31:27 -0800 Subject: Revert "Used Yield instead of block.call" -- this causes all of atom_feed_helper_test.rb to fail with "SystemStackError: stack level too deep". This reverts commit d3a1ce1cdc60d593de1682c5f4e3230c8db9a0fd. --- actionpack/lib/action_controller/metal/mime_responds.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_controller/metal/mime_responds.rb b/actionpack/lib/action_controller/metal/mime_responds.rb index bcd21dbabc..84ade41036 100644 --- a/actionpack/lib/action_controller/metal/mime_responds.rb +++ b/actionpack/lib/action_controller/metal/mime_responds.rb @@ -358,10 +358,10 @@ module ActionController #:nodoc: # # Sends :not_acceptable to the client and returns nil if no suitable format # is available. - def retrieve_collector_from_mimes(mimes = nil) #:nodoc: + def retrieve_collector_from_mimes(mimes=nil, &block) #:nodoc: mimes ||= collect_mimes_from_class_level collector = Collector.new(mimes) - yield(collector) if block_given? + block.call(collector) if block_given? format = collector.negotiate_format(request) if format -- cgit v1.2.3