acpc_poker_types 3.1.1 → 3.1.2

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: 1ac1edc74df20ff22ce321770a24c508acf29ad2
4
- data.tar.gz: 7efe0248ddd843e586d9941af349282f3e001672
3
+ metadata.gz: 40e35c505379c352cc0acb6f0b234d556e4b1516
4
+ data.tar.gz: 5a2221b5957336fab744d20865019d5c382cdaff
5
5
  SHA512:
6
- metadata.gz: d50024fe199e9e81ab4200b59937c83e0f24f3864265e1727632d493a865cd7880877e7892137d3e835798f024093e41734306790f9e02282f2fa40445493cfb
7
- data.tar.gz: fbac09f6a3e5370e2bb96b9634de30d80b84877acf41b9f9a627f7ba1da5068d6388f0034633fc47043c3b9b263e755203ff5c37b6f5b0502d03a024957f7000
6
+ metadata.gz: 38c10886b2ee75492068c134f34a3b7944ea1cc842211953a2ef5fa5bd03e4d1c8c26255140c788f8f61b856d6062dd6306b57652ca5b44bc39f5bc86af3c409
7
+ data.tar.gz: 53e540420530a9893222f25a83c9bbdbef24f0c7125ae1501ab768ed2288c3fa97839ab30d90dcb4f04855d2176c5fc83b256a79ad93505ccc866adcf7699c8d
@@ -81,20 +81,20 @@ module AcpcPokerTypes
81
81
  end
82
82
 
83
83
  def validate_action!(action, given_modifier)
84
- if action.to_s.match(/^([#{CONCATONATED_ACTIONS}])\s*(\d*)$/)
85
- else
86
- raise IllegalAction, action.to_s
87
- end
88
- @action, @modifier = $1, $2
84
+ action_string = action.to_s
85
+ raise IllegalAction if action_string.empty?
86
+ @action = action_string[0]
87
+ raise IllegalAction unless ACTIONS.include?(@action)
88
+ @modifier = action_string[1..-1] unless action_string.length < 2
89
89
 
90
- if given_modifier && !@modifier.empty?
90
+ if given_modifier && @modifier && !@modifier.empty?
91
91
  raise(
92
92
  IllegalModification,
93
93
  "in-place modifier: #{@modifier}, explicit modifier: #{given_modifier}"
94
94
  )
95
95
  end
96
96
 
97
- @modifier = if !@modifier.empty?
97
+ @modifier = if @modifier && !@modifier.empty?
98
98
  @modifier
99
99
  elsif given_modifier
100
100
  given_modifier
@@ -1,3 +1,3 @@
1
1
  module AcpcPokerTypes
2
- VERSION = '3.1.1'
2
+ VERSION = '3.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acpc_poker_types
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Morrill
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-10 00:00:00.000000000 Z
11
+ date: 2013-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: process_runner