Skip to content


Fixed accessing Stat in IO::FileDescriptor.
Browse files Browse the repository at this point in the history
  • Loading branch information
brixen committed Feb 7, 2016
1 parent 436d859 commit 503fad4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/io.rb
Expand Up @@ -500,7 +500,7 @@ def reopen_path(path, mode)

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

# We may have reopened a file descriptor that went from "file" to a different
Expand Down Expand Up @@ -575,7 +575,7 @@ def ttyname

def inspect
stat = Stat.fstat(@descriptor)
stat = File::Stat.fstat(@descriptor)
"fd [#{descriptor}], mode [#{@mode}], total_size [#{@total_size}], offset [#{@offset}], eof [#{@eof}], stat.size [#{stat.size}], written? [#{@written}]"

Expand Down

0 comments on commit 503fad4

Please sign in to comment.