diff options
Diffstat (limited to 'lib/extracts_path.rb')
-rw-r--r-- | lib/extracts_path.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/extracts_path.rb b/lib/extracts_path.rb index 8f6576c2206..db5c3bb1d4a 100644 --- a/lib/extracts_path.rb +++ b/lib/extracts_path.rb @@ -16,6 +16,8 @@ module ExtractsPath id_without_atom = id.sub(/\.atom$/, '') valid_refs = ref_names.select { |v| "#{id_without_atom}/".start_with?("#{v}/") } + raise InvalidPathError if valid_refs.blank? + valid_refs.max_by(&:length) end |