allow triggering filter block when eof for initial state of input stream

Addresses #7, but not sure it is the right solution.

Note that this does break backwards compatibility somewhat if users assume that the block only gets called with data (i.e. see the change of line 418 of filter_io_spec.rb)


Actually, with the loop changed, this change is no longer necessary, so
reverted it.  Thus the new loop preserves the original behavior, and data
is never empty for this test.



On Tue, Dec 2, 2014 at 5:36 PM, Jason Weathered <notifications@github.com>
wrote:

> In spec/filter_io_spec.rb:
>
> > @@ -415,7 +415,8 @@ def with_iso8859_1_test_file(internal_encoding)
> >        (1..5).each do |read_size|
> >          expected = StringIO.new(expected_str)
> >          actual = FilterIO.new(StringIO.new(input_str), :block_size => block_size) do |data|
> > -          "[#{data}]"
> > +          data = "[#{data}]" if data && data.size > 0
>
> I think the expectation should change to show that the the block is first
> called with an empty string.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/jasoncodes/filter_io/pull/8/files#r21198152>.
>