Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't set $. global variable in IO::EachReader methods. Partial treat…

…ment for #1481.
  • Loading branch information...
commit 0980d6384f93faa244d00f4da3a1a891e2a960f9 1 parent b9786b4
@jmstacey authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 kernel/common/io19.rb
View
14 kernel/common/io19.rb
@@ -349,7 +349,7 @@ def read_to_separator
str << @buffer.shift(count)
str.taint
- $. = @io.increment_lineno
+ @io.increment_lineno
@buffer.discard @skip if @skip
yield str
@@ -363,7 +363,7 @@ def read_to_separator
str << @buffer.shift
unless str.empty?
str.taint
- $. = @io.increment_lineno
+ @io.increment_lineno
yield str
end
end
@@ -384,7 +384,7 @@ def read_to_separator_with_limit
str << @buffer.shift(bytes)
str.taint
- $. = @io.increment_lineno
+ @io.increment_lineno
@buffer.discard @skip if @skip
yield str
@@ -396,7 +396,7 @@ def read_to_separator_with_limit
str << @buffer.shift(wanted)
str.taint
- $. = @io.increment_lineno
+ @io.increment_lineno
@buffer.discard @skip if @skip
yield str
@@ -413,7 +413,7 @@ def read_to_separator_with_limit
str << @buffer.shift
unless str.empty?
str.taint
- $. = @io.increment_lineno
+ @io.increment_lineno
yield str
end
end
@@ -428,7 +428,7 @@ def read_all
unless str.empty?
str.taint
- $. = @io.increment_lineno
+ @io.increment_lineno
yield str
end
end
@@ -444,7 +444,7 @@ def read_to_limit
str << @buffer.shift(wanted)
str.taint
- $. = @io.increment_lineno
+ @io.increment_lineno
yield str
str = ""
Please sign in to comment.
Something went wrong with that request. Please try again.