bridge 0.0.18 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.18
1
+ 0.0.19
data/bridge.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{bridge}
8
- s.version = "0.0.18"
8
+ s.version = "0.0.19"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jakub Kuźma"]
data/lib/bridge/deal.rb CHANGED
@@ -112,7 +112,8 @@ module Bridge
112
112
 
113
113
  # Returns hash with hands
114
114
  def to_hash
115
- { "N" => n, "E" => e, "S" => s, "W" => w }
115
+ # use map to be 1.8.6 compatible
116
+ { "N" => n.map{ |c| c.to_s }, "E" => e.map{ |c| c.to_s }, "S" => s.map{ |c| c.to_s }, "W" => w.map{ |c| c.to_s } }
116
117
  end
117
118
 
118
119
  def inspect
data/test/test_deal.rb CHANGED
@@ -125,4 +125,9 @@ class TestDeal < Test::Unit::TestCase
125
125
  deal = Bridge::Deal.from_id(0)
126
126
  assert_equal Hash, deal.to_hash.class
127
127
  end
128
+
129
+ test "to_hash returns hash with arrays of strings" do
130
+ deal = Bridge::Deal.from_id(0)
131
+ assert_equal String, deal.to_hash["N"].first.class
132
+ end
128
133
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 18
9
- version: 0.0.18
8
+ - 19
9
+ version: 0.0.19
10
10
  platform: ruby
11
11
  authors:
12
12
  - "Jakub Ku\xC5\xBAma"