Hashr.new should raise ArgumentError on bad input #2

Closed
drbrain opened this Issue Feb 21, 2012 · 1 comment

Comments

Projects
None yet
2 participants

drbrain commented Feb 21, 2012

$ ruby -Ilib -rhashr -ryaml -e 'p Hashr.new YAML.load "travis"'
./lib/hashr.rb:41:in `initialize': undefined method `deep_symbolize_keys' for "travis":String (NoMethodError)
    from -e:1:in `new'
    from -e:1

While passing in a String is obviously garbage input, when loading from YAML (say, via travis-lint) if the YAML file contains parseable garbage a meaningful error should be raised by Hashr like ArgumentError.

Owner

svenfuchs commented Feb 21, 2012

+1

:)

Thanks for reporting, Eric!

svenfuchs closed this in #10 Aug 31, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment