lib/aws/cloud_watch/metric_collection.rb in aws-sdk-1.11.3 vs lib/aws/cloud_watch/metric_collection.rb in aws-sdk-1.12.0

- old
+ new

@@ -95,12 +95,10 @@ # Multiple calls to #with_dimensions will add to previous dimensions. # @param [Array<Hash>] dimensions An array of dimensions. Each dimension # should be a Hash with a `:name` and `:value`. # @return [MetricCollection] def with_dimensions *dimensions - dimensions = @filters[:dimensions] || [] - dimensions += dimensions.flatten - filter(:dimensions, dimensions) + filter(:dimensions, (@filters[:dimensions] || []) + dimensions.flatten ) end protected def _each_item next_token, options = {}, &block