nullobject 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/lib/nullobject.rb CHANGED
@@ -7,6 +7,7 @@ module Null
7
7
  end
8
8
 
9
9
  def to_a; []; end
10
+ def to_ary; []; end
10
11
  def to_s; ""; end
11
12
  def to_f; 0.0; end
12
13
  def to_i; 0; end
@@ -1,3 +1,3 @@
1
1
  module Nullobject
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -15,6 +15,10 @@ describe "Null::Object" do
15
15
  @it.to_a.must_equal []
16
16
  end
17
17
 
18
+ it "#to_ary return empty array" do
19
+ @it.to_ary.must_equal []
20
+ end
21
+
18
22
  it "#to_f return 0.0" do
19
23
  @it.to_f.must_equal 0.0
20
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nullobject
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-20 00:00:00.000000000 Z
12
+ date: 2012-11-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -91,7 +91,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  segments:
93
93
  - 0
94
- hash: -2796458509654921624
94
+ hash: 4565374374475709443
95
95
  required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  segments:
102
102
  - 0
103
- hash: -2796458509654921624
103
+ hash: 4565374374475709443
104
104
  requirements: []
105
105
  rubyforge_project:
106
106
  rubygems_version: 1.8.24