mug 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e14ce5838a2c49e7ede7dba94a8aa1b330efba9ecec52261d611985d30bd47d
4
- data.tar.gz: 89a7d9d6ddb730004f062f625d81301f1d9271759b8c5ab717e1a42407981b44
3
+ metadata.gz: c6a1368f80be0c11d5fc8614b1e9548dddef502fffd929bd6e01b6bc705737c8
4
+ data.tar.gz: 9a1bb6550a0ac33d484c2fd52fad34a82035ec6af4df4446ecfa099dd92b78d8
5
5
  SHA512:
6
- metadata.gz: 5f3da00b7a7b2ba58dfcd8b5efaae57ccd035c9e36d90182a13204578089e071d0a6a614c031585eaf81f8f9bd4c06adbaf8d04a52159ad37951b396c0b73c08
7
- data.tar.gz: 71c1e2a2cf4c87b0b4a4e13f837c36042c374b0b50a6d210d09b838b0470e87310765c57bee9ad02b711d4bc1287cd5856b0ef26ee2c2a2fbcee30a12f10e965
6
+ metadata.gz: bbf884f4d7b2e3dac6e0a4623d27a831430e9446be804cb99d0cb44fadd6d9de4eb7dc0bcc8f99c930d33b24702ea955d6c1be599f78baacd626f1b9eb829a88
7
+ data.tar.gz: 06dc7216fac287a0838c9efa7a477a9d83fc9957141c7da4f566ffa2e3a42c3a7b2c50abfe2eeb8e1433afa072caac832f46d963370ce95cb145a71fdc2216a2
@@ -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 &block
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 &block
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) 2017, Matthew Kerwin <matthew@kerwin.net.au>
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
@@ -10,7 +10,7 @@ class Array
10
10
  #
11
11
  # See #delete_if, #reject!
12
12
  #
13
- def delete_all &block
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) 2017, Matthew Kerwin <matthew@kerwin.net.au>
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
@@ -33,7 +33,7 @@ class Numeric
33
33
  # Returns true if not zero.
34
34
  #
35
35
  def to_b
36
- self != 0
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) 2013, Matthew Kerwin <matthew@kerwin.net.au>
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
@@ -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) 2014, Matthew Kerwin <matthew@kerwin.net.au>
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
@@ -9,11 +9,16 @@ 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 *args }
12
+ enum.each {|*args| yield(*args) }
13
13
  end
14
14
  end
15
15
  end
16
16
 
17
+ if RUBY_VERSION >= '2.6'
18
+ warn "warning: Enumerable\#chain defined since Ruby 2.6 is incompatible with this gem when used with args and a block"
19
+ undef chain
20
+ end
21
+
17
22
  #
18
23
  # Creates a chain of Enumerables following this one, and
19
24
  # invokes a block once for each element of each Enumerable.
@@ -21,7 +26,7 @@ module Enumerable
21
26
  def chain *enums
22
27
  return enum_for(:chain, *enums) unless block_given?
23
28
  [self, *enums].each do |enum|
24
- enum.each {|*args| yield *args }
29
+ enum.each {|*args| yield(*args) }
25
30
  end
26
31
  nil
27
32
  end
@@ -20,7 +20,7 @@ module Enumerable
20
20
  #
21
21
  # If no block is given, an enumerator is returned.
22
22
  #
23
- def counts_by &block
23
+ def counts_by &_block
24
24
  return enum_for(:counts_by) unless block_given?
25
25
  hsh = Hash.new{|h,k| h[k] = 0 }
26
26
  each do |j|
@@ -47,7 +47,7 @@ module Enumerable
47
47
  return v if k == key
48
48
  end
49
49
  if args.length > 1
50
- return default
50
+ default
51
51
  elsif block_given?
52
52
  yield key
53
53
  else
@@ -78,12 +78,12 @@ module Enumerable
78
78
  break if remain < 1
79
79
 
80
80
  key_indices = key_map[k]
81
- if key_indices
82
- key_indices.each do |key_index|
83
- result[key_index] = v
84
- define[key_index] = true
85
- remain -= 1
86
- end
81
+ next unless key_indices
82
+
83
+ key_indices.each do |key_index|
84
+ result[key_index] = v
85
+ define[key_index] = true
86
+ remain -= 1
87
87
  end
88
88
  end
89
89
 
@@ -133,6 +133,7 @@ module Enumerable
133
133
  end
134
134
  alias size length
135
135
 
136
+ undef member? # FIXME: do something about this? maybe warn?
136
137
  ##
