Skip to content

Commit

Permalink
move initialization of lineno to more central location
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckremes committed Jul 20, 2016
1 parent 2026c0a commit b39b6dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/io.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1692,6 +1692,7 @@ def self.setup(io, fd, mode=nil, sync=false)

io.mode = mode || cur_mode
io.sync = !!sync
io.lineno = 0 if io.lineno.nil?

# FIXME - re-enable this somehow. Right now this breaks kernel/delta/io.rb when it
# redefines STDIN/STDOUT/STDERR from the IO.open call. The new IO code has already
Expand Down Expand Up @@ -1720,7 +1721,6 @@ def initialize(fd, mode=undefined, options=undefined)
fd = Rubinius::Type.coerce_to fd, Integer, :to_int
autoclose = @autoclose
IO.setup self, fd, mode
@lineno = 0

binmode if binary
set_encoding external, internal
Expand Down

0 comments on commit b39b6dd

Please sign in to comment.