From 68a8a298d69fdf9cb2a6e3f02568c4d0c02b62ff Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Wed, 12 Sep 2012 19:41:03 -0500 Subject: fix AS/core_ext examples [ci skip] --- activesupport/lib/active_support/core_ext/hash/indifferent_access.rb | 2 +- activesupport/lib/active_support/core_ext/hash/keys.rb | 2 +- activesupport/lib/active_support/core_ext/hash/reverse_merge.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb b/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb index 83fe982f33..6c7e876fca 100644 --- a/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +++ b/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb @@ -4,7 +4,7 @@ class Hash # Returns an ActiveSupport::HashWithIndifferentAccess out of its receiver: # - # { a: 1}.with_indifferent_access['a'] # => 1 + # { a: 1 }.with_indifferent_access['a'] # => 1 def with_indifferent_access ActiveSupport::HashWithIndifferentAccess.new_from_hash_copying_default(self) end diff --git a/activesupport/lib/active_support/core_ext/hash/keys.rb b/activesupport/lib/active_support/core_ext/hash/keys.rb index 509dbae596..13081995b0 100644 --- a/activesupport/lib/active_support/core_ext/hash/keys.rb +++ b/activesupport/lib/active_support/core_ext/hash/keys.rb @@ -63,7 +63,7 @@ class Hash # # { name: 'Rob', years: '28' }.assert_valid_keys(:name, :age) # => raises "ArgumentError: Unknown key: years" # { name: 'Rob', age: '28' }.assert_valid_keys('name', 'age') # => raises "ArgumentError: Unknown key: name" - # { name: 'Rob', age: '28' }.assert_valid_keys(:name, :age) # => passes, raises nothing + # { name: 'Rob', age: '28' }.assert_valid_keys(:name, :age) # => passes, raises nothing def assert_valid_keys(*valid_keys) valid_keys.flatten! each_key do |k| diff --git a/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb b/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb index f578ff10fc..fbb482435d 100644 --- a/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb +++ b/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb @@ -5,7 +5,7 @@ class Hash # # is equivalent to # - # options = { size: 25, velocity: 10}.merge(options) + # options = { size: 25, velocity: 10 }.merge(options) # # This is particularly useful for initializing an options hash # with default values. -- cgit v1.2.3