wsmyth_palindrome 0.2.0 → 0.3.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: 298e28a61e899bcf8568c784228a2d43a287b5ba9a0cbbcfb4edc3847e08d10c
4
- data.tar.gz: 606eaa7bb441950564efca187d7ed2530aae636ba09f51d19fc0ebec631ae3bc
3
+ metadata.gz: ba186906ab38b6fdd27df36855518000dc4614a4e07ddd8039aace367b37c3cf
4
+ data.tar.gz: 470c10ddafba632db36b9abb4a81e3e96bfcdcb730d2d00102076defa78f12f6
5
5
  SHA512:
6
- metadata.gz: 3f8fb86de83b4601c6ca25083901b1dac607277733e2a36d82c62b5376e558ac3488835b6a4cc14814226b42912a160d86834d8d096375111629f12902102e0a
7
- data.tar.gz: 1f65c491109134b456939991f051e506609c967fd486c2dae267e1c461d89b96a3d3aeb6718c32d61d41d5adfce86742e9818e581f78bd0f31ce24fff7f4dc0a
6
+ metadata.gz: 771e4a3fb7907f04da9d5d0ab63b29aaecf333129bb43a3416e5ed68b3a86f6ff91c5c644a69ac664c5da9ce7d2d953e13fc5b536ba0344a67108e89d31aed86
7
+ data.tar.gz: 4f75570c7869d48339d36646c4017417e512e3a463572edaf089c0e01003f8419b173f47672b08667f572c037accf174841e5816c9ee3443fc39a83245203134
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wsmyth_palindrome (0.2.0)
4
+ wsmyth_palindrome (0.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -4,7 +4,11 @@ module WsmythPalindrome
4
4
 
5
5
  # Returns true for a palindrome, false otherwise.
6
6
  def palindrome?
7
- processed_content == processed_content.reverse
7
+ if processed_content.empty?
8
+ false
9
+ else
10
+ processed_content == processed_content.reverse
11
+ end
8
12
  end
9
13
 
10
14
 
@@ -12,7 +16,7 @@ module WsmythPalindrome
12
16
 
13
17
  # Returns content for palindrome testing
14
18
  def processed_content
15
- to_s.scan(/[a-z\d]/i).join.downcase
19
+ to_s.scan(/[a-z]/i).join.downcase
16
20
  end
17
21
  end
18
22
 
@@ -1,3 +1,3 @@
1
1
  module WsmythPalindrome
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wsmyth_palindrome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Warren Smyth
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-17 00:00:00.000000000 Z
11
+ date: 2021-01-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Learn Enough Ruby palindrome detector
14
14
  email: