structure 0.17.1 → 0.17.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  class Structure
2
- VERSION = '0.17.1'
2
+ VERSION = '0.17.2'
3
3
  end
data/lib/structure.rb CHANGED
@@ -49,10 +49,6 @@ class Structure
49
49
  raise NameError, "#{name} is taken"
50
50
  end
51
51
 
52
- unless type.nil? || type.is_a?(Class)
53
- raise TypeError, "#{type} isn't a Class"
54
- end
55
-
56
52
  if default.nil? || default.is_a?(type)
57
53
  defaults[name] = default
58
54
  else
@@ -38,7 +38,6 @@ class TestStructure < Test::Unit::TestCase
38
38
 
39
39
  test "should raise errors" do
40
40
  assert_raise(NameError) { Person.key :class }
41
- assert_raise(TypeError) { Person.key :foo, Module.new }
42
41
  assert_raise(TypeError) { Person.key :foo, String, :default => 1 }
43
42
  end
44
43
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: structure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.1
4
+ version: 0.17.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -46,7 +46,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
46
46
  version: '0'
47
47
  segments:
48
48
  - 0
49
- hash: -4025252562895677644
49
+ hash: 1259463852739656642
50
50
  required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
@@ -55,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
55
55
  version: '0'
56
56
  segments:
57
57
  - 0
58
- hash: -4025252562895677644
58
+ hash: 1259463852739656642
59
59
  requirements: []
60
60
  rubyforge_project: structure
61
61
  rubygems_version: 1.8.6