Skip to content

Commit

Permalink
Merge pull request #267 from ifad/bugfix/266-comparison-with-false
Browse files Browse the repository at this point in the history
Fix version filtering and deprecation warning
  • Loading branch information
tagliala authored Sep 13, 2024
2 parents 79d68a8 + 95160cc commit dc8edb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def title=(new_title)
# Returns an array of the document version identifiers.
def versions
versions = Dir.glob(directory + 'v*')
versions.reject { |v| !v =~ /^v\d+$/ }.map { |v| File.basename v }.sort
versions.map { |v| File.basename(v) }.grep(/\Av\d+\z/).sort
end

# Returns true if the document has the specified version.
Expand Down

0 comments on commit dc8edb9

Please sign in to comment.