diff options
author | Alexander Pakulov <[email protected]> | 2019-09-02 11:36:08 -0700 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2019-09-05 18:44:02 +0900 |
commit | 0b9b0774c3dc0c4113335a57717bbc9d3d9595e8 (patch) | |
tree | eb23db110912e70c74a496e39ec2d35171798630 | |
parent | 565828a778ab57affad9216721659a489176bf2d (diff) |
[rubygems/rubygems] Minor fix
https://github.com/rubygems/rubygems/commit/95c1f4e179
-rw-r--r-- | lib/rubygems/s3_uri_signer.rb | 2 |
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 |