Skip to content

Commit

Permalink
Use the short version of links to Stack Overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rdavid committed Nov 26, 2023
1 parent b0d24c2 commit 2908ebb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/transcode/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def humanize(sec)

# Adds natural sort method. This converts something like "Filename 10" into a
# simple array with floats in place of numbers [ "Filename", 10.0 ]. See:
# https://stackoverflow.com/questions/4078906/is-there-a-natural-sort-by-method-for-ruby
# https://stackoverflow.com/q/4078906
class String
def naturalized
scan(/[^\d\.]+|[\d\.]+/).collect { |f| f.match(/\d+(\.\d+)?/) ? f.to_f : f }
Expand Down

0 comments on commit 2908ebb

Please sign in to comment.