summaryrefslogtreecommitdiff
path: root/lib/rubygems
diff options
context:
space:
mode:
authorAlexander Pakulov <apakulov@stripe.com>2019-09-02 11:36:08 -0700
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-09-05 18:44:02 +0900
commit0b9b0774c3dc0c4113335a57717bbc9d3d9595e8 (patch)
treeeb23db110912e70c74a496e39ec2d35171798630 /lib/rubygems
parent565828a778ab57affad9216721659a489176bf2d (diff)
[rubygems/rubygems] Minor fix
https://github.com/rubygems/rubygems/commit/95c1f4e179
Diffstat (limited to 'lib/rubygems')
-rw-r--r--lib/rubygems/s3_uri_signer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems/s3_uri_signer.rb b/lib/rubygems/s3_uri_signer.rb
index ff9dde30ed..534b8676a0 100644
--- a/lib/rubygems/s3_uri_signer.rb
+++ b/lib/rubygems/s3_uri_signer.rb
@@ -152,7 +152,7 @@ class Gem::S3URISigner
iam_info = ec2_metadata_request(EC2_IAM_INFO)
# Expected format: arn:aws:iam::<id>:instance-profile/<role_name>
- role_name = iam_info['InstanceProfileArn'].split('/')[1]
+ role_name = iam_info['InstanceProfileArn'].split('/').last
ec2_metadata_request(EC2_IAM_SECURITY_CREDENTIALS + role_name)
end