Skip to content
Browse files

Whoops, part 2 of fixing false/default interactions.

  • Loading branch information...
1 parent fadbded commit bf6b19979cb83d8238c89ecb15a291ceaa06b79f Kyle Kingsbury committed Oct 3, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/risky.rb
View
4 lib/risky.rb
@@ -335,7 +335,9 @@ def initialize(key = nil, values = {})
# Fill in defults.
self.class.values.each do |k,v|
- self[k] ||= (v[:default].clone rescue v[:default])
+ if self[k].nil?
+ self[k] = (v[:default].clone rescue v[:default])
+ end
end
end

0 comments on commit bf6b199

Please sign in to comment.
Something went wrong with that request. Please try again.