diff --git a/activesupport/lib/active_support/core_ext/hash/slice.rb b/activesupport/lib/active_support/core_ext/hash/slice.rb index fb5887d57b..e07a5498ff 100644 --- a/activesupport/lib/active_support/core_ext/hash/slice.rb +++ b/activesupport/lib/active_support/core_ext/hash/slice.rb @@ -28,8 +28,8 @@ def slice(*keys) # Returns a hash containing the removed key/value pairs. # # hash = { a: 1, b: 2, c: 3, d: 4 } - # hash.slice!(:a, :b) # => {:c=>3, :d=>4 } - # hash # => {:a=>1, :b=>2 } + # hash.slice!(:a, :b) # => {:c=>3, :d=>4} + # hash # => {:a=>1, :b=>2} def slice!(*keys) omit = slice(*self.keys - keys) hash = slice(*keys)