cf-swearjar 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  class Swearjar
2
- VERSION = '1.0.3'
2
+ VERSION = '1.0.4'
3
3
  end
data/lib/swearjar.rb CHANGED
@@ -33,8 +33,8 @@ class Swearjar
33
33
 
34
34
  def scan(string, &block)
35
35
  string = string.to_s
36
- string.scan(/\b[a-zA-Z-]+\b/) do |word|
37
- block.call(word, hash[word.downcase] || hash[word.downcase.gsub(/e?s$/,'')] )
36
+ string.scan(/\b[a-zA-Z-']+\b/) do |word|
37
+ block.call(word, hash[word.downcase])
38
38
  end
39
39
  if match = tester.match_with_result(string)
40
40
  block.call(match.last, match.first)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cf-swearjar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: