lib/lineinput.rb in review-2.0.0 vs lib/lineinput.rb in review-2.1.0
- old
+ new
@@ -32,11 +32,11 @@
def gets
unless @buf.empty?
@lineno += 1
return @buf.pop
end
- return nil if @eof_p # to avoid ARGF blocking.
+ return nil if @eof_p # to avoid ARGF blocking.
line = @input.gets
@eof_p = true unless line
@lineno += 1
line
end
@@ -111,11 +111,11 @@
buf.push line
end
buf
end
- alias_method :span, :getlines_while # from Haskell
+ alias_method :span, :getlines_while # from Haskell
def until_match(re)
while line = gets()
if re =~ line
ungets line
@@ -132,14 +132,14 @@
buf.push line
end
buf
end
- alias_method :break, :getlines_until # from Haskell
+ alias_method :break, :getlines_until # from Haskell
def until_terminator(re)
while line = gets()
- return if re =~ line # discard terminal line
+ return if re =~ line # discard terminal line
yield line
end
nil
end