137
138
  # Returns true if the given key is present in this enum.
138
139
  #
@@ -34,6 +34,16 @@ class FragileMethodChain
34
34
  self
35
35
  end
36
36
 
37
+ # If the object is resolved, defer. Otherwise, sure, I
38
+ # respond to anything, I guess.
39
+ def respond_to_missing? meth, priv
40
+ if __defer?
41
+ @o.respond_to_missing? meth, priv
42
+ else
43
+ true
44
+ end
45
+ end
46
+
37
47
  # Explicitly invoke :_? as a method in the chain.
38
48
  def _? #:nodoc:
39
49
  # Unconditionally invoke it, so the eventual _! doesn't fail
@@ -60,7 +70,7 @@ class Object
60
70
  end
61
71
 
62
72
  =begin
63
- Copyright (c) 2013,2016, Matthew Kerwin <matthew@kerwin.net.au>
73
+ Copyright (c) 2013,2016,2020, Matthew Kerwin <matthew@kerwin.net.au>
64
74
 
65
75
  Permission to use, copy, modify, and/or distribute this software for any
66
76
  purpose with or without fee is hereby granted, provided that the above
@@ -7,7 +7,8 @@ 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 &block # :yields: value
10
+ def map_values &_block # :yields: value
11
+ return enum_for(:map_values) unless block_given?
11
12
  hsh = {}
12
13
  each do |k, v|
13
14
  hsh[k] = yield v
@@ -21,6 +22,7 @@ class Hash
21
22
  # See: #map_values
22
23
  #
23
24
  def map_values! &block # :yields: value
25
+ return enum_for(:map_values!) unless block_given?
24
26
  replace map_values(&block)
25
27
  end
26
28
 
@@ -34,7 +36,8 @@ class Hash
34
36
  # {'a'=>1, 'b'=>2}.map_keys { |k| k*2 } #=> {'aa'=>1, 'bb'=>2}
35
37
  # {'a'=>1, 'b'=>2}.map_keys { "cat" } #=> {'cat'=>2}
36
38
  #
37
- def map_keys &block # :yields: key
39
+ def map_keys &_block # :yields: key
40
+ return enum_for(:map_keys) unless block_given?
38
41
  hsh = {}
39
42
  each do |k, v|
40
43
  hsh[ yield k ] = v
@@ -50,6 +53,7 @@ class Hash
50
53
  # See: #map_keys
51
54
  #
52
55
  def map_keys! &block # :yields: key
56
+ return enum_for(:map_keys!) unless block_given?
53
57
  replace map_keys(&block)
54
58
  end
55
59
 
@@ -63,7 +67,8 @@ class Hash
63
67
  # {'a'=>1, 'b'=>2}.map_pairs { |k,v| [k*2, v+1] } #=> {'aa'=>2, 'bb'=>3}
64
68
  # {'a'=>1, 'b'=>2}.map_pairs { ["cat","dog"] } #=> {'cat'=>'dog'}
65
69
  #
66
- def map_pairs &block # :yields: key, value
70
+ def map_pairs &_block # :yields: key, value
71
+ return enum_for(:map_pairs) unless block_given?
67
72
  hsh = {}
68
73
  each do |k, v|
69
74
  a, b = yield k, v
@@ -73,17 +78,20 @@ class Hash
73
78
  end
74
79
 
75
80
  #
76
- # Replaces the values in +hsh+ by running them each through +block+.
81
+ # Replaces the keys and values in +hsh+ by running them each through +block+.
77
82
  #
78
- # See: #map_values
83
+ # If +block+ returns duplicate keys, they will be overwritten.
84
+ #
85
+ # See: #map_pairs
79
86
  #
80
87
  def map_pairs! &block # :yields: key, value
88
+ return enum_for(:map_pairs!) unless block_given?
81
89
  replace map_pairs(&block)
82
90
  end
83
91
  end
84
92
 
85
93
  =begin
86
- Copyright (c) 2013, Matthew Kerwin <matthew@kerwin.net.au>
94
+ Copyright (c) 2018, Matthew Kerwin <matthew@kerwin.net.au>
87
95
 
88
96
  Permission to use, copy, modify, and/or distribute this software for any
89
97
  purpose with or without fee is hereby granted, provided that the above
@@ -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
@@ -22,8 +22,8 @@ class Iterator < Enumerator
22
22
  # In the second, deprecated, form, a generated Iterator sends the
23
23
  # given method with any +args+ to the iterand.
