Projects
openEuler:24.03:SP1:Everything
rubygem-activerecord
_service:tar_scm:rubygem-activerecord-7.0.4-rem...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:rubygem-activerecord-7.0.4-remove-require-pathname-from-drop-method.patch of Package rubygem-activerecord
From e708599c85226e9ad107ebdad09a9e31f1b5388a Mon Sep 17 00:00:00 2001 From: Nicolas Iragorri Dominguez <nicolasiragorridominguez@Nicolass-Mac-Studio.local> Date: Tue, 27 Dec 2022 01:24:19 +0100 Subject: [PATCH] [issue-46741] remove `require pathname` from `drop` method --- .../tasks/sqlite_database_tasks.rb | 6 +-- diff --git a/activerecord/lib/active_record/tasks/sqlite_database_tasks.rb b/activerecord/lib/active_record/tasks/sqlite_database_tasks.rb index d920d874ef308..fdfa299fa0e8c 100644 --- a/activerecord/lib/active_record/tasks/sqlite_database_tasks.rb +++ b/activerecord/lib/active_record/tasks/sqlite_database_tasks.rb @@ -22,10 +22,8 @@ def create end def drop - require "pathname" - path = Pathname.new(db_config.database) - file = path.absolute? ? path.to_s : File.join(root, path) - + db_path = db_config.database + file = File.absolute_path?(db_path) ? db_path : File.join(root, db_path) FileUtils.rm(file) rescue Errno::ENOENT => error raise NoDatabaseError.new(error.message)
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2