backports 3.5.0 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,12 @@
1
1
  = Backports --- History
2
2
 
3
+ == Version 3.6.0 - February 14th, 2014
4
+
5
+ * Additional features of 2.1.0
6
+ * Bignum#bit_length
7
+ * Fixnum#bit_length
8
+ * Module#include (now public)
9
+
3
10
  == Version 3.5.0 - February 3rd, 2014
4
11
 
5
12
  * Additional features of 2.0.0
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: .
9
9
  specs:
10
- backports (3.5.0)
10
+ backports (3.6.0)
11
11
 
12
12
  GEM
13
13
  remote: http://rubygems.org/
@@ -73,8 +73,14 @@ Compatible with Ruby 1.8.6, 1.8.7, 1.9.1, 1.9.2, 1.9.3, 2.0, 2.1, JRuby and Rubi
73
73
 
74
74
  * Array
75
75
  * +to_h+
76
+ * Bignum
77
+ * +bit_length+
76
78
  * Enumerable
77
79
  * +to_h+
80
+ * Fixnum
81
+ * +bit_length+
82
+ * Module
83
+ * +include+ (now public)
78
84
 
79
85
  == Ruby 2.0 backports
80
86
 
@@ -0,0 +1,3 @@
1
+ require 'backports/tools'
2
+
3
+ Backports.require_relative_dir
@@ -0,0 +1,15 @@
1
+ unless Bignum.method_defined? :bit_length
2
+ require 'backports/2.0.0/range/bsearch'
3
+ class Bignum
4
+ def bit_length
5
+ n = 8 * (size - 42.size)
6
+ smaller = self >> n
7
+ if smaller >= 0
8
+ smaller += 1
9
+ else
10
+ smaller = -smaller
11
+ end
12
+ n + (0...8 * 42.size).bsearch{|i| smaller <= (1 << i) }
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,3 @@
1
+ require 'backports/tools'
2
+
3
+ Backports.require_relative_dir
@@ -0,0 +1,13 @@
1
+ unless Fixnum.method_defined? :bit_length
2
+ require 'backports/2.0.0/range/bsearch'
3
+ class Fixnum
4
+ def bit_length
5
+ n = if self >= 0
6
+ self + 1
7
+ else
8
+ -self
9
+ end
10
+ (0...8 * size).bsearch{|i| n <= (1 << i) }
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,3 @@
1
+ require 'backports/tools'
2
+
3
+ Backports.require_relative_dir
@@ -0,0 +1,5 @@
1
+ if Module.private_method_defined? :include
2
+ class Module
3
+ public :include
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module Backports
2
- VERSION = "3.5.0" unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
2
+ VERSION = "3.6.0" unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
3
3
  end
metadata CHANGED
@@ -1,28 +1,38 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: backports
3
- version: !ruby/object:Gem::Version
4
- version: 3.5.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 31
5
+ prerelease:
6
+ segments:
7
+ - 3
8
+ - 6
9
+ - 0
10
+ version: 3.6.0
5
11
  platform: ruby
6
- authors:
7
- - Marc-André Lafortune
12
+ authors:
13
+ - "Marc-Andr\xC3\xA9 Lafortune"
8
14
  autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
- date: 2014-02-03 00:00:00.000000000 Z
17
+
18
+ date: 2014-02-15 00:00:00 Z
12
19
  dependencies: []
13
- description: Essential backports that enable many of the nice features of Ruby 1.8.7
14
- up to 2.0.0 for earlier versions.
15
- email:
20
+
21
+ description: Essential backports that enable many of the nice features of Ruby 1.8.7 up to 2.0.0 for earlier versions.
22
+ email:
16
23
  - github@marc-andre.ca
17
24
  executables: []
25
+
18
26
  extensions: []
27
+
19
28
  extra_rdoc_files: []
20
- files:
21
- - ".document"
22
- - ".gitignore"
23
- - ".gitmodules"
24
- - ".irbrc"
25
- - ".travis.yml"
29
+
30
+ files:
31
+ - .document
32
+ - .gitignore
33
+ - .gitmodules
34
+ - .irbrc
35
+ - .travis.yml
26
36
  - CHANGELOG.rdoc
27
37
  - Gemfile
28
38
  - Gemfile.lock
@@ -390,8 +400,14 @@ files:
390
400
  - lib/backports/2.1.0.rb
391
401
  - lib/backports/2.1.0/array.rb
392
402
  - lib/backports/2.1.0/array/to_h.rb
403
+ - lib/backports/2.1.0/bignum.rb
404
+ - lib/backports/2.1.0/bignum/bit_length.rb
393
405
  - lib/backports/2.1.0/enumerable.rb
394
406
  - lib/backports/2.1.0/enumerable/to_h.rb
407
+ - lib/backports/2.1.0/fixnum.rb
408
+ - lib/backports/2.1.0/fixnum/bit_length.rb
409
+ - lib/backports/2.1.0/module.rb
410
+ - lib/backports/2.1.0/module/include.rb
395
411
  - lib/backports/2.1.rb
396
412
  - lib/backports/basic_object.rb
397
413
  - lib/backports/extra/random/MT19937.rb
@@ -535,28 +551,38 @@ files:
535
551
  - test/test_helper.rb
536
552
  homepage: http://github.com/marcandre/backports
537
553
  licenses: []
538
- metadata: {}
554
+
539
555
  post_install_message:
540
556
  rdoc_options: []
541
- require_paths:
557
+
558
+ require_paths:
542
559
  - lib
543
- required_ruby_version: !ruby/object:Gem::Requirement
544
- requirements:
560
+ required_ruby_version: !ruby/object:Gem::Requirement
561
+ none: false
562
+ requirements:
545
563
  - - ">="
546
- - !ruby/object:Gem::Version
547
- version: '0'
548
- required_rubygems_version: !ruby/object:Gem::Requirement
549
- requirements:
564
+ - !ruby/object:Gem::Version
565
+ hash: 3
566
+ segments:
567
+ - 0
568
+ version: "0"
569
+ required_rubygems_version: !ruby/object:Gem::Requirement
570
+ none: false
571
+ requirements:
550
572
  - - ">="
551
- - !ruby/object:Gem::Version
552
- version: '0'
573
+ - !ruby/object:Gem::Version
574
+ hash: 3
575
+ segments:
576
+ - 0
577
+ version: "0"
553
578
  requirements: []
579
+
554
580
  rubyforge_project:
555
- rubygems_version: 2.2.1
581
+ rubygems_version: 1.8.25
556
582
  signing_key:
557
- specification_version: 4
583
+ specification_version: 3
558
584
  summary: Backports of Ruby features for older Ruby.
559
- test_files:
585
+ test_files:
560
586
  - spec/tags/1.8.6/core/argf/each_line_spec.rb
561
587
  - spec/tags/1.8.6/core/argf/each_spec.rb
562
588
  - spec/tags/1.8.6/core/argf/lines_spec.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 406b2a6d3666f1f413255264b750efd06e9a1d73
4
- data.tar.gz: 3176285dc83cc99080b3d350d683cfee879a5535
5
- SHA512:
6
- metadata.gz: a1dfeb35ef0719dd98b30faf16d8e9e8e0f627018c17cfb1fec38daff0ecf8d0ae1948a41d497af4e8dfe90aa8bc4c10da51abed870b7dff4a7c12584d9cc4fa
7
- data.tar.gz: 1417e2b0a7bc6c73670f8708a1ef7eba903c68db8bdeef78f6ba3e95fedb269ef003b746de6fe41394a56c85d8577ffc7409231c87fadbe503872b3f09eaad9c