24
24
  #
25
- # Use of this form is discourages. Use Object#iter_for or
26
- # Object#to_iter instead.
25
+ # Use of this form is discouraged. Use Object#iter_for or
26
+ # Method#to_iter instead.
27
27
  #
28
28
  # @call-seq new(initial, *args) { |obj, *args| ... }
29
29
  # @call-seq new(initial, method=:each, *args)
@@ -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 &b
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 &b
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 &b
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, &b
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) 2016, Matthew Kerwin <matthew@kerwin.net.au>
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
@@ -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) 2016, Matthew Kerwin <matthew@kerwin.net.au>
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
@@ -21,6 +21,15 @@ class MaybeDelegator
21
21
  def method_missing *a, &b #:nodoc:
22
22
  @o && @o.send(*a, &b)
23
23
  end
24
+
25
+ # This is a bit flakey, but I think it's meaningful.
26
+ def respond_to_missing? meth, priv
27
+ if @o
28
+ @o.repond_to_missing? meth, priv
29
+ else
30
+ true
31
+ end
32
+ end
24
33
  end
25
34
 
26
35
  class Object
@@ -42,7 +51,7 @@ class Object
42
51
  end
43
52
 
44
53
  =begin
45
- Copyright (c) 2013, Matthew Kerwin <matthew@kerwin.net.au>
54
+ Copyright (c) 2013,2020, Matthew Kerwin <matthew@kerwin.net.au>
46
55
 
47
56
  Permission to use, copy, modify, and/or distribute this software for any
48
57
  purpose with or without fee is hereby granted, provided that the above
@@ -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(&block)
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, &block)
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) 2017, Matthew Kerwin <matthew@kerwin.net.au>
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
@@ -8,7 +8,7 @@ module Enumerable
8
8
  #
9
9
  # @see Enumerable#sort
10
10
  #
11
- def top n=1, &blk
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, &blk
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, &blk
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) 2014-2017, Matthew Kerwin <matthew@kerwin.net.au>
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
@@ -5,12 +5,13 @@ module Kernel
5
5
  #
6
6
  def with *args
7
7
  return enum_for(:with, *args) unless block_given?
8
- yield *args
8
+ yield(*args)
9
9
  end
10
+ private :with
10
11
  end
11
12
 
12
13
  =begin
13
- Copyright (c) 2018, Matthew Kerwin <matthew@kerwin.net.au>
14
+ Copyright (c) 2019, Matthew Kerwin <matthew@kerwin.net.au>
14
15
 
15
16
  Permission to use, copy, modify, and/or distribute this software for any
16
17
  purpose with or without fee is hereby granted, provided that the above
@@ -0,0 +1,17 @@
1
+ class Test_clamp < Test::Unit::TestCase
2
+
3
+ def test_clamp__endless_range
4
+ rng = (1..)
5
+ assert_raise(RangeError) { 2.clamp(rng) }
6
+ end
7
+
8
+ def test_bound__endless
9
+ rng = (1..)
10
+ assert_raise(RangeError) { rng.bound(2) }
11
+
12
+ rng = (1...)
13
+ assert_raise(RangeError) { rng.bound(2) }
14
+ end
15
+
16
+ end
17
+
@@ -0,0 +1,17 @@
1
+ class Test_clamp < Test::Unit::TestCase
2
+
3
+ def test_clamp__beginless_range
4
+ rng = (..3)
5
+ assert_raise(RangeError) { 2.clamp(rng) }
6
+ end
7
+
8
+ def test_bound__beginless
9
+ rng = (..3)
10
+ assert_raise(RangeError) { rng.bound(2) }
11
+
12
+ rng = (...3)
13
+ assert_raise(RangeError) { rng.bound(2) }
14
+ end
15
+
16
+ end
17
+
@@ -1,54 +1,54 @@
1
1
  require 'test/unit'
2
2
  $VERBOSE = true
3
3
 
4
- class ::DummyClass
5
- def self.dummy_method
6
- :ok
7
- end
8
- def self.clobber_method
9
- :original
10
- end
11
- end
12
-
13
4
  require_relative '../lib/mug/alias'
14
5
  class Test_alias < Test::Unit::TestCase
15
6
 
7
+ class DummyClass
8
+ def self.dummy_method
9
+ :ok
10
+ end
11
+ def self.clobber_method
12
+ :original
13
+ end
14
+ end
15
+
16
16
  def test_alias
