SnowArraySort 1.0.15 → 1.0.16

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.
@@ -14,7 +14,7 @@ module SnowArraySort
14
14
  end
15
15
 
16
16
  def self.mergesort(container)
17
- return container if container.size == 1
17
+ return container if (container.size <= 1)
18
18
  mid = container.size / 2
19
19
  left = container[0...mid]
20
20
  right = container[mid...container.size]
@@ -24,7 +24,7 @@ module SnowArraySort
24
24
  def self.merge(left, right)
25
25
  sorted = []
26
26
  until left.empty? or right.empty?
27
- left.first <= right.first ? sorted << left.shift : sorted << right.shift
27
+ (left.first <= right.first) ? sorted << left.shift : sorted << right.shift
28
28
  end
29
29
  sorted + left + right
30
30
  end
@@ -1,4 +1,4 @@
1
1
  module SnowArraySort
2
- VERSION = "1.0.15"
2
+ VERSION = "1.0.16"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: SnowArraySort
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.15
4
+ version: 1.0.16
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: