mug 1.5.1 → 1.6.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 +4 -4
- data/lib/mug/array/to_proc.rb +2 -2
- data/test/test-array-to_proc.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb47a83a5fb85778ecfb6ad294b1ccd86711c5c62047881ce4851c5fe8a2c7f9
|
4
|
+
data.tar.gz: ff2b7714c8285e757facbe0f02f95e52aaca8f44a9f5b6b062b0efaeb8937ada
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 074d7c49a03c63b511e106e557f9c25f4a49b74a670d36775bb9332036199cf49d8af169fe21a2e23fe87ca4454934d4cc2cba4b5a104d726def4854c913b162
|
7
|
+
data.tar.gz: 9aca8c3fe9266d1333c8e18ef8a4eb054031a4830e1e9f2ccf736009468cf29c9721abfd490504063dcca33eb6895354688bc84c22db214256e8eae88a37c569
|
data/lib/mug/array/to_proc.rb
CHANGED
@@ -7,13 +7,13 @@ class Array
|
|
7
7
|
# The Proc's parameter is used as an index into this array.
|
8
8
|
#
|
9
9
|
def to_proc
|
10
|
-
|
10
|
+
method(:slice).to_proc
|
11
11
|
end
|
12
12
|
|
13
13
|
end
|
14
14
|
|
15
15
|
=begin
|
16
|
-
Copyright (c) 2017, Matthew Kerwin <matthew@kerwin.net.au>
|
16
|
+
Copyright (c) 2017-2020, Matthew Kerwin <matthew@kerwin.net.au>
|
17
17
|
|
18
18
|
Permission to use, copy, modify, and/or distribute this software for any
|
19
19
|
purpose with or without fee is hereby granted, provided that the above
|
data/test/test-array-to_proc.rb
CHANGED
@@ -10,6 +10,8 @@ class Test_array_to_proc < Test::Unit::TestCase
|
|
10
10
|
assert_equal( p[3], a[3] )
|
11
11
|
assert_equal( p[-1], a[-1] )
|
12
12
|
assert_equal( p[0..-1], a )
|
13
|
+
assert_equal( p[0,1], a[0,1] )
|
14
|
+
assert_equal( p[1,2], a[1,2] )
|
13
15
|
assert_raise(TypeError) { p['not-a-number'] }
|
14
16
|
end
|
15
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Kerwin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
== MUG: Matty's Ultimate Gem
|