google-protobuf 4.28.0.rc.1-java → 4.28.0.rc.2-java
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of google-protobuf might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/google/protobuf/ffi/internal/convert.rb +11 -4
- data/lib/google/protobuf_java.jar +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fcb3ed9298cd0a500eb0e97cd86d03490e595922399cefa8d42abcc3bca195e
|
4
|
+
data.tar.gz: 1101b07f920525258833ed4a0056515151cebb787ef762904961740d4efed7b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e619f0f74e6e738205c830d94594f049bcad17e195d5698db7200909b6c24710eeb4eb6eff220dc27b51ee706e488ef49018cfb6dda98f6471dd87cd4bf855d4
|
7
|
+
data.tar.gz: 8b0b36f1431fb7075fcae1f6056da590462d7b8109ecbe6abf3241e703cf8904f8186df19967e060ae735c0586bfd1f7773d53bec78f2151be411565e2220045
|
@@ -33,11 +33,18 @@ module Google
|
|
33
33
|
return_value[:bool_val] = value
|
34
34
|
when :string
|
35
35
|
raise TypeError.new "Invalid argument for string field '#{name}' (given #{value.class})." unless value.is_a?(String) or value.is_a?(Symbol)
|
36
|
-
|
36
|
+
value = value.to_s if value.is_a?(Symbol)
|
37
|
+
if value.encoding == Encoding::UTF_8
|
38
|
+
unless value.valid_encoding?
|
39
|
+
# TODO:
|
40
|
+
# For now we only warn for this case. We will remove the
|
41
|
+
# warning and throw an exception below in the 30.x release
|
42
|
+
warn "String is invalid UTF-8. This will be an error in a future version."
|
43
|
+
# raise Encoding::InvalidByteSequenceError.new "String is invalid UTF-8"
|
44
|
+
end
|
45
|
+
string_value = value
|
46
|
+
else
|
37
47
|
string_value = value.to_s.encode("UTF-8")
|
38
|
-
rescue Encoding::UndefinedConversionError
|
39
|
-
# TODO - why not include the field name here?
|
40
|
-
raise Encoding::UndefinedConversionError.new "String is invalid UTF-8"
|
41
48
|
end
|
42
49
|
return_value[:str_val][:size] = string_value.bytesize
|
43
50
|
return_value[:str_val][:data] = Google::Protobuf::FFI.arena_malloc(arena, string_value.bytesize)
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-protobuf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.28.0.rc.
|
4
|
+
version: 4.28.0.rc.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Protobuf Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07
|
11
|
+
date: 2024-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -192,7 +192,7 @@ homepage: https://developers.google.com/protocol-buffers
|
|
192
192
|
licenses:
|
193
193
|
- BSD-3-Clause
|
194
194
|
metadata:
|
195
|
-
source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v4.28.0-
|
195
|
+
source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v4.28.0-rc2/ruby
|
196
196
|
post_install_message:
|
197
197
|
rdoc_options: []
|
198
198
|
require_paths:
|