diff options
author | Xabier de Zuazo <xabier@onddo.com> | 2014-11-27 21:47:05 +0100 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-01-27 11:59:40 -0800 |
commit | 9e6a0cdda93de380093c4abdfeb563d6f946223b (patch) | |
tree | 95ab3075ecd9e74ebae31e06eb877b6fbc5facbc /lib/chef | |
parent | bf58389b53ac27cc2491b8f3d4c3a81ed6fc051e (diff) | |
download | chef-9e6a0cdda93de380093c4abdfeb563d6f946223b.tar.gz |
Mixin::Securable: remove ruby 1.8 specific code (issue #2497)
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/mixin/securable.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/chef/mixin/securable.rb b/lib/chef/mixin/securable.rb index f77703f21a..683012cde8 100644 --- a/lib/chef/mixin/securable.rb +++ b/lib/chef/mixin/securable.rb @@ -112,11 +112,8 @@ class Chef # equivalent to something like: # def rights(permissions=nil, principals=nil, args_hash=nil) define_method(name) do |*args| - # Ruby 1.8 compat: default the arguments - permissions = args.length >= 1 ? args[0] : nil - principals = args.length >= 2 ? args[1] : nil - args_hash = args.length >= 3 ? args[2] : nil raise ArgumentError.new("wrong number of arguments (#{args.length} for 3)") if args.length >= 4 + permissions, principals, args_hash = args rights = self.instance_variable_get("@#{name.to_s}".to_sym) unless permissions.nil? |