Set sudo: false to allow usage of their new container-based infrastructure.
The only constants that the Inspector should be looking at are of type Module or Class. Both of these built-in types respond to #name, but some gems (such as LibXML) create Modules in such a way that they implement #to_s with one (required) argument, whereas here we only call it with 0 arguments. In most cases #to_s will be an alias for #name, and #name is really what we want anyway. Aside from that, many core classes and core functionality of Ruby will break if a gem maintainer chooses not to implement #name, whereas not implementing the zero-argument #to_s message appears to have no ill effects outside of causing ruby-lint to raise an exception when generating definitions for these gems. Fixes [#133](#133).
The FileScanner class wasn't properly scanning for files located in a directory that used dashes instead of underscores. This in turn would prevent ruby-lint from analysing itself due to the usage of lib/ruby-lint (instead of lib/ruby_lint). With this commit I've also taken the liberty of cleaning up the tests for FileScanner. These tests now test more specific parts instead of only testing the scan method.
This analysis class checks if certain keywords are used inside blocks/loops or not. If this is not the case an error is added. Ruby reports this kind of usage as a syntax error. Parser doesn't handle this and rightfully so. This requires keeping track of two things: 1. Are we in a block? 2. Are we in a loop that allows next/break? While the code for this is not too difficult I don't feel this should be handled on parser level, thus I've added it to a new analysis class. This fixes #126.