You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
1.1 KiB
23 lines
1.1 KiB
From 01f20c753e89f75e0031d0853866aaaa68ee1cc7 Mon Sep 17 00:00:00 2001
|
|
From: utilum <oz@utilum.com>
|
|
Date: Fri, 30 Mar 2018 23:53:23 +0200
|
|
Subject: [PATCH] Fix: FileStoreTest#test_filename_max_size fails in Ruby 2.5.1
|
|
|
|
---
|
|
activesupport/test/cache/stores/file_store_test.rb | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/activesupport/test/cache/stores/file_store_test.rb b/activesupport/test/cache/stores/file_store_test.rb
|
|
index c3c35a7bccfe..9aee8239799e 100644
|
|
--- a/activesupport/test/cache/stores/file_store_test.rb
|
|
+++ b/activesupport/test/cache/stores/file_store_test.rb
|
|
@@ -69,7 +69,7 @@ def test_filename_max_size
|
|
key = "#{'A' * ActiveSupport::Cache::FileStore::FILENAME_MAX_SIZE}"
|
|
path = @cache.send(:normalize_key, key, {})
|
|
Dir::Tmpname.create(path) do |tmpname, n, opts|
|
|
- assert File.basename(tmpname + ".lock").length <= 255, "Temp filename too long: #{File.basename(tmpname + '.lock').length}"
|
|
+ assert File.basename(key + tmpname.split(key).last + ".lock").length <= 255, "Temp filename too long: #{File.basename(tmpname + '.lock').length}"
|
|
end
|
|
end
|
|
|