jasoncodes/filter_io — pull request #1 by chewi (2013-06-25 21:39:26+00:00)
Title: Only instantiate a BlockState when necessary, fixes $stdin

When trying to use FilterIO with $stdin, an "invalid seek" error is raised because you cannot call #pos on $stdin. It is only necessary to call #pos when instantiating a BlockState and it is only necessary to do that when the given block has two arguments.

The tests still pass. I would have added a new one but this would have required a mocking framework. As things stand, the project need to be fixed so that the tests will run under newer versions of ruby/gems/rake. I therefore left this can of worms alone.