17
- assert_equal( :ok, ::DummyClass.dummy_method )
18
- assert_raise(NoMethodError) { ::DummyClass.aliased_method }
17
+ assert_equal( :ok, DummyClass.dummy_method )
18
+ assert_raise(NoMethodError) { DummyClass.aliased_method }
19
19
 
20
- ::DummyClass.instance_eval do
20
+ DummyClass.instance_eval do
21
21
  alias_singleton_method :aliased_method, :dummy_method
22
22
  end
23
23
 
24
- assert_equal( :ok, ::DummyClass.dummy_method )
25
- assert_equal( :ok, ::DummyClass.aliased_method )
24
+ assert_equal( :ok, DummyClass.dummy_method )
25
+ assert_equal( :ok, DummyClass.aliased_method )
26
26
  end
27
27
 
28
28
  def test_alias_safe
29
- assert_equal( :original, ::DummyClass.clobber_method )
29
+ assert_equal( :original, DummyClass.clobber_method )
30
30
 
31
- ::DummyClass.instance_eval do
31
+ DummyClass.instance_eval do
32
32
  alias_singleton_method :unclobbered_method, :clobber_method
33
33
  def self.clobber_method
34
34
  :clobbered
35
35
  end
36
36
  end
37
37
 
38
- assert_equal( :clobbered, ::DummyClass.clobber_method )
39
- assert_equal( :original, ::DummyClass.unclobbered_method )
38
+ assert_equal( :clobbered, DummyClass.clobber_method )
39
+ assert_equal( :original, DummyClass.unclobbered_method )
40
40
  end
41
41
 
42
42
  def test_alias_return
43
43
  result = nil
44
- ::DummyClass.instance_eval do
44
+ DummyClass.instance_eval do
45
45
  result = alias_singleton_method :aliased_method2, :dummy_method
46
46
  end
47
- assert_equal( ::DummyClass, result )
47
+ assert_equal( DummyClass, result )
48
48
  end
49
49
 
50
50
  def test_alias_private
51
- assert_raise(NoMethodError) { ::DummyClass.alias_singleton_method :aliased_method3, :dummy_method }
51
+ assert_raise(NoMethodError) { DummyClass.alias_singleton_method :aliased_method3, :dummy_method }
52
52
  end
53
53
 
54
54
  end
@@ -1,14 +1,15 @@
1
1
  require 'test/unit'
2
2
  $VERBOSE = true
3
3
 
4
- class Foo
5
- def bar a, b
6
- (a||0) + (b||0)
7
- end
8
- end
9
-
10
4
  require_relative '../lib/mug/apply'
11
5
  class Test_apply < Test::Unit::TestCase
6
+
7
+ class Foo
8
+ def bar a, b
9
+ (a||0) + (b||0)
10
+ end
11
+ end
12
+
12
13
  def test_apply_proc
13
14
  prc = proc{|a,b,*c| (a||0) + (b||0) + c.inject(0, &:+) }
14
15
  p1 = prc.apply(1)
@@ -1,29 +1,30 @@
1
1
  require 'test/unit'
2
2
  $VERBOSE = true
3
3
 
4
- $ARRAY = proc { 8.times.to_a }
5
- $TRIES = 40320 # 8 factorial
6
- $MIN = 4
7
- $MAX = 6
4
+ require_relative '../lib/mug/array/samples'
5
+ class Test_array_extend < Test::Unit::TestCase
8
6
 
9
- class MyPRNG
10
- def rand n=1.0
11
- case n
12
- when Integer
13
- n - 1
14
- when Range
15
- n.max
16
- when Float
17
- n.prev_float
7
+ class MyPRNG
8
+ def rand n=1.0
9
+ case n
10
+ when Integer
11
+ n - 1
12
+ when Range
13
+ n.max
14
+ when Float
15
+ n.prev_float
16
+ end
18
17
  end
19
18
  end
20
- end
21
19
 
22
- require_relative '../lib/mug/array/samples'
23
- class Test_array_extend < Test::Unit::TestCase
20
+ ARRAY = proc { 8.times.to_a }
21
+ TRIES = 40320 # 8 factorial
22
+ MIN = 4
23
+ MAX = 6
24
+
24
25
  def test_samples
25
- a = $ARRAY.call
26
- $TRIES.times do
26
+ a = ARRAY.call
27
+ TRIES.times do
27
28
  s = a.samples
28
29
  assert( s.length >= 1 )
29
30
  assert( s.length <= a.length )
@@ -32,11 +33,11 @@ class Test_array_extend < Test::Unit::TestCase
32
33
  end
