Skip to content

Commit

Permalink
* file.c (rb_file_s_stat, rb_file_s_lstat): Remove repeated type
Browse files Browse the repository at this point in the history
  checks.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
knu committed Mar 23, 2009
1 parent 5cb55ec commit fe3de99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Mon Mar 23 18:54:57 2009 Akinori MUSHA <[email protected]>

* file.c (rb_file_s_stat, rb_file_s_lstat): Remove repeated type
checks.

Mon Mar 23 14:57:48 2009 Narihiro Nakamura <[email protected]>

* gc.c (init_heap): set default to heap slots length
Expand Down
3 changes: 1 addition & 2 deletions file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit fe3de99

Please sign in to comment.