activemodel 4.0.1.rc2 → 4.0.1.rc3

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: 2ec5b03fe5653a9502241f021df8c285cf6639c4
4
- data.tar.gz: 02963af65a4017e4c2aba4e0c98621973f647a82
3
+ metadata.gz: a6fe60de7e5c7a1f28e5d087b0c1b039f2e94e7c
4
+ data.tar.gz: 1f3891829242a2891d6297f2a709891ec717dca1
5
5
  SHA512:
6
- metadata.gz: 21b548c5ad52adc421bde21e455f17a7bbfa335404d0ff4672d1218696cae7b42df9ab79d6c2c774ebeeb0f287a7fbbb9431288f0f4b270541904ea3204161d1
7
- data.tar.gz: db2d964e5512b314e3d7d3a535bd7a00667d005be05df1b043dc69452df39a4f29bcd977670fb853d3ca10c7475c4df542ce000cde43bc7119f0ddbab2a97781
6
+ metadata.gz: 128e07279b0c3a32cdcd06a080f19e1207f0f84c923c394dcf6524e9f035f309299e99f87ffed1361681151a27c9d93dc93723084c33a88dc779707d4e3d5909
7
+ data.tar.gz: 83d1692031a9909a16883668597f1739588d90712b85c8d97e83e9382f12af3e365c55374aea8e7193b27534f6285d53fe85a87398adc0d656b02cee024cac4d
@@ -30,12 +30,18 @@ module ActiveModel
30
30
  @delimiter ||= options[:in] || options[:within]
31
31
  end
32
32
 
33
- # In Ruby 1.9 <tt>Range#include?</tt> on non-numeric ranges checks all possible values in the
34
- # range for equality, which is slower but more accurate. <tt>Range#cover?</tt> uses
35
- # the previous logic of comparing a value with the range endpoints, which is fast
36
- # but is only accurate on numeric ranges.
33
+ # In Ruby 1.9 <tt>Range#include?</tt> on non-number-or-time-ish ranges checks all
34
+ # possible values in the range for equality, which is slower but more accurate.
35
+ # <tt>Range#cover?</tt> uses the previous logic of comparing a value with the range
36
+ # endpoints, which is fast but is only accurate on Numeric, Time, or DateTime ranges.
37
37
  def inclusion_method(enumerable)
38
- (enumerable.is_a?(Range) && enumerable.first.is_a?(Numeric)) ? :cover? : :include?
38
+ return :include? unless enumerable.is_a?(Range)
39
+ case enumerable.first
40
+ when Numeric, Time, DateTime
41
+ :cover?
42
+ else
43
+ :include?
44
+ end
39
45
  end
40
46
  end
41
47
  end
@@ -1,7 +1,7 @@
1
1
  module ActiveModel
2
2
  # Returns the version of the currently loaded ActiveModel as a Gem::Version
3
3
  def self.version
4
- Gem::Version.new "4.0.1.rc2"
4
+ Gem::Version.new "4.0.1.rc3"
5
5
  end
6
6
 
7
7
  module VERSION #:nodoc:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activemodel
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1.rc2
4
+ version: 4.0.1.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-21 00:00:00.000000000 Z
11
+ date: 2013-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.0.1.rc2
19
+ version: 4.0.1.rc3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 4.0.1.rc2
26
+ version: 4.0.1.rc3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: builder
29
29
  requirement: !ruby/object:Gem::Requirement