Skip to content

Commit

Permalink
Fix Pathname compatibility.
Browse files Browse the repository at this point in the history
Until PR livinginthepast#42 was merged, String, as well as Pathname objects, were
supported just fine. Now, just String is supported, because Pathname
object does not support #start_with? method.

Therefore, this just naively converts everything to String to fix
Pathname support.
  • Loading branch information
voxik committed Feb 26, 2019
1 parent 367fa4a commit 29bd9d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fake_ftp/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def absolute=(value)
private :options

def abspath(filename)
return filename if filename.start_with?('/')
return filename if filename.to_s.start_with?('/')
[@workdir.to_s, filename].join('/').gsub('//', '/')
end

Expand Down

0 comments on commit 29bd9d9

Please sign in to comment.