backports 3.4.1 → 3.5.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 406b2a6d3666f1f413255264b750efd06e9a1d73
4
+ data.tar.gz: 3176285dc83cc99080b3d350d683cfee879a5535
5
+ SHA512:
6
+ metadata.gz: a1dfeb35ef0719dd98b30faf16d8e9e8e0f627018c17cfb1fec38daff0ecf8d0ae1948a41d497af4e8dfe90aa8bc4c10da51abed870b7dff4a7c12584d9cc4fa
7
+ data.tar.gz: 1417e2b0a7bc6c73670f8708a1ef7eba903c68db8bdeef78f6ba3e95fedb269ef003b746de6fe41394a56c85d8577ffc7409231c87fadbe503872b3f09eaad9c
@@ -5,6 +5,8 @@ rvm:
5
5
  - "1.9.2"
6
6
  - "1.9.3"
7
7
  - "2.0.0"
8
+ - "2.1.0"
9
+ - ruby-head
8
10
  - jruby-18mode
9
11
  - jruby-19mode
10
12
  - rbx-18mode
@@ -1,5 +1,10 @@
1
1
  = Backports --- History
2
2
 
3
+ == Version 3.5.0 - February 3rd, 2014
4
+
5
+ * Additional features of 2.0.0
6
+ * Range#size
7
+
3
8
  == Version 3.4.0 - December 29th, 2013
4
9
 
5
10
  * Additional features of 2.1.0
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: .
9
9
  specs:
10
- backports (3.4.1)
10
+ backports (3.5.0)
11
11
 
12
12
  GEM
13
13
  remote: http://rubygems.org/
@@ -0,0 +1,15 @@
1
+ unless Range.method_defined? :size
2
+ class Range
3
+ def size
4
+ return nil unless self.begin.is_a?(Numeric) && self.end.is_a?(Numeric)
5
+ size = self.end - self.begin
6
+ return 0 if size <= 0
7
+ return size if size == Float::INFINITY
8
+ if exclude_end?
9
+ size.ceil
10
+ else
11
+ size.floor + 1
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module Backports
2
- VERSION = "3.4.1" unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
2
+ VERSION = "3.5.0" unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
3
3
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backports
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.1
5
- prerelease:
4
+ version: 3.5.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Marc-André Lafortune
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-01-31 00:00:00.000000000 Z
11
+ date: 2014-02-03 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: Essential backports that enable many of the nice features of Ruby 1.8.7
15
14
  up to 2.0.0 for earlier versions.
@@ -19,11 +18,11 @@ executables: []
19
18
  extensions: []
20
19
  extra_rdoc_files: []
21
20
  files:
22
- - .document
23
- - .gitignore
24
- - .gitmodules
25
- - .irbrc
26
- - .travis.yml
21
+ - ".document"
22
+ - ".gitignore"
23
+ - ".gitmodules"
24
+ - ".irbrc"
25
+ - ".travis.yml"
27
26
  - CHANGELOG.rdoc
28
27
  - Gemfile
29
28
  - Gemfile.lock
@@ -380,6 +379,7 @@ files:
380
379
  - lib/backports/2.0.0/nil/to_h.rb
381
380
  - lib/backports/2.0.0/range.rb
382
381
  - lib/backports/2.0.0/range/bsearch.rb
382
+ - lib/backports/2.0.0/range/size.rb
383
383
  - lib/backports/2.0.0/stdlib.rb
384
384
  - lib/backports/2.0.0/stdlib/abbrev.rb
385
385
  - lib/backports/2.0.0/stdlib/fake_stdlib_lib.rb
@@ -535,27 +535,26 @@ files:
535
535
  - test/test_helper.rb
536
536
  homepage: http://github.com/marcandre/backports
537
537
  licenses: []
538
+ metadata: {}
538
539
  post_install_message:
539
540
  rdoc_options: []
540
541
  require_paths:
541
542
  - lib
542
543
  required_ruby_version: !ruby/object:Gem::Requirement
543
- none: false
544
544
  requirements:
545
- - - ! '>='
545
+ - - ">="
546
546
  - !ruby/object:Gem::Version
547
547
  version: '0'
548
548
  required_rubygems_version: !ruby/object:Gem::Requirement
549
- none: false
550
549
  requirements:
551
- - - ! '>='
550
+ - - ">="
552
551
  - !ruby/object:Gem::Version
553
552
  version: '0'
554
553
  requirements: []
555
554
  rubyforge_project:
556
- rubygems_version: 1.8.24
555
+ rubygems_version: 2.2.1
557
556
  signing_key:
558
- specification_version: 3
557
+ specification_version: 4
559
558
  summary: Backports of Ruby features for older Ruby.
560
559
  test_files:
561
560
  - spec/tags/1.8.6/core/argf/each_line_spec.rb