summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-05-02 15:07:07 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-05-02 15:07:07 -0700
commitbc6396592f4bb123bfa608799b14df1a0f5f086d (patch)
tree5ddabbeca6be5008f1acf8124fcf2c16975604ad
parent754889d5563a23ca55faa2534f951d8315b8b63e (diff)
downloadchef-bc6396592f4bb123bfa608799b14df1a0f5f086d.tar.gz
tweak some details
-rw-r--r--lib/chef/decorator.rb4
-rw-r--r--lib/chef/decorator/lazy_array.rb2
-rw-r--r--lib/chef/provider/package.rb1
3 files changed, 3 insertions, 4 deletions
diff --git a/lib/chef/decorator.rb b/lib/chef/decorator.rb
index aa1f399d9f..546c49baed 100644
--- a/lib/chef/decorator.rb
+++ b/lib/chef/decorator.rb
@@ -21,9 +21,9 @@ class Chef
class Decorator < SimpleDelegator
NULL = ::Object.new
- def initialize(obj: NULL)
- super(obj) unless obj == NULL
+ def initialize(obj = NULL)
@__defined_methods__ = []
+ super unless obj.equal?(NULL)
end
# if we wrap a nil then decorator.nil? should be true
diff --git a/lib/chef/decorator/lazy_array.rb b/lib/chef/decorator/lazy_array.rb
index 3879aea5f6..5c21d17ce6 100644
--- a/lib/chef/decorator/lazy_array.rb
+++ b/lib/chef/decorator/lazy_array.rb
@@ -15,7 +15,7 @@
# limitations under the License.
#
-require "chef/decorator"
+require "chef/decorator/lazy"
class Chef
class Decorator
diff --git a/lib/chef/provider/package.rb b/lib/chef/provider/package.rb
index ec71832488..fbb89efe04 100644
--- a/lib/chef/provider/package.rb
+++ b/lib/chef/provider/package.rb
@@ -22,7 +22,6 @@ require "chef/mixin/subclass_directive"
require "chef/log"
require "chef/file_cache"
require "chef/platform"
-require "chef/decorator/lazy"
require "chef/decorator/lazy_array"
class Chef