1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

fix r62970 as r62990

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@63007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2018-03-28 12:54:26 +00:00
parent 84afd795b8
commit 6cb2d4b970

View file

@ -114,9 +114,9 @@ class Dir
end
n = nil
prefix, suffix = basename
prefix = prefix.delete("#{File::SEPARATOR}#{File::ALT_SEPARATOR}")
prefix = (String.try_convert(prefix) or
raise ArgumentError, "unexpected prefix: #{prefix.inspect}")
prefix = prefix.delete("#{File::SEPARATOR}#{File::ALT_SEPARATOR}")
suffix &&= (String.try_convert(suffix) or
raise ArgumentError, "unexpected suffix: #{suffix.inspect}")
suffix &&= suffix.delete("#{File::SEPARATOR}#{File::ALT_SEPARATOR}")