html_number_decoder 1.0.2 → 1.0.3

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
  SHA1:
3
- metadata.gz: 07ddab0346ee4c6888acf393bd2c7649d40d84fe
4
- data.tar.gz: 6a8772d8a09e9055ab578f1fe4b7cd90b11b45a7
3
+ metadata.gz: d39bcd7bdc79a5c2fa663a4f08371b9feb908a2e
4
+ data.tar.gz: 157745de105da71890c25998e541a82f14ddff5e
5
5
  SHA512:
6
- metadata.gz: c43939ffa4d80ac0d6c1193594f8626a51bd241122d9ba11486a3a8baf820a417ae5b44ff07e33b62d12e0eaddc932137b25cddcea9a3690e79a4b449224ea9b
7
- data.tar.gz: a56d205e59d58a7b029c6b3c444f5f5f02367424731d72985f8071ac7419fb3bab5c950dcc3ce6ef2fec217188fc1bd59d039116236ac57b07978cd4dc42787c
6
+ metadata.gz: c88f583d70349f11530b97b79516f1eb63d9bc9d199d58cc1672d228fbae1b8eae22dd987719d5553f97d1bd7cf8f0daa1ec5111ada746e8c0d7abe2c73faef1
7
+ data.tar.gz: 22f6211d84e938306abf7f80c182648cfc738b61d652bf749a56a81ae58c697fcb54adee45020c6bf56df2338f614a1edb9f284191f042d0b92715c5c70759ca
@@ -1,3 +1,3 @@
1
1
  module HtmlNumberDecoder
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -4,6 +4,8 @@ module HtmlNumberDecoder
4
4
  PATTERN = /(&#(\d+);)/
5
5
 
6
6
  def self.decode(string)
7
+ return unless string.is_a? String
8
+
7
9
  next_index = string.index(PATTERN)
8
10
  return string if next_index.nil?
9
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html_number_decoder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eli Fatsi