ruby-changes:11422
From: knu <ko1@a...>
Date: Mon, 23 Mar 2009 19:01:10 +0900 (JST)
Subject: [ruby-changes:11422] Ruby:r23046 (trunk): * file.c (rb_file_s_stat, rb_file_s_lstat): Remove repeated type
knu 2009-03-23 19:00:57 +0900 (Mon, 23 Mar 2009) New Revision: 23046 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23046 Log: * file.c (rb_file_s_stat, rb_file_s_lstat): Remove repeated type checks. Modified files: trunk/ChangeLog trunk/file.c Index: ChangeLog =================================================================== --- ChangeLog (revision 23045) +++ ChangeLog (revision 23046) @@ -1,3 +1,8 @@ +Mon Mar 23 18:54:57 2009 Akinori MUSHA <knu@i...> + + * file.c (rb_file_s_stat, rb_file_s_lstat): Remove repeated type + checks. + Mon Mar 23 14:57:48 2009 Narihiro Nakamura <authorNari@g...> * gc.c (init_heap): set default to heap slots length Index: file.c =================================================================== --- file.c (revision 23045) +++ file.c (revision 23046) @@ -777,7 +777,6 @@ 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_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); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/