blahed/chainsaw — pull request #7 by kyanny (2012-10-25 15:23:33+00:00)
Title: Avoid invalid byte sequence error

`String#match` raises `invalid byte sequence in UTF-8 (ArgumentError)` when it faces a string including invalid byte sequence.

Log lines might include invalid UTF-8 bytes.
For example POST request including non UTF-8 bytes parameter against Rails application.
See line 3 of the `test/logs/rails_invalid_byte_sequence.log` file.

So I added a workaround to avoid `invalid byte sequence in UTF-8 (ArgumentError)` error.

In fact, tests at e2c77805ede509d4d680a9ffe393fa95f9dfbf6b and 08a900902401012f16aa33dfa227baaa4e146f6f are nonsense because these tests will die when `ArgumentError` occurred.
I want to write these tests using `assert_nothing_raised`, but minitest doesn't include these functionality, so I choose another way.