ruby_protobuf 0.4.9 → 0.4.10

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,5 +1,9 @@
1
- === 0.4.9 / 2011-01-17
1
+ === 0.4.10 / 2011-XX-XX
2
2
 
3
+ * 0.4.10
4
+ * Relaxed restriction for field values.
5
+ * Bug fix.
6
+ * Filename for import statements.
3
7
  * 0.4.9
4
8
  * Bug fixes.
5
9
  * EnumValue object in Message#to_hash.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.9
1
+ 0.4.10
@@ -102,7 +102,7 @@ module Protobuf
102
102
  unless File.exist?(File.join(@out_dir, File.basename(proto_file, '.proto') + '.pb.rb'))
103
103
  Compiler.compile(proto_file, @proto_dir, @out_dir)
104
104
  end
105
- proto_file.sub(/\.proto\z/, '')
105
+ proto_file.sub(/\.proto\z/, '.pb')
106
106
  end
107
107
 
108
108
  def create_files(filename, out_dir, file_create)
@@ -309,7 +309,7 @@ module Protobuf
309
309
  end
310
310
 
311
311
  def acceptable?(val)
312
- raise TypeError unless val.instance_of?(String)
312
+ raise TypeError unless val.is_a?(String)
313
313
  true
314
314
  end
315
315
 
@@ -582,7 +582,7 @@ module Protobuf
582
582
  end
583
583
 
584
584
  def acceptable?(val)
585
- raise TypeError unless val.instance_of?(type) || val.instance_of?(Hash)
585
+ raise TypeError unless val.is_a?(type) || val.is_a?(Hash)
586
586
  true
587
587
  end
588
588
 
data/test/test_types.rb CHANGED
@@ -206,6 +206,7 @@ class TypesTest < Test::Unit::TestCase
206
206
  assert_nothing_raised { types.type12 = '' }
207
207
  assert_nothing_raised { types.type12 = 'hello' }
208
208
  assert_nothing_raised { types.type12 = nil }
209
+ assert_nothing_raised { types.type12 = Class.new(String).new('test') }
209
210
  assert_raise(TypeError) { types.type12 = 0 }
210
211
  assert_raise(TypeError) { types.type12 = true }
211
212
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_protobuf
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 9
10
- version: 0.4.9
9
+ - 10
10
+ version: 0.4.10
11
11
  platform: ruby
12
12
  authors:
13
13
  - MATSUYAMA Kengo
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-14 00:00:00 +09:00
18
+ date: 2011-02-22 00:00:00 +09:00
19
19
  default_executable: rprotoc
20
20
  dependencies: []
21
21