summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-07-02 16:25:17 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2019-07-02 16:25:17 -0700
commit2833651dcf54db5ba8e92746b479ebafa897b275 (patch)
tree6f0019d53d96259fb9c02372943920b550da22c0
parent866dd363f6fa8e7e8e3bacd55f4ba02a67dd240e (diff)
downloadchef-2833651dcf54db5ba8e92746b479ebafa897b275.tar.gz
fix more Style/SymbolArray autocorrect bugs
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/chef/node/mixin/immutablize_array.rb6
-rw-r--r--lib/chef/node/mixin/immutablize_hash.rb6
-rw-r--r--spec/unit/data_bag_item_spec.rb4
-rw-r--r--spec/unit/node/immutable_collections_spec.rb6
4 files changed, 11 insertions, 11 deletions
diff --git a/lib/chef/node/mixin/immutablize_array.rb b/lib/chef/node/mixin/immutablize_array.rb
index 2788f5635e..e9cbb2142a 100644
--- a/lib/chef/node/mixin/immutablize_array.rb
+++ b/lib/chef/node/mixin/immutablize_array.rb
@@ -1,5 +1,5 @@
#--
-# Copyright:: Copyright 2016-2018, Chef Software Inc.
+# Copyright:: Copyright 2016-2019, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -26,7 +26,7 @@ class Chef
*
+
-
- \[\]
+ []
abbrev
all?
any?
@@ -131,7 +131,7 @@ class Chef
# immutable.
DISALLOWED_MUTATOR_METHODS = %i{
<<
- \[\]=
+ []=
append
clear
collect!
diff --git a/lib/chef/node/mixin/immutablize_hash.rb b/lib/chef/node/mixin/immutablize_hash.rb
index 2cf65d2b2e..8c0d1c9509 100644
--- a/lib/chef/node/mixin/immutablize_hash.rb
+++ b/lib/chef/node/mixin/immutablize_hash.rb
@@ -1,5 +1,5 @@
#--
-# Copyright:: Copyright 2016-2018, Chef Software Inc.
+# Copyright:: Copyright 2016-2019, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -26,7 +26,7 @@ class Chef
<=
>
>=
- \[\]
+ []
all?
any?
assoc
@@ -125,7 +125,7 @@ class Chef
zip
}.freeze
DISALLOWED_MUTATOR_METHODS = %i{
- \[\]=
+ []=
clear
collect!
compact!
diff --git a/spec/unit/data_bag_item_spec.rb b/spec/unit/data_bag_item_spec.rb
index 7a197b6bc5..3c3420a55a 100644
--- a/spec/unit/data_bag_item_spec.rb
+++ b/spec/unit/data_bag_item_spec.rb
@@ -1,6 +1,6 @@
#
# Author:: Adam Jacob (<adam@chef.io>)
-# Copyright:: Copyright 2008-2018, Chef Software Inc.
+# Copyright:: Copyright 2008-2019, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -148,7 +148,7 @@ describe Chef::DataBagItem do
end
it "implements all the methods of Hash" do
- methods = %i{rehash to_hash \[\] fetch \[\]= store default
+ methods = %i{rehash to_hash [] fetch []= store default
default= default_proc index size length
empty? each_value each_key each_pair each keys values
values_at delete delete_if reject! clear
diff --git a/spec/unit/node/immutable_collections_spec.rb b/spec/unit/node/immutable_collections_spec.rb
index f543123dfd..f23e40dc4c 100644
--- a/spec/unit/node/immutable_collections_spec.rb
+++ b/spec/unit/node/immutable_collections_spec.rb
@@ -1,6 +1,6 @@
#
# Author:: Daniel DeLeo (<dan@chef.io>)
-# Copyright:: Copyright 2012-2018, Chef Software Inc.
+# Copyright:: Copyright 2012-2019, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -146,7 +146,7 @@ describe Chef::Node::ImmutableMash do
end
%i{
- \[\]=
+ []=
clear
default=
default_proc=
@@ -192,7 +192,7 @@ describe Chef::Node::ImmutableArray do
%i{
<<
- \[\]=
+ []=
clear
collect!
compact!