33
34
  end
34
35
  def test_samples_min
35
- a = $ARRAY.call
36
+ a = ARRAY.call
36
37
  # successes
37
- $TRIES.times do
38
- s = a.samples( :min => $MIN )
39
- assert( s.length >= $MIN )
38
+ TRIES.times do
39
+ s = a.samples( :min => MIN )
40
+ assert( s.length >= MIN )
40
41
  assert( s.length <= a.length )
41
42
  assert( s.uniq == s )
42
43
  assert( s.all? {|n| a.include? n } )
@@ -45,12 +46,12 @@ class Test_array_extend < Test::Unit::TestCase
45
46
  assert_raise( ArgumentError ) { a.samples( :min => -1 ) }
46
47
  end
47
48
  def test_samples_max
48
- a = $ARRAY.call
49
+ a = ARRAY.call
49
50
  # successes
50
- $TRIES.times do
51
- s = a.samples( :max => $MAX )
51
+ TRIES.times do
52
+ s = a.samples( :max => MAX )
52
53
  assert( s.length >= 1 )
53
- assert( s.length <= $MAX )
54
+ assert( s.length <= MAX )
54
55
  assert( s.uniq == s )
55
56
  assert( s.all? {|n| a.include? n } )
56
57
  end
@@ -58,21 +59,21 @@ class Test_array_extend < Test::Unit::TestCase
58
59
  assert_raise( ArgumentError ) { a.samples( :max => -1 ) }
59
60
  end
60
61
  def test_samples_minmax
61
- a = $ARRAY.call
62
+ a = ARRAY.call
62
63
  # successes
63
- $TRIES.times do
64
- s = a.samples( :min => $MIN, :max => $MAX )
65
- assert( s.length >= $MIN )
66
- assert( s.length <= $MAX )
64
+ TRIES.times do
65
+ s = a.samples( :min => MIN, :max => MAX )
66
+ assert( s.length >= MIN )
67
+ assert( s.length <= MAX )
67
68
  assert( s.uniq == s )
68
69
  assert( s.all? {|n| a.include? n } )
69
70
  end
70
71
  # failures
71
- assert_raise( ArgumentError ) { a.samples( :min => $MAX, :max => $MIN ) }
72
+ assert_raise( ArgumentError ) { a.samples( :min => MAX, :max => MIN ) }
72
73
  end
73
74
  def test_samples_random
74
- a = $ARRAY.call
75
- $TRIES.times do
75
+ a = ARRAY.call
76
+ TRIES.times do
76
77
  s = a.samples( :random => Random.new )
77
78
  assert( s.length >= 1 )
78
79
  assert( s.length <= a.length )
@@ -81,8 +82,8 @@ class Test_array_extend < Test::Unit::TestCase
81
82
  end
82
83
  end
83
84
  def test_samples_random2
84
- a = $ARRAY.call
85
- $TRIES.times do
85
+ a = ARRAY.call
86
+ TRIES.times do
86
87
  s = a.samples( :random => MyPRNG.new )
87
88
  assert( s.length >= 1 )
88
89
  assert( s.length <= a.length )
@@ -1,23 +1,23 @@
1
1
  require 'test/unit'
2
2
  $VERBOSE = true
3
3
 
4
- class MyEnum
5
- include Enumerable
6
- def initialize(*a) @a=a; end
7
- def each(&b) @a.each(&b); end
8
- end
9
-
10
- if RUBY_VERSION.to_i >= 2
11
- $truthy = [ 1, 1.0, Float::INFINITY, -Float::INFINITY, (1<<100).coerce(1).first, Rational(1,1), "x", [1], {1=>1}, MyEnum.new(1), [1].each ]
12
- $falsy = [ 0, 0.0, -0.0, Float::NAN, (1<<100).coerce(0).first, Rational(0,1), "", [], {}, MyEnum.new, [].each, RuntimeError.new ]
13
- else
14
- $truthy = [ 1, 1.0, Float::INFINITY, -Float::INFINITY, (1<<100).coerce(1).first, Rational(1,1), "x", [1], {1=>1}, MyEnum.new(1) ]
15
- $falsy = [ 0, 0.0, -0.0, Float::NAN, (1<<100).coerce(0).first, Rational(0,1), "", [], {}, MyEnum.new, RuntimeError.new ]
16
- end
17
-
18
4
  require_relative '../lib/mug/bool'
19
5
  class Test_bool < Test::Unit::TestCase
20
6
 
