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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e308285c55c5291127761955400bafe2a1bf874343ff1524c30028f588815fc
4
- data.tar.gz: dc8a248835f0167d72d1ebffa6228d0e727562f28681033edd88a43743a297b3
3
+ metadata.gz: eb47a83a5fb85778ecfb6ad294b1ccd86711c5c62047881ce4851c5fe8a2c7f9
4
+ data.tar.gz: ff2b7714c8285e757facbe0f02f95e52aaca8f44a9f5b6b062b0efaeb8937ada
5
5
  SHA512:
6
- metadata.gz: 89b6e6e1189c2d5f08b451d4d0994d313c395b0dad53757318683b7e7ebd98d3e9c606ca088b5579741fb840f2b5019d3d34ed2fd2cfa749028a65a1ac0b85fd
7
- data.tar.gz: 00c4304d80f1e9ce517db8a4de889932b02e6798894f25ba8cae36730d3561ca90236fad8f390f7c689125724e920540610461f73afd9b168536a67f5af4bfa7
6
+ metadata.gz: 074d7c49a03c63b511e106e557f9c25f4a49b74a670d36775bb9332036199cf49d8af169fe21a2e23fe87ca4454934d4cc2cba4b5a104d726def4854c913b162
7
+ data.tar.gz: 9aca8c3fe9266d1333c8e18ef8a4eb054031a4830e1e9f2ccf736009468cf29c9721abfd490504063dcca33eb6895354688bc84c22db214256e8eae88a37c569
@@ -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
- proc {|i| self[i] }
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
@@ -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.5.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-27 00:00:00.000000000 Z
11
+ date: 2020-12-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  == MUG: Matty's Ultimate Gem