diff options
author | Christian Johansen <christian@gitorious.com> | 2012-10-17 13:18:05 (GMT) |
---|---|---|
committer | Christian Johansen <christian@gitorious.com> | 2012-10-25 09:34:00 (GMT) |
commit | b8a4fc6ce829c3a1c3d243b27893207bd6eeada9 (patch) | |
tree | 302de3c0fe132327489614040ab40bea3b4d3c09 /vendor | |
parent | fbf78fcba51cd315a2d306da78fd508424f2ac71 (diff) |
Avoid Kernel#returning, use Object#tap instead
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/plugins/routing-filter/lib/routing_filter.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/plugins/routing-filter/lib/routing_filter.rb b/vendor/plugins/routing-filter/lib/routing_filter.rb index 07ac906..57ed23b 100644 --- a/vendor/plugins/routing-filter/lib/routing_filter.rb +++ b/vendor/plugins/routing-filter/lib/routing_filter.rb @@ -44,7 +44,7 @@ end ActionController::Routing::RouteSet.class_eval do def clear_with_filtering! - returning clear_without_filtering! do + clear_without_filtering!.tap do @filters.clear if @filters end end @@ -71,7 +71,7 @@ ActionController::Routing::RouteSet.class_eval do # TODO move this ... where? alias_method :extract_request_environment_without_host, :extract_request_environment unless method_defined? :extract_request_environment_without_host def extract_request_environment(request) - returning extract_request_environment_without_host(request) do |env| + extract_request_environment_without_host(request).tap do |env| env.merge! :host => request.host, :port => request.port, :host_with_port => request.host_with_port, |