7
+ class MyEnum
8
+ include Enumerable
9
+ def initialize(*a) @a=a; end
10
+ def each(&b) @a.each(&b); end
11
+ end
12
+
13
+ if RUBY_VERSION.to_i >= 2
14
+ TRUTHY = [ 1, 1.0, Float::INFINITY, -Float::INFINITY, (1<<100).coerce(1).first, Rational(1,1), "x", [1], {1=>1}, MyEnum.new(1), [1].each ]
15
+ FALSY = [ 0, 0.0, -0.0, Float::NAN, (1<<100).coerce(0).first, Rational(0,1), "", [], {}, MyEnum.new, [].each, RuntimeError.new ]
16
+ else
17
+ TRUTHY = [ 1, 1.0, Float::INFINITY, -Float::INFINITY, (1<<100).coerce(1).first, Rational(1,1), "x", [1], {1=>1}, MyEnum.new(1) ]
18
+ FALSY = [ 0, 0.0, -0.0, Float::NAN, (1<<100).coerce(0).first, Rational(0,1), "", [], {}, MyEnum.new, RuntimeError.new ]
19
+ end
20
+
21
21
  alias assert_true assert
22
22
  def assert_false val, msg=UNASSIGNED
23
23
  assert !val, msg
@@ -35,10 +35,10 @@ class Test_bool < Test::Unit::TestCase
35
35
  assert_true( Bool(true), true_msg(true) )
36
36
  assert_false( Bool(false), false_msg(false) )
37
37
  assert_false( Bool(nil), false_msg(false) )
38
- $truthy.each do |o|
38
+ TRUTHY.each do |o|
39
39
  assert_true( Bool(o), true_msg(o) )
40
40
  end
41
- $falsy.each do |o|
41
+ FALSY.each do |o|
42
42
  assert_true( Bool(o), true_msg(o) )
43
43
  end
44
44
  end
@@ -47,10 +47,10 @@ class Test_bool < Test::Unit::TestCase
47
47
  assert_true( true.to_bool, true_msg(true,'to_bool') )
48
48
  assert_false( false.to_bool, false_msg(false,'to_bool') )
49
49
  assert_false( nil.to_bool, false_msg(nil,'to_bool') )
50
- $truthy.each do |o|
50
+ TRUTHY.each do |o|
51
51
  assert_true( o.to_bool, true_msg(o,'to_bool') )
52
52
  end
53
- $falsy.each do |o|
53
+ FALSY.each do |o|
54
54
  assert_true( o.to_bool, true_msg(o,'to_bool') )
55
55
  end
56
56
  end
@@ -59,10 +59,10 @@ class Test_bool < Test::Unit::TestCase
59
59
  assert_true( true.to_b, true_msg(true,'to_b') )
60
60
  assert_false( false.to_b, false_msg(false,'to_b') )
61
61
  assert_false( nil.to_b, false_msg(nil,'to_b') )
62
- $truthy.each do |o|
62
+ TRUTHY.each do |o|
63
63
  assert_true( o.to_b, true_msg(o,'to_b') )
64
64
  end
65
- $falsy.each do |o|
65
+ FALSY.each do |o|
66
66
  assert_false( o.to_b, false_msg(o,'to_b') )
67
67
  end
68
68
  end
@@ -46,6 +46,13 @@ class Test_clamp < Test::Unit::TestCase
46
46
  assert_raise(ArgumentError) { rng.bound(5) }
47
47
  assert_raise(ArgumentError) { rng.bound(6) }
48
48
  end
49
+ end
50
+
51
+ if RUBY_VERSION.to_f >= 2.6
52
+ require_relative '2-6-test-clamp'
53
+ end
49
54
 
55
+ if RUBY_VERSION.to_f >= 2.7
56
+ require_relative '2-7-test-clamp'
50
57
  end
51
58
 
@@ -14,8 +14,8 @@ class Test_enumerable_chain < Test::Unit::TestCase
14
14
  ]
15
15
 
16
16
  result = []
17
- a.chain(b, c) do |*a|
18
- result << a
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 |*a|
39
- result << a
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 |*a|
55
- result << a
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 |*a|
74
- result << a
73
+ enum.each do |*x|
74
+ result << x
75
75
  end
76
76
 
77
77
  assert_equal( expect, result )
@@ -1,19 +1,20 @@
1
1
  require 'test/unit'
2
2
  $VERBOSE = true
3
3
 
