lib/faraday/options.rb in faraday-1.0.0.pre.rc1 vs lib/faraday/options.rb in faraday-1.0.0
- old
+ new
@@ -77,10 +77,10 @@
unless symbolized_key_set.include?(key.to_sym)
key_setter = "#{key}="
if !args.empty?
send(key_setter, args.first)
elsif block_given?
- send(key_setter, Proc.new.call(key))
+ send(key_setter, yield(key))
else
raise self.class.fetch_error_class, "key not found: #{key.inspect}"
end
end
send(key)