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

* lib/ftools.rb (catname): allow trailing '/' for the destination.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2001-10-02 10:36:34 +00:00
parent 75eee0bafd
commit d902111a57
2 changed files with 5 additions and 6 deletions

View file

@ -1,3 +1,7 @@
Tue Oct 2 19:12:47 2001 WATANABE Hirofumi <eban@ruby-lang.org>
* lib/ftools.rb (catname): allow trailing '/' for the destination.
Tue Oct 2 08:04:52 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
* marshal.c (r_object): TYPE_UCLASS check should be inversed.

View file

@ -4,12 +4,7 @@ class << File
def catname from, to
if FileTest.directory? to
to +
if to =~ /\\/
if to[-1,1] != '\\' then '\\' end + basename(from)
else
if to[-1,1] != '/' then '/' end + basename(from)
end
File.join to.sub(%r([/\\]$), ''), basename(from)
else
to
end