php-serialization 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -12,8 +12,8 @@ module PhpSerialization
12
12
  "i:#{object};"
13
13
  when Float then
14
14
  "d:#{object};"
15
- when String then
16
- "s:#{object.length}:\"#{object}\";"
15
+ when String, Symbol then
16
+ "s:#{object.to_s.length}:\"#{object}\";"
17
17
  when Array then
18
18
  idx = -1
19
19
  items = object.map { |item| "#{run(idx += 1)}#{run(item)}" }.join
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{php-serialization}
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Rodrigo Kochenburger"]
@@ -9,6 +9,10 @@ describe "Serialization" do
9
9
  PhpSerialization.dump("Name").should == 's:4:"Name";'
10
10
  end
11
11
 
12
+ it "should serialize a symbol string" do
13
+ PhpSerialization.dump(:name).should == 's:4:"name";'
14
+ end
15
+
12
16
  it "should serialize true" do
13
17
  PhpSerialization.dump(true).should == 'b:1;'
14
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: php-serialization
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Kochenburger