option 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data.tar.gz.sig CHANGED
Binary file
data/.travis.yml CHANGED
@@ -6,6 +6,5 @@ rvm:
6
6
  - jruby-19mode
7
7
  - rbx-18mode
8
8
  - rbx-19mode
9
- - ruby-head
10
9
  - 1.8.7
11
10
  - ree
data/README.md CHANGED
@@ -70,7 +70,7 @@ end
70
70
  [![Travis CI](https://secure.travis-ci.org/rares/option.png)](http://travis-ci.org/rares/option)
71
71
 
72
72
  ## Code Climate
73
- [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/rares/option)
73
+ [![Code Climate](https://codeclimate.com/github/rares/option.png)](https://codeclimate.com/github/rares/option)
74
74
 
75
75
  ## Contributing
76
76
 
data/lib/option.rb CHANGED
@@ -10,6 +10,7 @@ class OptionClass
10
10
  end
11
11
  end
12
12
 
13
+
13
14
  private
14
15
 
15
16
  def assert_option(result)
@@ -99,6 +100,14 @@ end
99
100
 
100
101
  class NoneClass < OptionClass
101
102
 
103
+ def dup
104
+ raise TypeError, "can't dup NoneClass"
105
+ end
106
+
107
+ def clone
108
+ raise TypeError, "can't clone NoneClass"
109
+ end
110
+
102
111
  def to_a
103
112
  []
104
113
  end
@@ -1,3 +1,3 @@
1
1
  module Option
2
- VERSION = "1.0.1"
2
+ VERSION = "1.1.0"
3
3
  end
data/spec/option_spec.rb CHANGED
@@ -2,6 +2,14 @@ require "spec_helper"
2
2
 
3
3
  describe NoneClass do
4
4
 
5
+ it "#dup results in a TypeError" do
6
+ lambda { None.dup }.must_raise TypeError
7
+ end
8
+
9
+ it "#clone results in a TypeError" do
10
+ lambda { None.clone }.must_raise TypeError
11
+ end
12
+
5
13
  it "#to_a returns an empty array" do
6
14
  None.to_a.must_equal([])
7
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: option
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -36,7 +36,7 @@ cert_chain:
36
36
  RXJwU3JwSW9FRXoyUnBGQTJvZnJ6T0lNbW5FZUxUUWoKVUp6THlpQXI4SmVG
37
37
  TjI4bXJ1dXFjNHFrRFZLUHBUdExQRk9GZXMzclRFSEIzaGZiM3AzczV5MW9R
38
38
  dTYzb0puagpSK3QwWXZjVwotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
39
- date: 2013-02-01 00:00:00.000000000 Z
39
+ date: 2013-02-16 00:00:00.000000000 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
@@ -104,7 +104,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  segments:
106
106
  - 0
107
- hash: 662014354268780460
107
+ hash: -4306780363685144709
108
108
  required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  none: false
110
110
  requirements:
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  version: '0'
114
114
  segments:
115
115
  - 0
116
- hash: 662014354268780460
116
+ hash: -4306780363685144709
117
117
  requirements: []
118
118
  rubyforge_project:
119
119
  rubygems_version: 1.8.24
metadata.gz.sig CHANGED
Binary file