4
- class HashLikeEnum
5
- def each
6
- return enum_for(:each) unless block_given?
7
- yield 'a'
8
- yield 'b'
9
- yield 'c'
10
- yield 'd'
11
- end
12
- include Enumerable
13
- end
14
-
15
4
  require_relative '../lib/mug/enumerable/hash-like'
16
5
  class Test_hashlike < Test::Unit::TestCase
6
+
7
+ class HashLikeEnum
8
+ def each
9
+ return enum_for(:each) unless block_given?
10
+ yield 'a'
11
+ yield 'b'
12
+ yield 'c'
13
+ yield 'd'
14
+ end
15
+ include Enumerable
16
+ end
17
+
17
18
  def test__each_pair__block
18
19
  my_enum = HashLikeEnum.new
19
20
  expect = [[0, 'a'], [1, 'b'], [2, 'c'], [3, 'd']]
@@ -1,28 +1,38 @@
1
1
  require 'test/unit'
2
2
  $VERBOSE = true
3
3
 
4
- module FMCTest
5
- class A
6
- def initialize; @b = B.new; end
7
- attr_accessor :b
8
- end
4
+ require_relative '../lib/mug/fragile-method-chain'
5
+ class Test_fmc < Test::Unit::TestCase
9
6
 
10
- class B
11
- def initialize; @c = C.new; end
12
- attr_accessor :c
13
- end
7
+ module FMCTest
8
+ class A
9
+ def initialize; @b = B.new; end
10
+ attr_accessor :b
11
+ end
12
+
13
+ class B
14
+ def initialize; @c = C.new; end
15
+ attr_accessor :c
16
+ end
14
17
 
15
- class C
16
- def to_i; 1; end
18
+ class C
19
+ def to_i; 1; end
20
+ end
17
21
  end
18
- end
19
22
 
20
- def false.c
21
- 2
22
- end
23
+ def self.startup
24
+ class << false
25
+ def c
26
+ 2
27
+ end
28
+ end
29
+ end
30
+ def self.shutdown
31
+ class << false
32
+ undef c
33
+ end
34
+ end
23
35
 
24
- require_relative '../lib/mug/fragile-method-chain'
25
- class Test_fmc < Test::Unit::TestCase
26
36
  def test_fmc_nil
27
37
  a = FMCTest::A.new
28
38
  assert_equal( 1, a._?.b.c.to_i._! )
@@ -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
- x = loop_with_index do |i|
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
- x = loop_with_index(10) do |i|
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
- x = enum.each do |i|
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
- x = enum.each do |i|
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
- x = loop_with_object(o) do |e|
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
- x = enum.each do |e|
97
+ _x = enum.each do |e|
98
98
  a << e
99
99
  break if a.length >= 3
100
100
  end
@@ -1,28 +1,38 @@
1
1
  require 'test/unit'
2
2
  $VERBOSE = true
3
3
 
4
- module MaybeTest
5
- class A
6
- def initialize; @b = B.new; end
7
- attr_accessor :b
8
- end
4
+ require_relative '../lib/mug/maybe'
5
+ class Test_maybe < Test::Unit::TestCase
9
6
 
10
- class B
11
- def initialize; @c = C.new; end
12
- attr_accessor :c
13
- end
7
+ module MaybeTest
8
+ class A
9
+ def initialize; @b = B.new; end
10
+ attr_accessor :b
11
+ end
12
+
13
+ class B
14
+ def initialize; @c = C.new; end
15
+ attr_accessor :c
16
+ end
14
17
 
15
- class C
16
- def to_i; 1; end
18
+ class C
19
+ def to_i; 1; end
20
+ end
17
21
  end
18
- end
19
22
 
20
- def false.c
21
- 2
22
- end
23
+ def self.startup
24
+ class << false
25
+ def c
26
+ 2
27
+ end
28
+ end
29
+ end
30
+ def self.shutdown
31
+ class << false
32
+ undef c
33
+ end
34
+ end
23
35
 
24
- require_relative '../lib/mug/maybe'
25
- class Test_maybe < Test::Unit::TestCase
26
36
  def test_maybe_block_nil
27
37
  a = MaybeTest::A.new
28
38
  assert_equal( 1, a.maybe{ b.maybe{ c } }.to_i )
