poker-ranking 1.0.7 → 1.0.8

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.
Files changed (3) hide show
  1. data/lib/card.rb +2 -1
  2. data/lib/poker_ranking.rb +1 -1
  3. metadata +1 -1
data/lib/card.rb CHANGED
@@ -13,7 +13,8 @@ module PokerRanking
13
13
  end
14
14
 
15
15
  def set_value_by_rank_name(rank)
16
- @value = RANKS.index(rank.capitalize) + 2
16
+ index = RANKS.index(rank.capitalize) ? RANKS.index(rank.capitalize) : SHORT_RANKS.index(rank.capitalize)
17
+ @value = index + 2
17
18
  end
18
19
 
19
20
  def worth_less_than(other_hand)
data/lib/poker_ranking.rb CHANGED
@@ -2,5 +2,5 @@ require_relative 'hand'
2
2
  require_relative 'card'
3
3
 
4
4
  module PokerRanking
5
- VERSION = '1.0.7'
5
+ VERSION = '1.0.8'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poker-ranking
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: