andyh82_palindrome 0.2.0 → 0.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: 374066c3420f0b0c051c712968ebc2f0f6676ca9bac932ffe2e4ef1bf8269d2f
4
- data.tar.gz: '07892369c537b65ac6b73ead99b46c1770f246257348e092c98546034bcd73e3'
3
+ metadata.gz: ac224622f1c731f365e786fc31a226156f08a65c62b1c62666e704ef13ae0c30
4
+ data.tar.gz: dd3c37f365e2c89ae4a16f3841d18cfc88e95a8cb33cdea46be0af99c8b8dc3f
5
5
  SHA512:
6
- metadata.gz: db1d3c6eb34fcbeb2fb970cee50852961379092b8eee7d2ef6e0c7154a8f97730189227683f0ce039536a50aea2f0ce4178f4067473200106f3fd9f92dbd486c
7
- data.tar.gz: b888b32647e5fcd9b687406cdbd1579f37316b4aa48f3039699a378bfc0c3df8116b0cf89f0c9900061c3d986caff9fa4da09738e29b2371ad4327324132811c
6
+ metadata.gz: 6c92ce8f442ae6861bac0dcf58c9a523d1ba3e9438ae647c2511f724558c76275be71832939ca91393f44fb838d26149452ae57aa436f626e395de87dc6a8ec8
7
+ data.tar.gz: 95bcda869d6003e020f235f976f50a97f30ae112c461f43e7ee6273fb066a3083b4c50e4f1c88642d91d1e8fdd10a354985c90daf57b0ff333abb4750c1c4dcf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- andyh82_palindrome (0.2.0)
4
+ andyh82_palindrome (0.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -5,7 +5,11 @@ require_relative "andyh82_palindrome/version"
5
5
  module Andyh82Palindrome
6
6
  # Returns true for a palindrome, false otherwise.
7
7
  def palindrome?
8
- processed_content == processed_content.reverse
8
+ if processed_content.empty? || !processed_content.match?(/\S/)
9
+ return false
10
+ else
11
+ processed_content == processed_content.reverse
12
+ end
9
13
  end
10
14
 
11
15
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Andyh82Palindrome
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: andyh82_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
  - Andrew Huntington
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-20 00:00:00.000000000 Z
11
+ date: 2021-03-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Learn Enough Ruby palindrome detector.
14
14
  email: