ishikota / PokerServer

Poker server using websocket
1 stars 0 forks source link

dealer.serializeでdumpした時に, 変な文字が入ってると,起こるエラー #18

Open ishikota opened 8 years ago

ishikota commented 8 years ago
Could not execute command from {"identifier"=>"{\"channel\":\"RoomChannel\"}", "command"=>"message", "data"=>"{\"action\" : \"declare_action\" , \"poker_action\" : \"call\" , \"bet_amount\" : 100 , \"room_id\"    : 1 , \"player_id\"    : 2 , \"credential\" : \"not used now\"}"}) [Encoding::UndefinedConversionError - "\xB9" from ASCII-8BIT to UTF-8]: /Users/kota/.rvm/gems/ruby-2.3.0@rails_5_0_beta_1/gems/activesupport-5.0.0.beta1/lib/active_support/core_ext/object/json.rb:34:in `encode' | /Users/kota/.rvm/gems/ruby-2.3.0@rails_5_0_beta_1/gems/activesupport-5.0.0.beta1/lib/active_support/core_ext/object/json.rb:34:in `to_json' | /Users/kota/.rvm/gems/ruby-2.3.0@rails_5_0_beta_1/gems/activesupport-5.0.0.beta1/lib/active_support/core_ext/object/json.rb:34:in `to_json' | /Users/kota/.rvm/gems/ruby-2.3.0@rails_5_0_beta_1/gems/activesupport-5.0.0.beta1/lib/active_support/json/encoding.rb:55:in `to_json' | /Users/kota/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/json/common.rb:224:in `generate'
ishikota commented 8 years ago

build_state_dump(table, config).slice("table").to_json でdumpしたtableに"\xB4" が混じってて起きた. Encoding::UndefinedConversionError: "\xB4" from ASCII-8BIT to UTF-8

ishikota commented 8 years ago

objctの状態だけ保存するように,poker_engineの方を設計し直す必要がありそう.