From a49727213c3f5906a3fbbfa552256312e0cc319e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 17 Jan 2014 00:30:41 -0200 Subject: [PATCH] Consistence in the block style --- .../lib/active_support/hash_with_indifferent_access.rb | 8 ++++---- activesupport/lib/active_support/ordered_hash.rb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/activesupport/lib/active_support/hash_with_indifferent_access.rb b/activesupport/lib/active_support/hash_with_indifferent_access.rb index 42f5e64306..594a4ca938 100644 --- a/activesupport/lib/active_support/hash_with_indifferent_access.rb +++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb @@ -159,7 +159,7 @@ module ActiveSupport # # counters.fetch('foo') # => 1 # counters.fetch(:bar, 0) # => 0 - # counters.fetch(:bar) {|key| 0} # => 0 + # counters.fetch(:bar) { |key| 0 } # => 0 # counters.fetch(:zoo) # => KeyError: key not found: "zoo" def fetch(key, *extras) super(convert_key(key), *extras) @@ -172,7 +172,7 @@ module ActiveSupport # hash[:b] = 'y' # hash.values_at('a', 'b') # => ["x", "y"] def values_at(*indices) - indices.collect {|key| self[convert_key(key)]} + indices.collect { |key| self[convert_key(key)] } end # Returns an exact copy of the hash. @@ -228,11 +228,11 @@ module ActiveSupport def to_options!; self end def select(*args, &block) - dup.tap { |hash| hash.select!(*args, &block)} + dup.tap { |hash| hash.select!(*args, &block) } end def reject(*args, &block) - dup.tap { |hash| hash.reject!(*args, &block)} + dup.tap { |hash| hash.reject!(*args, &block) } end # Convert to a regular hash with string keys. diff --git a/activesupport/lib/active_support/ordered_hash.rb b/activesupport/lib/active_support/ordered_hash.rb index 8b320f6d05..58a2ce2105 100644 --- a/activesupport/lib/active_support/ordered_hash.rb +++ b/activesupport/lib/active_support/ordered_hash.rb @@ -29,7 +29,7 @@ module ActiveSupport end def reject(*args, &block) - dup.tap { |hash| hash.reject!(*args, &block)} + dup.tap { |hash| hash.reject!(*args, &block) } end def nested_under_indifferent_access