Skip to content

Commit 503fad4

Browse files
committedFeb 7, 2016
Fixed accessing Stat in IO::FileDescriptor.
1 parent 436d859 commit 503fad4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

Diff for: ‎core/io.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ def reopen_path(path, mode)
500500

501501
def reset_positioning(stat=nil)
502502
# Discover final size of file so we can set EOF properly
503-
stat = Stat.fstat(@descriptor) unless stat
503+
stat = File::Stat.fstat(@descriptor) unless stat
504504
@total_size = stat.size
505505

506506
# We may have reopened a file descriptor that went from "file" to a different
@@ -575,7 +575,7 @@ def ttyname
575575
end
576576

577577
def inspect
578-
stat = Stat.fstat(@descriptor)
578+
stat = File::Stat.fstat(@descriptor)
579579
"fd [#{descriptor}], mode [#{@mode}], total_size [#{@total_size}], offset [#{@offset}], eof [#{@eof}], stat.size [#{stat.size}], written? [#{@written}]"
580580
end
581581

0 commit comments

Comments
 (0)
Please sign in to comment.