@@ -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.new('-1') ]
7
- $pos = [ +1, +(2**65), +3.14, Rational(+1,2), BigDecimal.new('+1') ]
8
- $zer = [ 0, 0.0, BigDecimal.new('0') ]
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'
@@ -0,0 +1,37 @@
1
+ require 'test/unit'
2
+ $VERBOSE = true
3
+
4
+ require_relative '../lib/mug/with'
5
+ class Test_with < Test::Unit::TestCase
6
+
7
+ def test_with
8
+ input = [1, 'two', :three]
9
+ output = nil
10
+
11
+ with(*input) do |a, b, c|
12
+ output = [a, b, c]
13
+ end
14
+
15
+ assert_equal( output, input )
16
+ end
17
+
18
+ def test_with__noblock
19
+ input = [1, 'two', :three]
20
+ output = nil
21
+
22
+ enum = with(*input)
23
+ assert_kind_of( Enumerator, enum )
24
+
25
+ enum.each do |a, b, c|
26
+ output = [a, b, c]
27
+ end
28
+
29
+ assert_equal( output, input )
30
+ end
31
+
32
+ def test_with__private
33
+ assert_raise(NoMethodError) { Object.new.with }
34
+ end
35
+
36
+ end
37
+
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.0
4
+ version: 1.3.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: 2018-09-24 00:00:00.000000000 Z
11
+ date: 2020-11-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  == MUG: Matty's Ultimate Gem
@@ -70,6 +70,8 @@ files:
70
70
  - lib/mug/to_h.rb
71
71
  - lib/mug/top.rb
72
72
  - lib/mug/with.rb
73
+ - test/2-6-test-clamp.rb
74
+ - test/2-7-test-clamp.rb
73
75
  - test/test-affix.rb
74
76
  - test/test-alias.rb
75
77
  - test/test-and-or.rb
@@ -106,6 +108,7 @@ files:
106
108
  - test/test-tau.rb
107
109
  - test/test-time.rb
108
110
  - test/test-top.rb
111
+ - test/test-with.rb
109
112
  homepage: http://phluid61.github.com/mug
110
113
  licenses:
111
114
  - ISC
@@ -125,45 +128,47 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
128
  - !ruby/object:Gem::Version
126
129
  version: '0'
127
130
  requirements: []
128
- rubyforge_project:
129
- rubygems_version: 2.7.6
131
+ rubygems_version: 3.1.2
130
132
  signing_key:
131
133
  specification_version: 4
132
134
  summary: 'MUG: Matty''s Ultimate Gem'
133
135
  test_files:
134
- - test/test-fragile-method-chain.rb
135
- - test/test-maybe.rb
136
- - test/test-hashop.rb
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
136
+ - test/test-enumerable-hash-like.rb
137
+ - test/test-clamp.rb
138
+ - test/test-array-delete_all.rb
146
139
  - test/test-rexproc.rb
147
- - test/test-hashmerge.rb
148
- - test/test-array-samples.rb
149
140
  - test/test-tau.rb
150
- - test/test-apply.rb
151
- - test/test-any-and-all.rb
152
- - test/test-clamp.rb
153
- - test/test-iterator-for.rb
141
+ - test/test-matchdata_each.rb
142
+ - test/test-alias.rb
154
143
  - test/test-bittest.rb
155
- - test/test-hashwhen.rb
156
- - test/test-negativity.rb
157
- - test/test-array-delete_all.rb
158
144
  - test/test-iterator.rb
145
+ - test/test-hashwhen.rb
159
146
  - test/test-matchdata_hash.rb
160
- - test/test-self.rb
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
147
+ - test/test-not.rb
167
148
  - test/test-array-extend.rb
149
+ - test/test-iterator-for.rb
150
+ - test/2-6-test-clamp.rb
168
151
  - test/test-top.rb
152
+ - test/test-and-or.rb
169
153
  - test/test-array-to_proc.rb
154
+ - test/test-affix.rb
155
+ - test/test-hashmerge.rb
156
+ - test/test-with.rb
157
+ - test/test-any-and-all.rb
158
+ - test/test-self.rb
159
+ - test/test-enumerable-chain.rb
160
+ - test/test-time.rb
161
+ - test/test-counts.rb
162
+ - test/test-negativity.rb
163
+ - test/test-bool.rb
164
+ - test/test-hashmap.rb
165
+ - test/test-loop-with.rb
166
+ - test/test-maybe.rb
167
+ - test/test-iff.rb
168
+ - test/test-array-samples.rb
169
+ - test/test-hashop.rb
170
+ - test/test-iterator-method.rb
171
+ - test/test-apply.rb
172
+ - test/test-array-minus.rb
173
+ - test/2-7-test-clamp.rb
174
+ - test/test-fragile-method-chain.rb