ruby-changes:72017
From: David <ko1@a...>
Date: Mon, 30 May 2022 17:42:57 +0900 (JST)
Subject: [ruby-changes:72017] 0d7d8f3777 (master): [rubygems/rubygems] No need to use `FileUtils` to create symlinks
https://git.ruby-lang.org/ruby.git/commit/?id=0d7d8f3777 From 0d7d8f3777b4521b2e83d81c0f830941bfba7b9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Fri, 27 May 2022 23:09:29 +0200 Subject: [rubygems/rubygems] No need to use `FileUtils` to create symlinks https://github.com/rubygems/rubygems/commit/70ff7cee9f --- spec/bundler/commands/clean_spec.rb | 2 +- spec/bundler/runtime/setup_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/bundler/commands/clean_spec.rb b/spec/bundler/commands/clean_spec.rb index 576872b0f6..db81c10e9d 100644 --- a/spec/bundler/commands/clean_spec.rb +++ b/spec/bundler/commands/clean_spec.rb @@ -208,7 +208,7 @@ RSpec.describe "bundle clean" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/clean_spec.rb#L208 G FileUtils.mkdir_p(bundled_app("real-path")) - FileUtils.ln_sf(bundled_app("real-path"), bundled_app("symlink-path")) + File.symlink(bundled_app("real-path"), bundled_app("symlink-path")) bundle "config set path #{bundled_app("symlink-path")}" bundle "install" diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb index 761377323a..9df7ba87a2 100644 --- a/spec/bundler/runtime/setup_spec.rb +++ b/spec/bundler/runtime/setup_spec.rb @@ -838,13 +838,13 @@ end https://github.com/ruby/ruby/blob/trunk/spec/bundler/runtime/setup_spec.rb#L838 let(:full_name) { "bundler-#{Bundler::VERSION}" } before do - FileUtils.ln_s(gem_home, symlinked_gem_home) + File.symlink(gem_home, symlinked_gem_home) gems_dir = File.join(gem_home, "gems") specifications_dir = File.join(gem_home, "specifications") Dir.mkdir(gems_dir) Dir.mkdir(specifications_dir) - FileUtils.ln_s(source_root, File.join(gems_dir, full_name)) + File.symlink(source_root, File.join(gems_dir, full_name)) gemspec_content = File.binread(gemspec). sub("Bundler::VERSION", %("#{Bundler::VERSION}")). -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/