syllables 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/syllables.rb +3 -2
  2. metadata +1 -1
@@ -23,9 +23,10 @@ class Syllables
23
23
 
24
24
  len = 0
25
25
 
26
- if word[-3..-1] == 'ing' then
26
+ ending_matched = word[/(ing|io)$/]
27
+ if ending_matched then
27
28
  len += 1
28
- word = word[0...-3]
29
+ word = word[0..-(ending_matched.length)]
29
30
  end
30
31
 
31
32
  got = word.scan(Tokenizer)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syllables
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors: []
7
7