google-protobuf 4.28.0.rc.1-java → 4.28.0.rc.3-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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: af2555a575401c9c465c5feb6db607044d03ba9bc7921fdc6ebdec54fd52d377
|
4
|
+
data.tar.gz: b37c9c96de35798410a3e47265b1da872fd5dcd2e9cef9a67ca2806c1da43480
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61d876d37a5860131ad526e21620395767ca93bae24cf657c70edaa3a9a3c939f3aeab264611abae05071bf985dbf3cf0b92fe2965dca34a62ca886b199143d2
|
7
|
+
data.tar.gz: 6cbc82e457871badcd536dc7a20ec748fea2ea4bad196777dfaafbb68e6a3f4bdd135f9ed643e1d90185557180cff35d65d04c0f0bd4830cec70fff17c5f8cc0
|
@@ -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.3
|
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-
|
11
|
+
date: 2024-08-22 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-rc3/ruby
|
196
196
|
post_install_message:
|
197
197
|
rdoc_options: []
|
198
198
|
require_paths:
|