Skip to content

Commit

Permalink
Use Array#fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
Genki Sugawara committed Mar 31, 2016
1 parent af12190 commit 1ef0ce1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/miam/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def unless_dry_run

def account_id
# https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
@account_id ||= @iam.get_user.user.arn.split(':')[4]
@account_id ||= @iam.get_user.user.arn.split(':').fetch(4)
end

def policy_arn(policy_name)
Expand Down

0 comments on commit 1ef0ce1

Please sign in to comment.