Skip to content

Commit cbc8f2e

Browse files
committed
Performance/BindCall
This commit replaces an instance of bind(obj).call(args) with the more performance bind_call(obj, args) method introduced in Ruby 2.7. This was identified by the Rubocop Performance/BindCall cop.
1 parent 9d1fd52 commit cbc8f2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet/util/command_line/trollop.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def initialize *a, &b
102102
@stop_on_unknown = false
103103

104104
# instance_eval(&b) if b # can't take arguments
105-
cloaker(&b).bind(self).call(*a) if b
105+
cloaker(&b).bind_call(self, *a) if b
106106
end
107107

108108
## Define an option. +name+ is the option name, a unique identifier

0 commit comments

Comments
 (0)