mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
simplify filename-related code
(Thanks to Nobuyoshi Nakada for the hint!) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b991ccc210
commit
d9699fadf8
1 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@ class Downloader
|
|||
index_file = super(UNICODE_PUBLIC+name_dir_part, "#{name_dir_part}index.html", dir, true, index_options)
|
||||
INDEX[:index] = IO.read index_file
|
||||
end
|
||||
file_base = name.sub(/^.*\//, '').sub(/\.txt$/, '')
|
||||
file_base = File.basename(name, '.txt')
|
||||
beta_name = INDEX[:index].match(/#{file_base}(-[0-9.]+d\d+)?\.txt/)[0]
|
||||
# make sure we always check for new versions of files,
|
||||
# because they can easily change in the beta period
|
||||
|
|
Loading…
Reference in a new issue