lib/miq_automation_engine/service_models/miq_ae_service_user.rb
Use caller(1..1).first
instead of caller[0]
. Open
Open
$miq_ae_logger.warn("[DEPRECATION] #{self.class.name}#miq_group accessor is deprecated. Please use current_group instead. At #{caller[0]}")
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop identifies places where caller[n]
can be replaced by caller(n..n).first
.
Example:
# bad
caller[1]
caller.first
caller_locations[1]
caller_locations.first
# good
caller(2..2).first
caller(1..1).first
caller_locations(2..2).first
caller_locations(1..1).first