values 1.7.0 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ebfee9b69e245e56d3f28acd4f68a9cd2f058f7
4
- data.tar.gz: 98287de7700b33e030c220b6fadfb64cc0656efe
3
+ metadata.gz: 340d3953a048a2f834e7ba19ccb6c0aa398daa3f
4
+ data.tar.gz: 46f9ca5a3e202932764860047af1057f796293c7
5
5
  SHA512:
6
- metadata.gz: 767555e6beb2a4f22cb95e5a0a51ff5a9c51e7d55eba85dfa4171377713930b6437de945644952664078a8ed690d21070f2a932b06bd2d28d224e9d8b240587a
7
- data.tar.gz: af926f11f268b34717e2349dd62feb7b469bbc56f7cc80cf7a62da927202b0ba7491d17812ff79892c3cabaee8c8e71d2443e7b87e31e82eb50ce70e9c138a7b
6
+ metadata.gz: cc4714a7b0a0bf4530ab839e80f37f4525aeb477c7f8dd7f71c94be9c7b37ed7276112d0d3bb3be0c0745200e7410e380bf3079e57166d841d506737afaebf88
7
+ data.tar.gz: 812ae35b719d58a583715147aef9563228bbf150dd12ffee00f03f0439eb0319b7a1387aeb34a7153454e1f2b78d1b180623475a599a83b6c8ffa09788ad59f5
@@ -1,5 +1,7 @@
1
1
  class Value
2
2
  def self.new(*fields, &block)
3
+ raise ArgumentError.new('wrong number of arguments (0 for 1+)') if fields.empty?
4
+
3
5
  Class.new do
4
6
  attr_reader(:hash, *fields)
5
7
 
@@ -1,5 +1,9 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../lib/values')
2
2
  describe 'values' do
3
+ it 'raises argument error if given zero fields' do
4
+ expect { Value.new }.to raise_error(ArgumentError, 'wrong number of arguments (0 for 1+)')
5
+ end
6
+
3
7
  Cell = Value.new(:alive)
4
8
 
5
9
  it 'stores a single field' do
@@ -6,7 +6,7 @@
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "values"
9
- s.version = "1.7.0"
9
+ s.version = "1.7.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: values
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Crayford