conf 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/conf.gemspec +1 -1
  3. data/lib/conf.rb +3 -1
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.7
1
+ 0.0.8
data/conf.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{conf}
8
- s.version = "0.0.7"
8
+ s.version = "0.0.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jari Bakken"]
data/lib/conf.rb CHANGED
@@ -8,11 +8,13 @@ class Conf
8
8
 
9
9
  module ConfigValue
10
10
  def self.create(root, key, obj = Object.new)
11
+ return obj if obj == true || obj == false
12
+
11
13
  begin
12
14
  obj.extend(self)
13
15
  obj.__setup__(root, key)
14
16
  rescue TypeError
15
- # can't extend numbers, false, nil etc.
17
+ # can't extend obj
16
18
  end
17
19
 
18
20
  obj
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 7
9
- version: 0.0.7
8
+ - 8
9
+ version: 0.0.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jari Bakken