Just updated to the latest release (1.0.6), and noticed that when validating 'nil' it now errors with NoMethodError: undefined method gsub for nil:NilClass, rather than gracefully failing validation.
Running the tests for the gem seem to confirm this, so I guess this bug just got missed during the release process?
Finished in 0.28199 seconds (files took 1.13 seconds to load)
37 examples, 1 failure
Failed examples:
rspec ./spec/validate_url_spec.rb:24 # URL validation with regular validator does not allow nil as url
It looks like like this recent patch from @coneybeare is where things stopped working.
When URI.escape is passed the nil value you get the gdub error.
I'm going to wrap up a PR to fix this, I'll send it accross shortly.
Hey Folks,
Just updated to the latest release (1.0.6), and noticed that when validating 'nil' it now errors with
NoMethodError: undefined method gsub for nil:NilClass
, rather than gracefully failing validation.Running the tests for the gem seem to confirm this, so I guess this bug just got missed during the release process?
It looks like like this recent patch from @coneybeare is where things stopped working.
When
URI.escape
is passed the nil value you get the gdub error.I'm going to wrap up a PR to fix this, I'll send it accross shortly.
Robert