diff options
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | file.c | 3 |
2 files changed, 6 insertions, 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> * gc.c (init_heap): set default to heap slots length @@ -777,7 +777,6 @@ rb_file_s_stat(VALUE klass, VALUE fname) rb_secure(4); FilePathValue(fname); if (rb_stat(fname, &st) < 0) { - FilePathValue(fname); rb_sys_fail(RSTRING_PTR(fname)); } return stat_new(&st); @@ -834,7 +833,7 @@ rb_file_s_lstat(VALUE klass, VALUE fname) rb_secure(2); FilePathValue(fname); - if (lstat(StringValueCStr(fname), &st) == -1) { + if (lstat(fname, &st) == -1) { rb_sys_fail(RSTRING_PTR(fname)); } return stat_new(&st); |
