* file.c (rb_stat_s_utime): fixed a commit miss for the platforms

where utimes() does not exist.

* lib/fileutils.rb (touch): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2007-03-04 14:38:02 +00:00
Родитель 35fadee53d
Коммит 9b7ecc68a9
4 изменённых файлов: 19 добавлений и 9 удалений

Просмотреть файл

@ -1,3 +1,10 @@
Sun Mar 4 23:38:07 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_stat_s_utime): fixed a commit miss for the platforms
where utimes() does not exist.
* lib/fileutils.rb (touch): ditto.
Sun Mar 4 14:46:56 2007 WATANABE Hirofumi <eban@ruby-lang.org>
* util.c (push_element): should return a int value.

9
file.c
Просмотреть файл

@ -2031,12 +2031,15 @@ rb_file_s_utime(int argc, VALUE *argv)
rb_scan_args(argc, argv, "2*", &atime, &mtime, &rest);
if (!NIL_P(atime) || !NIL_P(mtime)) {
utp = &utbuf;
tv = rb_time_timeval(atime);
utbuf.actime = tv.tv_sec;
utp->actime = tv.tv_sec;
tv = rb_time_timeval(mtime);
utbuf.modtime = tv.tv_sec;
utp->modtime = tv.tv_sec;
}
n = apply2files(utime_internal, rest, &utbuf);
n = apply2files(utime_internal, rest, utp);
return LONG2FIX(n);
}

Просмотреть файл

@ -1012,7 +1012,7 @@ module FileUtils
fu_check_options options, OPT_TABLE['touch']
list = fu_list(list)
created = nocreate = options[:nocreate]
t = options[:mtime] || Time.now
t = options[:mtime]
if options[:verbose]
fu_output_message "touch #{nocreate ? ' -c' : ''}#{t ? t.strftime(' -t %Y%m%d%H%M.%S') : ''}#{list.join ' '}"
end

Просмотреть файл

@ -1,7 +1,7 @@
#define RUBY_VERSION "1.9.0"
#define RUBY_RELEASE_DATE "2007-03-03"
#define RUBY_RELEASE_DATE "2007-03-04"
#define RUBY_VERSION_CODE 190
#define RUBY_RELEASE_CODE 20070303
#define RUBY_RELEASE_CODE 20070304
#define RUBY_PATCHLEVEL 0
#define RUBY_VERSION_MAJOR 1
@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 3
#define RUBY_RELEASE_DAY 3
#define RUBY_RELEASE_DAY 4
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];