Closed skalee closed 6 years ago
Hound violations come from the old code.
@skalee this is WIP right? Cause the build is failing...
@ronaldtse Indeed, this pull request isn't merged-in yet because of the CI build failure.
The problem comes from different behaviour of URI(string_to_parse)
in Rubinius. Strings with leading and trailing whitespaces, e.g. invalid = " http://google.com "
, do not fit the URI grammar. Most Ruby interpreters, including MRI, will raise exception when URI(invalid)
is called. However, Rubinius apparently strips these whitespaces and parses the string without error. As a consequence, it is not guaranteed in Rubinius that uri == URI(uri).to_s
, and some insignificant at the first glance change in e6ac34166b319b2a23fd4fb9082541f5e65cf8e2 is making Rubinius giving different results.
I am going to improve this pull request today.
Or maybe I'll split this pull request into few on-topic ones?
Improve the code style of validator in general.