From 86ca5bc5a38c126a5e9262a7b10251fa79f7c118 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Sat, 29 Oct 2022 00:39:39 +0300 Subject: [PATCH] Add missing require for pathname Fixes the following error on Ruby 3 here: ``` .............F.. Failures: 1) Filelock should handle Pathname as well as string path Failure/Error: lockpath = Pathname.new(File.join(dir, 'sample.lock')) NameError: uninitialized constant Pathname # ./spec/filelock_spec.rb:254:in `block (3 levels) in ' # ./spec/filelock_spec.rb:253:in `block (2 levels) in ' Finished in 8.35 seconds (files took 0.05113 seconds to load) 16 examples, 1 failure Failed examples: rspec ./spec/filelock_spec.rb:252 # Filelock should handle Pathname as well as string path ``` --- spec/filelock_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/filelock_spec.rb b/spec/filelock_spec.rb index 6c99328..080d5c8 100644 --- a/spec/filelock_spec.rb +++ b/spec/filelock_spec.rb @@ -1,4 +1,5 @@ require 'filelock' +require 'pathname' require 'tempfile' require 'timeout'