aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorAvnerCohen <israbirding@gmail.com>2012-10-21 22:28:50 +0200
committerAvnerCohen <israbirding@gmail.com>2012-10-21 22:32:43 +0200
commit7fbb21dc802c9eb96d30c6231e2b3dc473dbe9dd (patch)
treebd4ba8706a73d6191b4faba9cf5b0b652b4ad284 /activesupport
parent40b0cecea2f4d7ee2e6c1210e6b33d9cdb788ed9 (diff)
downloadrails-7fbb21dc802c9eb96d30c6231e2b3dc473dbe9dd.tar.gz
rails-7fbb21dc802c9eb96d30c6231e2b3dc473dbe9dd.tar.bz2
rails-7fbb21dc802c9eb96d30c6231e2b3dc473dbe9dd.zip
More changes around 1.9 hash syntax
Added missing space in previous hash related commit
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/array/extract_options.rb2
-rw-r--r--activesupport/lib/active_support/core_ext/hash/deep_merge.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/extract_options.rb b/activesupport/lib/active_support/core_ext/array/extract_options.rb
index 9008a0df2a..5f153a2cc3 100644
--- a/activesupport/lib/active_support/core_ext/array/extract_options.rb
+++ b/activesupport/lib/active_support/core_ext/array/extract_options.rb
@@ -18,7 +18,7 @@ class Array
# end
#
# options(1, 2) # => {}
- # options(1, 2, a: :b) # => {:a=>:b}
+ # options(1, 2, a: :b) # => {a: :b}
def extract_options!
if last.is_a?(Hash) && last.extractable_options?
pop
diff --git a/activesupport/lib/active_support/core_ext/hash/deep_merge.rb b/activesupport/lib/active_support/core_ext/hash/deep_merge.rb
index 83f0c87b04..6ce2847ab5 100644
--- a/activesupport/lib/active_support/core_ext/hash/deep_merge.rb
+++ b/activesupport/lib/active_support/core_ext/hash/deep_merge.rb
@@ -4,10 +4,10 @@ class Hash
# h1 = { x: { y: [4,5,6] }, z: [7,8,9] }
# h2 = { x: { y: [7,8,9] }, z: 'xyz' }
#
- # h1.deep_merge(h2) #=> {:x => {:y => [7, 8, 9]}, :z => "xyz"}
- # h2.deep_merge(h1) #=> {:x => {:y => [4, 5, 6]}, :z => [7, 8, 9]}
+ # h1.deep_merge(h2) #=> {x: {y: [7, 8, 9]}, z: "xyz"}
+ # h2.deep_merge(h1) #=> {x: {y: [4, 5, 6]}, z: [7, 8, 9]}
# h1.deep_merge(h2) { |key, old, new| Array.wrap(old) + Array.wrap(new) }
- # #=> {:x => {:y => [4, 5, 6, 7, 8, 9]}, :z => [7, 8, 9, "xyz"]}
+ # #=> {x: {y: [4, 5, 6, 7, 8, 9]}, z: [7, 8, 9, "xyz"]}
def deep_merge(other_hash, &block)
dup.deep_merge!(other_hash, &block)
end