extras 0.2.0 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2e3e0532b2c1e6027c7230b8ecb8a5a090019b7b
4
- data.tar.gz: a28bbd8da74cfc2246e3852a53b6dcd84423f8ad
3
+ metadata.gz: 40b076f20b355bcdbfb57904221ba29f661a3689
4
+ data.tar.gz: 8f8094cf422cf7fa467b5ba4676ca047eedfc726
5
5
  SHA512:
6
- metadata.gz: f0ecd752a4f38607930040a1cb03f109ae8c566f788b5c478ea0cf0033ec2ae9ac18e5b9097e005ecd64197b899f05ff06b35fc25ac8836e858cddd88e57cf5c
7
- data.tar.gz: 9a6b86be660c3d0d73d6456ba0800c82f2195ba541fae22f0df54967f971903894104939d6832d11241e154372b6e8c849db560dac514ea4c2cf2dc8cf75fa1c
6
+ metadata.gz: 673b899ad2314bccd0ee859dfb67f64fd1bb3117f96d800b4930830649b4a2d7308fa35421b6b3dbae5490d2b58812b70e41437843f4c66e920c55fcabd31fef
7
+ data.tar.gz: 984a1f52639f4e085f4fe5c1616875d60c9dbea4268ead07959782b02317e482c37fe1c1d39cb1f8ac789c60b64b73e9de80381018504d5745dc47a473740fb7
@@ -8,12 +8,22 @@ module Extras
8
8
  module Array
9
9
  module ClassMethods
10
10
  def allowed
11
- @allowed ||= begin
12
- out = {
13
- :keys => [::NilClass, ::Hash, ::TrueClass, \
14
- ::FalseClass, ::Regexp, ::Array, ::Set, ::Fixnum,
15
- ::Bignum, ::Float]
16
- }
11
+ if RUBY_VERSION < "2.4"
12
+ @allowed ||= begin
13
+ out = {
14
+ :keys => [::NilClass, ::Hash, ::TrueClass, \
15
+ ::FalseClass, ::Regexp, ::Array, ::Set, ::Fixnum,
16
+ ::Bignum, ::Float]
17
+ }
18
+ end
19
+ else
20
+ @allowed ||= begin
21
+ out = {
22
+ :keys => [::NilClass, ::Hash, ::TrueClass, \
23
+ ::FalseClass, ::Regexp, ::Array, ::Set, ::Integer, \
24
+ ::Float]
25
+ }
26
+ end
17
27
  end
18
28
  end
19
29
  end
@@ -8,13 +8,24 @@ module Extras
8
8
  module Hash
9
9
  module ClassMethods
10
10
  def allowed
11
- @allowed ||= begin
12
- {
13
- :keys => [],
14
- :vals => [::NilClass, ::Hash, ::TrueClass, \
15
- ::FalseClass, ::Regexp, ::Array, ::Set, ::Fixnum,
16
- ::Bignum, ::Float]
17
- }
11
+ if RUBY_VERSION < "2.4"
12
+ @allowed ||= begin
13
+ {
14
+ :keys => [],
15
+ :vals => [::NilClass, ::Hash, ::TrueClass, \
16
+ ::FalseClass, ::Regexp, ::Array, ::Set, ::Fixnum,
17
+ ::Bignum, ::Float]
18
+ }
19
+ end
20
+ else
21
+ @allowed ||= begin
22
+ {
23
+ :keys => [],
24
+ :vals => [::NilClass, ::Hash, ::TrueClass, \
25
+ ::FalseClass, ::Regexp, ::Array, ::Set, ::Integer,
26
+ ::Float]
27
+ }
28
+ end
18
29
  end
19
30
  end
20
31
  end
@@ -5,5 +5,5 @@
5
5
  # ----------------------------------------------------------------------------
6
6
 
7
7
  module Extras
8
- VERSION = "0.2.0"
8
+ VERSION = "0.3.0"
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extras
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordon Bedwell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-19 00:00:00.000000000 Z
11
+ date: 2017-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: forwardable-extended