markbates / configatron

A super cool, simple, and feature rich configuration system for Ruby apps.

Home Page:http://www.metabates.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nil values?

BrentWheeldon opened this issue · comments

Hi there,

Is this code doing what we expect? Is there another way to check if a config value is nil?

[6] pry(main)> configatron.foo = nil
=> nil
[7] pry(main)> configatron.foo
=> #<Configatron::Store:0x3fd12f4411b0>
[8] pry(main)> configatron.foo.nil?
=> false
[9] pry(main)> configatron.foo.inspect
=> ""

Using version 4.2.1, with ruby 2.1.3.

Thanks!

Huh, yeah that's confusing behavior. It'd be a breaking change, but I think worth fixing. Queued up a patch as dda5686.

Thanks, @gdb!