monkey-patch 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/lib/monkey-patch.rb CHANGED
@@ -1,8 +1,11 @@
1
- # Copyright (c) 2013, Christopher Mark Gore,
1
+ # -*- coding: utf-8 -*-
2
+ # -*- mode: Ruby -*-
3
+
4
+ # Copyright © 2013, Christopher Mark Gore,
2
5
  # Soli Deo Gloria,
3
6
  # All rights reserved.
4
7
  #
5
- # 8729 Lower Marine Road, Saint Jacob, Illinois 62281 USA.
8
+ # 2317 South River Road, Saint Charles, Missouri 63303 USA.
6
9
  # Web: http://cgore.com
7
10
  # Email: cgore@cgore.com
8
11
  #
@@ -10,15 +13,15 @@
10
13
  # modification, are permitted provided that the following conditions are met:
11
14
  #
12
15
  # * Redistributions of source code must retain the above copyright
13
- # notice, this list of conditions and the following disclaimer.
16
+ # notice, this list of conditions and the following disclaimer.
14
17
  #
15
18
  # * Redistributions in binary form must reproduce the above copyright
16
- # notice, this list of conditions and the following disclaimer in the
17
- # documentation and/or other materials provided with the distribution.
19
+ # notice, this list of conditions and the following disclaimer in the
20
+ # documentation and/or other materials provided with the distribution.
18
21
  #
19
22
  # * Neither the name of Christopher Mark Gore nor the names of other
20
- # contributors may be used to endorse or promote products derived from
21
- # this software without specific prior written permission.
23
+ # contributors may be used to endorse or promote products derived from
24
+ # this software without specific prior written permission.
22
25
  #
23
26
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
27
  # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -33,6 +36,7 @@
33
36
  # POSSIBILITY OF SUCH DAMAGE.
34
37
 
35
38
  require 'monkey-patch/array'
39
+ require 'monkey-patch/enumerable'
36
40
  require 'monkey-patch/hash'
37
41
  require 'monkey-patch/pathname'
38
42
  require 'monkey-patch/string'
@@ -49,10 +49,6 @@ class Array
49
49
  self.clone.pad_nil! depth
50
50
  end
51
51
 
52
- def rest
53
- self[1..-1]
54
- end
55
-
56
52
  def wide_zip(other)
57
53
  pad_nil(other.length).zip other
58
54
  end
@@ -0,0 +1,42 @@
1
+ # -*- coding: utf-8 -*-
2
+ # -*- mode: Ruby -*-
3
+
4
+ # Copyright © 2013, Christopher Mark Gore,
5
+ # Soli Deo Gloria,
6
+ # All rights reserved.
7
+ #
8
+ # 2317 South River Road, Saint Charles, Missouri 63303 USA.
9
+ # Web: http://cgore.com
10
+ # Email: cgore@cgore.com
11
+ #
12
+ # Redistribution and use in source and binary forms, with or without
13
+ # modification, are permitted provided that the following conditions are met:
14
+ #
15
+ # * Redistributions of source code must retain the above copyright
16
+ # notice, this list of conditions and the following disclaimer.
17
+ #
18
+ # * Redistributions in binary form must reproduce the above copyright
19
+ # notice, this list of conditions and the following disclaimer in the
20
+ # documentation and/or other materials provided with the distribution.
21
+ #
22
+ # * Neither the name of Christopher Mark Gore nor the names of other
23
+ # contributors may be used to endorse or promote products derived from
24
+ # this software without specific prior written permission.
25
+ #
26
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27
+ # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28
+ # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
30
+ # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34
+ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35
+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
+ # POSSIBILITY OF SUCH DAMAGE.
37
+
38
+ class Enumerable
39
+ def rest
40
+ self[1..-1]
41
+ end
42
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monkey-patch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -35,6 +35,7 @@ extra_rdoc_files: []
35
35
  files:
36
36
  - lib/monkey-patch.rb
37
37
  - lib/monkey-patch/array.rb
38
+ - lib/monkey-patch/enumerable.rb
38
39
  - lib/monkey-patch/hash.rb
39
40
  - lib/monkey-patch/pathname.rb
40
41
  - lib/monkey-patch/string.rb
@@ -64,3 +65,4 @@ signing_key:
64
65
  specification_version: 3
65
66
  summary: A simple library with common monkey patches for the standard Ruby classes.
66
67
  test_files: []
68
+ has_rdoc: