You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2020/07/06 20:05:06 UTC

[whimsy] branch master updated: URI::File is not in 2.3.1

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 16d43c6  URI::File is not in 2.3.1
16d43c6 is described below

commit 16d43c62993c3c5d74bf05b99a7077730ab1f0fc
Author: Sebb <se...@apache.org>
AuthorDate: Mon Jul 6 21:04:56 2020 +0100

    URI::File is not in 2.3.1
---
 lib/whimsy/asf/svn.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index 982bdd0..0bc0f8c 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -749,7 +749,8 @@ module ASF
       else
         uri = URI.parse(path)
         # allow file: URIs for local testing
-        if uri.is_a? URI::File or uri.is_a? URI::HTTPS # includes HTTPS
+        isFile = (uri.is_a? URI::File rescue false) # URI::File is not in 2.3.1
+        if isFile or uri.is_a? URI::HTTPS # includes HTTPS
           basename = File.basename(uri.path).untaint
           parentdir = File.dirname(uri.path).untaint
           uri.path = parentdir