mug 1.2.0 → 1.2.1
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/and-or.rb +5 -5
- data/lib/mug/array/delete_all.rb +2 -2
- data/lib/mug/bool.rb +4 -3
- data/lib/mug/clamp.rb +2 -4
- data/lib/mug/enumerable/chain.rb +3 -2
- data/lib/mug/enumerable/counts.rb +1 -1
- data/lib/mug/enumerable/hash-like.rb +1 -0
- data/lib/mug/hash/map.rb +4 -4
- data/lib/mug/hash/merge.rb +15 -16
- data/lib/mug/matchdata/each.rb +5 -5
- data/lib/mug/matchdata/hash.rb +3 -1
- data/lib/mug/self.rb +3 -3
- data/lib/mug/top.rb +4 -4
- data/test/test-enumerable-chain.rb +8 -8
- data/test/test-loop-with.rb +6 -6
- data/test/test-negativity.rb +3 -3
- metadata +30 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c21f58658e25bbdc5ffa1d9fc3b5a80ba7da9c4a49348681523a034e21d6972e
|
4
|
+
data.tar.gz: 2db7532d87137ca0bf31ac1d460b7bf487ee15abdbc8e09f5d32310e8a5bd8d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96db9c590c28244950a74746f680549234780c34a259819991b3efccc78cc2fb5294f3b9655fe3f428b50805d472b67c43c86ad7c60608e80b039cbd8f34ddc8
|
7
|
+
data.tar.gz: e57ca3a0fa44884f06fb5bfc3a7b1a26d5055b1e1b6ccdcf7832df86d7c39f18d5dfad512c4666d1f466f5c0fe5ffbd76a69fee3d7482d00b853b6ed74070a0b
|
data/lib/mug/and-or.rb
CHANGED
@@ -7,7 +7,7 @@ class Object
|
|
7
7
|
# If a block is given, +obj+ is yielded to it; if it returns truthy,
|
8
8
|
# +default+ is returned, otherwise +obj+ is returned.
|
9
9
|
#
|
10
|
-
def and default
|
10
|
+
def and default, &_block
|
11
11
|
if block_given?
|
12
12
|
yield(self) ? default : self
|
13
13
|
else
|
@@ -21,7 +21,7 @@ class Object
|
|
21
21
|
# If a block is given, +obj+ is yielded to it; if it returns truthy,
|
22
22
|
# +obj+ is returned, otherwise +default+ is returned.
|
23
23
|
#
|
24
|
-
def or default
|
24
|
+
def or default, &_block
|
25
25
|
if block_given?
|
26
26
|
yield(self) ? self : default
|
27
27
|
else
|
@@ -34,7 +34,7 @@ class Object
|
|
34
34
|
#
|
35
35
|
# Returns +obj+.
|
36
36
|
#
|
37
|
-
def and_then &
|
37
|
+
def and_then &_block
|
38
38
|
yield self if self
|
39
39
|
self
|
40
40
|
end
|
@@ -44,7 +44,7 @@ class Object
|
|
44
44
|
#
|
45
45
|
# Returns +obj+.
|
46
46
|
#
|
47
|
-
def or_then &
|
47
|
+
def or_then &_block
|
48
48
|
yield self unless self
|
49
49
|
self
|
50
50
|
end
|
@@ -52,7 +52,7 @@ class Object
|
|
52
52
|
end
|
53
53
|
|
54
54
|
=begin
|
55
|
-
Copyright (c)
|
55
|
+
Copyright (c) 2018, Matthew Kerwin <matthew@kerwin.net.au>
|
56
56
|
|
57
57
|
Permission to use, copy, modify, and/or distribute this software for any
|
58
58
|
purpose with or without fee is hereby granted, provided that the above
|
data/lib/mug/array/delete_all.rb
CHANGED
@@ -10,7 +10,7 @@ class Array
|
|
10
10
|
#
|
11
11
|
# See #delete_if, #reject!
|
12
12
|
#
|
13
|
-
def delete_all &
|
13
|
+
def delete_all &_block
|
14
14
|
return enum_for :delete_all unless block_given?
|
15
15
|
[].tap do |removed|
|
16
16
|
delete_if do |e|
|
@@ -25,7 +25,7 @@ class Array
|
|
25
25
|
end
|
26
26
|
|
27
27
|
=begin
|
28
|
-
Copyright (c)
|
28
|
+
Copyright (c) 2018, Matthew Kerwin <matthew@kerwin.net.au>
|
29
29
|
|
30
30
|
Permission to use, copy, modify, and/or distribute this software for any
|
31
31
|
purpose with or without fee is hereby granted, provided that the above
|
data/lib/mug/bool.rb
CHANGED
@@ -33,7 +33,7 @@ class Numeric
|
|
33
33
|
# Returns true if not zero.
|
34
34
|
#
|
35
35
|
def to_b
|
36
|
-
self
|
36
|
+
!self.zero?
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
@@ -93,9 +93,10 @@ class Enumerator
|
|
93
93
|
#
|
94
94
|
# Converts enum to a boolean.
|
95
95
|
# Returns true if there are any elements.
|
96
|
+
# An enumerator whose size cannot be calculated lazily is assumed to be true.
|
96
97
|
#
|
97
98
|
def to_b
|
98
|
-
size.to_b
|
99
|
+
(s = size).nil? || s.to_b
|
99
100
|
end
|
100
101
|
end
|
101
102
|
end
|
@@ -111,7 +112,7 @@ class Exception
|
|
111
112
|
end
|
112
113
|
|
113
114
|
=begin
|
114
|
-
Copyright (c)
|
115
|
+
Copyright (c) 2018, Matthew Kerwin <matthew@kerwin.net.au>
|
115
116
|
|
116
117
|
Permission to use, copy, modify, and/or distribute this software for any
|
117
118
|
purpose with or without fee is hereby granted, provided that the above
|
data/lib/mug/clamp.rb
CHANGED
@@ -33,9 +33,7 @@ class Range
|
|
33
33
|
|
34
34
|
b = last
|
35
35
|
if val >= b
|
36
|
-
if exclude_end?
|
37
|
-
raise ArgumentError, 'more than or equal to the exclusive range'
|
38
|
-
end
|
36
|
+
raise ArgumentError, 'greater than or equal to the exclusive range' if exclude_end?
|
39
37
|
return b
|
40
38
|
end
|
41
39
|
|
@@ -45,7 +43,7 @@ class Range
|
|
45
43
|
end
|
46
44
|
|
47
45
|
=begin
|
48
|
-
Copyright (c)
|
46
|
+
Copyright (c) 2018, Matthew Kerwin <matthew@kerwin.net.au>
|
49
47
|
|
50
48
|
Permission to use, copy, modify, and/or distribute this software for any
|
51
49
|
purpose with or without fee is hereby granted, provided that the above
|
data/lib/mug/enumerable/chain.rb
CHANGED
@@ -9,11 +9,12 @@ module Enumerable
|
|
9
9
|
def chain *enums
|
10
10
|
return enum_for(:chain, *enums) unless block_given?
|
11
11
|
enums.each do |enum|
|
12
|
-
enum.each {|*args| yield
|
12
|
+
enum.each {|*args| yield(*args) }
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
+
undef chain if RUBY_VERSION >= '2.6'
|
17
18
|
#
|
18
19
|
# Creates a chain of Enumerables following this one, and
|
19
20
|
# invokes a block once for each element of each Enumerable.
|
@@ -21,7 +22,7 @@ module Enumerable
|
|
21
22
|
def chain *enums
|
22
23
|
return enum_for(:chain, *enums) unless block_given?
|
23
24
|
[self, *enums].each do |enum|
|
24
|
-
enum.each {|*args| yield
|
25
|
+
enum.each {|*args| yield(*args) }
|
25
26
|
end
|
26
27
|
nil
|
27
28
|
end
|
data/lib/mug/hash/map.rb
CHANGED
@@ -7,7 +7,7 @@ class Hash
|
|
7
7
|
# {'a'=>1, 'b'=>2}.map_values { |v| v*2 } #=> {'a'=>2, 'b'=>4}
|
8
8
|
# {'a'=>1, 'b'=>2}.map_values { "cat" } #=> {'a'=>"cat", 'b'=>"cat"}
|
9
9
|
#
|
10
|
-
def map_values &
|
10
|
+
def map_values &_block # :yields: value
|
11
11
|
hsh = {}
|
12
12
|
each do |k, v|
|
13
13
|
hsh[k] = yield v
|
@@ -34,7 +34,7 @@ class Hash
|
|
34
34
|
# {'a'=>1, 'b'=>2}.map_keys { |k| k*2 } #=> {'aa'=>1, 'bb'=>2}
|
35
35
|
# {'a'=>1, 'b'=>2}.map_keys { "cat" } #=> {'cat'=>2}
|
36
36
|
#
|
37
|
-
def map_keys &
|
37
|
+
def map_keys &_block # :yields: key
|
38
38
|
hsh = {}
|
39
39
|
each do |k, v|
|
40
40
|
hsh[ yield k ] = v
|
@@ -63,7 +63,7 @@ class Hash
|
|
63
63
|
# {'a'=>1, 'b'=>2}.map_pairs { |k,v| [k*2, v+1] } #=> {'aa'=>2, 'bb'=>3}
|
64
64
|
# {'a'=>1, 'b'=>2}.map_pairs { ["cat","dog"] } #=> {'cat'=>'dog'}
|
65
65
|
#
|
66
|
-
def map_pairs &
|
66
|
+
def map_pairs &_block # :yields: key, value
|
67
67
|
hsh = {}
|
68
68
|
each do |k, v|
|
69
69
|
a, b = yield k, v
|
@@ -83,7 +83,7 @@ class Hash
|
|
83
83
|
end
|
84
84
|
|
85
85
|
=begin
|
86
|
-
Copyright (c)
|
86
|
+
Copyright (c) 2018, Matthew Kerwin <matthew@kerwin.net.au>
|
87
87
|
|
88
88
|
Permission to use, copy, modify, and/or distribute this software for any
|
89
89
|
purpose with or without fee is hereby granted, provided that the above
|
data/lib/mug/hash/merge.rb
CHANGED
@@ -1,19 +1,3 @@
|
|
1
|
-
=begin
|
2
|
-
Copyright (c) 2016, Matthew Kerwin <matthew@kerwin.net.au>
|
3
|
-
|
4
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
5
|
-
purpose with or without fee is hereby granted, provided that the above
|
6
|
-
copyright notice and this permission notice appear in all copies.
|
7
|
-
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
9
|
-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
10
|
-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
11
|
-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
12
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
13
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
14
|
-
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
15
|
-
=end
|
16
|
-
|
17
1
|
|
18
2
|
class Hash
|
19
3
|
|
@@ -55,3 +39,18 @@ class Hash
|
|
55
39
|
|
56
40
|
end
|
57
41
|
|
42
|
+
=begin
|
43
|
+
Copyright (c) 2018, Matthew Kerwin <matthew@kerwin.net.au>
|
44
|
+
|
45
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
46
|
+
purpose with or without fee is hereby granted, provided that the above
|
47
|
+
copyright notice and this permission notice appear in all copies.
|
48
|
+
|
49
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
50
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
51
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
52
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
53
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
54
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
55
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
56
|
+
=end
|
data/lib/mug/matchdata/each.rb
CHANGED
@@ -4,7 +4,7 @@ class MatchData
|
|
4
4
|
# Iterates over each capture group in the MatchData object,
|
5
5
|
# including +$&+ (the entire matched string), yielding the
|
6
6
|
# captured string.
|
7
|
-
def each &
|
7
|
+
def each &_b
|
8
8
|
return enum_for(:each) unless block_given?
|
9
9
|
to_a.each{|v| yield v }
|
10
10
|
end
|
@@ -15,7 +15,7 @@ class MatchData
|
|
15
15
|
# The capture positions are either all Strings or all Integers,
|
16
16
|
# depending on whether the original Regexp had named capture
|
17
17
|
# groups or not.
|
18
|
-
def each_capture &
|
18
|
+
def each_capture &_b
|
19
19
|
return enum_for(:each_capture) unless block_given?
|
20
20
|
if names.empty?
|
21
21
|
captures.each_with_index{|v,i| yield i+1, v }
|
@@ -26,7 +26,7 @@ class MatchData
|
|
26
26
|
|
27
27
|
# Iterates over each named capture group in the MatchData object,
|
28
28
|
# yielding the capture name and string.
|
29
|
-
def each_named_capture &
|
29
|
+
def each_named_capture &_b
|
30
30
|
return enum_for(:each_named_capture) unless block_given?
|
31
31
|
names.each{|n| yield n, self[n] }
|
32
32
|
end
|
@@ -39,7 +39,7 @@ class MatchData
|
|
39
39
|
#
|
40
40
|
# WARNING: if mixing named and positional captures, no positional
|
41
41
|
# captures will be available using this method!
|
42
|
-
def each_positional_capture include_names: false, &
|
42
|
+
def each_positional_capture include_names: false, &_b
|
43
43
|
return enum_for(:each_positional_capture, include_names: include_names) unless block_given?
|
44
44
|
return unless names.empty? || include_names
|
45
45
|
captures.each_with_index{|v,i| yield i+1, v }
|
@@ -48,7 +48,7 @@ class MatchData
|
|
48
48
|
end
|
49
49
|
|
50
50
|
=begin
|
51
|
-
Copyright (c)
|
51
|
+
Copyright (c) 2018, Matthew Kerwin <matthew@kerwin.net.au>
|
52
52
|
|
53
53
|
Permission to use, copy, modify, and/or distribute this software for any
|
54
54
|
purpose with or without fee is hereby granted, provided that the above
|
data/lib/mug/matchdata/hash.rb
CHANGED
@@ -14,10 +14,12 @@ class MatchData
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
+
if RUBY_VERSION < '2.4'
|
17
18
|
# Returns a Hash object of capture name => captured string.
|
18
19
|
def named_captures
|
19
20
|
Hash[ names.map{|n| [n, self[n]] } ]
|
20
21
|
end
|
22
|
+
end
|
21
23
|
|
22
24
|
# Returns a Hash object of capture position => captured string.
|
23
25
|
#
|
@@ -34,7 +36,7 @@ class MatchData
|
|
34
36
|
end
|
35
37
|
|
36
38
|
=begin
|
37
|
-
Copyright (c)
|
39
|
+
Copyright (c) 2018, Matthew Kerwin <matthew@kerwin.net.au>
|
38
40
|
|
39
41
|
Permission to use, copy, modify, and/or distribute this software for any
|
40
42
|
purpose with or without fee is hereby granted, provided that the above
|
data/lib/mug/self.rb
CHANGED
@@ -6,7 +6,7 @@ class Object
|
|
6
6
|
# If a block is given, this object is yielded to it, and the result
|
7
7
|
# is returned.
|
8
8
|
#
|
9
|
-
def self(&
|
9
|
+
def self(&_block)
|
10
10
|
if block_given?
|
11
11
|
yield self
|
12
12
|
else
|
@@ -26,7 +26,7 @@ class Object
|
|
26
26
|
# to a block. If no block is given, returns an
|
27
27
|
# Enumerator.
|
28
28
|
#
|
29
|
-
def revapply(*args, &
|
29
|
+
def revapply(*args, &_block)
|
30
30
|
if block_given?
|
31
31
|
yield self, *args
|
32
32
|
else
|
@@ -37,7 +37,7 @@ class Object
|
|
37
37
|
end
|
38
38
|
|
39
39
|
=begin
|
40
|
-
Copyright (c)
|
40
|
+
Copyright (c) 2018, Matthew Kerwin <matthew@kerwin.net.au>
|
41
41
|
|
42
42
|
Permission to use, copy, modify, and/or distribute this software for any
|
43
43
|
purpose with or without fee is hereby granted, provided that the above
|
data/lib/mug/top.rb
CHANGED
@@ -8,7 +8,7 @@ module Enumerable
|
|
8
8
|
#
|
9
9
|
# @see Enumerable#sort
|
10
10
|
#
|
11
|
-
def top n=1, &
|
11
|
+
def top n=1, &_blk
|
12
12
|
if block_given?
|
13
13
|
sort{|x,y| yield y, x }[0...n]
|
14
14
|
else
|
@@ -32,7 +32,7 @@ module Enumerable
|
|
32
32
|
#
|
33
33
|
# @see Enumerable#sort_by
|
34
34
|
#
|
35
|
-
def top_by n=1, &
|
35
|
+
def top_by n=1, &_blk
|
36
36
|
return enum_for(:top_by, n) unless block_given?
|
37
37
|
chain = {}
|
38
38
|
each do |x|
|
@@ -75,7 +75,7 @@ module Enumerable
|
|
75
75
|
#
|
76
76
|
# @see Enumerable#sort_by
|
77
77
|
#
|
78
|
-
def bottom_by n=1, &
|
78
|
+
def bottom_by n=1, &_blk
|
79
79
|
return enum_for(:bottom_by, n) unless block_given?
|
80
80
|
chain = {}
|
81
81
|
each do |x|
|
@@ -111,7 +111,7 @@ class Array
|
|
111
111
|
end
|
112
112
|
|
113
113
|
=begin
|
114
|
-
Copyright (c)
|
114
|
+
Copyright (c) 2018, Matthew Kerwin <matthew@kerwin.net.au>
|
115
115
|
|
116
116
|
Permission to use, copy, modify, and/or distribute this software for any
|
117
117
|
purpose with or without fee is hereby granted, provided that the above
|
@@ -14,8 +14,8 @@ class Test_enumerable_chain < Test::Unit::TestCase
|
|
14
14
|
]
|
15
15
|
|
16
16
|
result = []
|
17
|
-
a.chain(b, c) do |*
|
18
|
-
result <<
|
17
|
+
a.chain(b, c) do |*x|
|
18
|
+
result << x
|
19
19
|
end
|
20
20
|
|
21
21
|
assert_equal( expect, result )
|
@@ -35,8 +35,8 @@ class Test_enumerable_chain < Test::Unit::TestCase
|
|
35
35
|
assert_kind_of( Enumerator, enum )
|
36
36
|
|
37
37
|
result = []
|
38
|
-
enum.each do |*
|
39
|
-
result <<
|
38
|
+
enum.each do |*x|
|
39
|
+
result << x
|
40
40
|
end
|
41
41
|
|
42
42
|
assert_equal( expect, result )
|
@@ -51,8 +51,8 @@ class Test_enumerable_chain < Test::Unit::TestCase
|
|
51
51
|
]
|
52
52
|
|
53
53
|
result = []
|
54
|
-
Enumerable.chain(a, b) do |*
|
55
|
-
result <<
|
54
|
+
Enumerable.chain(a, b) do |*x|
|
55
|
+
result << x
|
56
56
|
end
|
57
57
|
|
58
58
|
assert_equal( expect, result )
|
@@ -70,8 +70,8 @@ class Test_enumerable_chain < Test::Unit::TestCase
|
|
70
70
|
assert_kind_of( Enumerator, enum )
|
71
71
|
|
72
72
|
result = []
|
73
|
-
enum.each do |*
|
74
|
-
result <<
|
73
|
+
enum.each do |*x|
|
74
|
+
result << x
|
75
75
|
end
|
76
76
|
|
77
77
|
assert_equal( expect, result )
|
data/test/test-loop-with.rb
CHANGED
@@ -7,7 +7,7 @@ class Test_loop_with < Test::Unit::TestCase
|
|
7
7
|
def test_loop_with_index__block
|
8
8
|
a = []
|
9
9
|
b = []
|
10
|
-
|
10
|
+
_x = loop_with_index do |i|
|
11
11
|
a << i
|
12
12
|
break if a.length >= 3
|
13
13
|
end
|
@@ -22,7 +22,7 @@ class Test_loop_with < Test::Unit::TestCase
|
|
22
22
|
def test_loop_with_index__block_offset
|
23
23
|
a = []
|
24
24
|
b = []
|
25
|
-
|
25
|
+
_x = loop_with_index(10) do |i|
|
26
26
|
a << i
|
27
27
|
break if a.length >= 3
|
28
28
|
end
|
@@ -40,7 +40,7 @@ class Test_loop_with < Test::Unit::TestCase
|
|
40
40
|
|
41
41
|
a = []
|
42
42
|
b = []
|
43
|
-
|
43
|
+
_x = enum.each do |i|
|
44
44
|
a << i
|
45
45
|
break if a.length >= 3
|
46
46
|
end
|
@@ -58,7 +58,7 @@ class Test_loop_with < Test::Unit::TestCase
|
|
58
58
|
|
59
59
|
a = []
|
60
60
|
b = []
|
61
|
-
|
61
|
+
_x = enum.each do |i|
|
62
62
|
a << i
|
63
63
|
break if a.length >= 3
|
64
64
|
end
|
@@ -75,7 +75,7 @@ class Test_loop_with < Test::Unit::TestCase
|
|
75
75
|
o = "x"
|
76
76
|
a = []
|
77
77
|
b = []
|
78
|
-
|
78
|
+
_x = loop_with_object(o) do |e|
|
79
79
|
a << e
|
80
80
|
break if a.length >= 3
|
81
81
|
end
|
@@ -94,7 +94,7 @@ class Test_loop_with < Test::Unit::TestCase
|
|
94
94
|
|
95
95
|
a = []
|
96
96
|
b = []
|
97
|
-
|
97
|
+
_x = enum.each do |e|
|
98
98
|
a << e
|
99
99
|
break if a.length >= 3
|
100
100
|
end
|
data/test/test-negativity.rb
CHANGED
@@ -3,9 +3,9 @@ $VERBOSE = true
|
|
3
3
|
|
4
4
|
require 'bigdecimal'
|
5
5
|
|
6
|
-
$neg = [ -1, -(2**65), -3.14, Rational(-1,2), BigDecimal
|
7
|
-
$pos = [ +1, +(2**65), +3.14, Rational(+1,2), BigDecimal
|
8
|
-
$zer = [ 0, 0.0, BigDecimal
|
6
|
+
$neg = [ -1, -(2**65), -3.14, Rational(-1,2), BigDecimal('-1') ]
|
7
|
+
$pos = [ +1, +(2**65), +3.14, Rational(+1,2), BigDecimal('+1') ]
|
8
|
+
$zer = [ 0, 0.0, BigDecimal('0') ]
|
9
9
|
$err = [ Complex(1,1) ]
|
10
10
|
|
11
11
|
require_relative '../lib/mug/negativity'
|
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.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Kerwin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
== MUG: Matty's Ultimate Gem
|
@@ -131,39 +131,39 @@ signing_key:
|
|
131
131
|
specification_version: 4
|
132
132
|
summary: 'MUG: Matty''s Ultimate Gem'
|
133
133
|
test_files:
|
134
|
-
- test/test-
|
135
|
-
- test/test-
|
136
|
-
- test/test-
|
137
|
-
- test/test-not.rb
|
138
|
-
- test/test-enumerable-chain.rb
|
139
|
-
- test/test-loop-with.rb
|
140
|
-
- test/test-counts.rb
|
141
|
-
- test/test-array-minus.rb
|
142
|
-
- test/test-iff.rb
|
143
|
-
- test/test-affix.rb
|
144
|
-
- test/test-bool.rb
|
145
|
-
- test/test-alias.rb
|
134
|
+
- test/test-enumerable-hash-like.rb
|
135
|
+
- test/test-clamp.rb
|
136
|
+
- test/test-array-delete_all.rb
|
146
137
|
- test/test-rexproc.rb
|
147
|
-
- test/test-hashmerge.rb
|
148
|
-
- test/test-array-samples.rb
|
149
138
|
- test/test-tau.rb
|
150
|
-
- test/test-
|
151
|
-
- test/test-
|
152
|
-
- test/test-clamp.rb
|
153
|
-
- test/test-iterator-for.rb
|
139
|
+
- test/test-matchdata_each.rb
|
140
|
+
- test/test-alias.rb
|
154
141
|
- test/test-bittest.rb
|
155
|
-
- test/test-hashwhen.rb
|
156
|
-
- test/test-negativity.rb
|
157
|
-
- test/test-array-delete_all.rb
|
158
142
|
- test/test-iterator.rb
|
143
|
+
- test/test-hashwhen.rb
|
159
144
|
- test/test-matchdata_hash.rb
|
160
|
-
- test/test-
|
161
|
-
- test/test-and-or.rb
|
162
|
-
- test/test-hashmap.rb
|
163
|
-
- test/test-enumerable-hash-like.rb
|
164
|
-
- test/test-time.rb
|
165
|
-
- test/test-matchdata_each.rb
|
166
|
-
- test/test-iterator-method.rb
|
145
|
+
- test/test-not.rb
|
167
146
|
- test/test-array-extend.rb
|
147
|
+
- test/test-iterator-for.rb
|
168
148
|
- test/test-top.rb
|
149
|
+
- test/test-and-or.rb
|
169
150
|
- test/test-array-to_proc.rb
|
151
|
+
- test/test-affix.rb
|
152
|
+
- test/test-hashmerge.rb
|
153
|
+
- test/test-any-and-all.rb
|
154
|
+
- test/test-self.rb
|
155
|
+
- test/test-enumerable-chain.rb
|
156
|
+
- test/test-time.rb
|
157
|
+
- test/test-counts.rb
|
158
|
+
- test/test-negativity.rb
|
159
|
+
- test/test-bool.rb
|
160
|
+
- test/test-hashmap.rb
|
161
|
+
- test/test-loop-with.rb
|
162
|
+
- test/test-maybe.rb
|
163
|
+
- test/test-iff.rb
|
164
|
+
- test/test-array-samples.rb
|
165
|
+
- test/test-hashop.rb
|
166
|
+
- test/test-iterator-method.rb
|
167
|
+
- test/test-apply.rb
|
168
|
+
- test/test-array-minus.rb
|
169
|
+
- test/test-fragile-method-chain.rb
|