We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7d4ea1 commit 1217d94Copy full SHA for 1217d94
lib/bitbucket_rest_api/core_ext/array.rb
@@ -4,11 +4,8 @@ def except(*keys) # :nodoc:
4
self.dup.except!(*keys)
5
end unless method_defined?(:except)
6
7
- # TODO except! should moodify self not a copy
8
def except!(*items) # :nodoc:
9
- copy = self.dup
10
- copy.reject! { |item| items.include? item }
11
- copy
+ self.reject! { |item| items.include? item }
12
end unless method_defined?(:except!)
13
14
def extract_options!
spec/bitbucket_rest_api/core_ext/array_spec.rb
@@ -13,7 +13,7 @@
end
15
describe '#except!' do
16
- xit 'removes the keys from the self' do
+ it 'removes the keys from the self' do
17
array = [:a, :b, :c, :d]
18
array.except!(:a, :b)
19
0 commit comments