mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* file.c (rb_file_s_stat, rb_file_s_lstat): Remove repeated type
checks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5cb55eca6f
commit
fe3de995b6
2 changed files with 6 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Mon Mar 23 18:54:57 2009 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
|
* file.c (rb_file_s_stat, rb_file_s_lstat): Remove repeated type
|
||||||
|
checks.
|
||||||
|
|
||||||
Mon Mar 23 14:57:48 2009 Narihiro Nakamura <authorNari@gmail.com>
|
Mon Mar 23 14:57:48 2009 Narihiro Nakamura <authorNari@gmail.com>
|
||||||
|
|
||||||
* gc.c (init_heap): set default to heap slots length
|
* gc.c (init_heap): set default to heap slots length
|
||||||
|
|
3
file.c
3
file.c
|
@ -777,7 +777,6 @@ rb_file_s_stat(VALUE klass, VALUE fname)
|
||||||
rb_secure(4);
|
rb_secure(4);
|
||||||
FilePathValue(fname);
|
FilePathValue(fname);
|
||||||
if (rb_stat(fname, &st) < 0) {
|
if (rb_stat(fname, &st) < 0) {
|
||||||
FilePathValue(fname);
|
|
||||||
rb_sys_fail(RSTRING_PTR(fname));
|
rb_sys_fail(RSTRING_PTR(fname));
|
||||||
}
|
}
|
||||||
return stat_new(&st);
|
return stat_new(&st);
|
||||||
|
@ -834,7 +833,7 @@ rb_file_s_lstat(VALUE klass, VALUE fname)
|
||||||
|
|
||||||
rb_secure(2);
|
rb_secure(2);
|
||||||
FilePathValue(fname);
|
FilePathValue(fname);
|
||||||
if (lstat(StringValueCStr(fname), &st) == -1) {
|
if (lstat(fname, &st) == -1) {
|
||||||
rb_sys_fail(RSTRING_PTR(fname));
|
rb_sys_fail(RSTRING_PTR(fname));
|
||||||
}
|
}
|
||||||
return stat_new(&st);
|
return stat_new(&st);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue