summaryrefslogtreecommitdiff
path: root/lib/chef/role.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/role.rb')
-rw-r--r--lib/chef/role.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/chef/role.rb b/lib/chef/role.rb
index 73d5cf5743..fc9a383a1f 100644
--- a/lib/chef/role.rb
+++ b/lib/chef/role.rb
@@ -130,7 +130,7 @@ class Chef
)
end
- def to_hash
+ def to_h
env_run_lists_without_default = @env_run_lists.dup
env_run_lists_without_default.delete("_default")
result = {
@@ -152,9 +152,11 @@ class Chef
result
end
+ alias_method :to_hash, :to_h
+
# Serialize this object as a hash
def to_json(*a)
- Chef::JSONCompat.to_json(to_hash, *a)
+ Chef::JSONCompat.to_json(to_h, *a)
end
def update_from!(o)