Consistence in the block style

This commit is contained in:
Rafael Mendonça França 2014-01-17 00:30:41 -02:00
parent 5402b72faa
commit a49727213c
2 changed files with 5 additions and 5 deletions

View File

@ -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.

View File

@ -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