aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-17 00:30:41 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-17 00:30:41 -0200
commita49727213c3f5906a3fbbfa552256312e0cc319e (patch)
tree89333119e16b48df399c57314b7763ef7e269874 /activesupport/lib/active_support
parent5402b72faafecfa1eda8afce0e0f194fcf385fe3 (diff)
downloadrails-a49727213c3f5906a3fbbfa552256312e0cc319e.tar.gz
rails-a49727213c3f5906a3fbbfa552256312e0cc319e.tar.bz2
rails-a49727213c3f5906a3fbbfa552256312e0cc319e.zip
Consistence in the block style
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/hash_with_indifferent_access.rb8
-rw-r--r--activesupport/lib/active_support/ordered_hash.rb2
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