diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-05-13 09:53:03 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-05-13 02:21:33 +0000 |
commit | 5f411b9b3e45a40df788f85156d4337206686deb (patch) | |
tree | 05b9fc847678974ecc7fed20e6230177fdc38d17 /lib/bundler/vendor/thor/lib/thor/actions.rb | |
parent | 30326844c7e0957bf85ac1befd3755cff2848e9f (diff) | |
download | ruby-5f411b9b3e45a40df788f85156d4337206686deb.tar.gz |
[rubygems/rubygems] Bump up thor-1.2.2
https://github.com/rubygems/rubygems/commit/d9a003b4e7
Diffstat (limited to 'lib/bundler/vendor/thor/lib/thor/actions.rb')
-rw-r--r-- | lib/bundler/vendor/thor/lib/thor/actions.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/bundler/vendor/thor/lib/thor/actions.rb b/lib/bundler/vendor/thor/lib/thor/actions.rb index de9b3b4c86..a7afaf1d07 100644 --- a/lib/bundler/vendor/thor/lib/thor/actions.rb +++ b/lib/bundler/vendor/thor/lib/thor/actions.rb @@ -175,7 +175,7 @@ class Bundler::Thor shell.padding += 1 if verbose @destination_stack.push File.expand_path(dir, destination_root) - # If the directory doesnt exist and we're not pretending + # If the directory doesn't exist and we're not pretending if !File.exist?(destination_root) && !pretend require "fileutils" FileUtils.mkdir_p(destination_root) @@ -223,9 +223,10 @@ class Bundler::Thor contents = if is_uri require "open-uri" - URI.open(path, "Accept" => "application/x-thor-template", &:read) + # for ruby 2.1-2.4 + URI.send(:open, path, "Accept" => "application/x-thor-template", &:read) else - open(path, &:read) + File.open(path, &:read) end instance_eval(contents, path) |