aboutsummaryrefslogtreecommitdiff
path: root/ruby/ext/google/protobuf_c/storage.c
Commit message (Collapse)AuthorAgeFilesLines
* Adds support for proto2 syntax for Ruby gem.Harshit Chopra2018-09-271-87/+194
| | | | | | | | | | | | | | | | | | | | | This change only adds basic proto2 support without advanced features like extensions, custom options, maps, etc. The protoc binary now generates ruby code for proto2 syntax. However, for now, it is restricted to proto2 files without advanced features like extensions, in which case it still errors out. This change also modifies the DSL to add proto messages to the DescriptorPool. There is a new DSL Builder#add_file to create a new FileDescriptor. With this, the generated ruby DSL looks something like: Google::Protobuf::DescriptorPool.generated_pool.build do add_file "test.proto" do add_message "foo" do optional :val, :int32, 1 end end end
* Add continuous test for ruby 2.3, 2.4 and 2.5 (#4829)Paul Yang2018-07-021-2/+2
| | | | | | | | | | | | * Add continuous test for ruby 2.3, 2.4 and 2.5 * Change ruby 2.5 to 2.5.0 * No need to provide argument to rb_funcall when argc is 0 * Fix tests for ruby 2.5 * Use rescue instead of assert_raise to accept subclass of error
* Adds a base class for all explicitly raised TypeErrors (#4255)Erik Benoist2018-06-261-17/+17
| | | | | | | | | * This allows for ruby code to catch and handle Protobuf TypeErrors separately from the standard Ruby TypeError * Maintains backwards compatibility by having the new Google::Protobuf::TypeError inherit from the base TypeError. Any code that was catching TypeError should continue to work.
* Merge pull request #2519 from ↵Joshua Haberman2017-11-291-4/+12
|\ | | | | | | | | rubynerd-forks/ruby-fix-repeated-message-type-field unwrap descriptor class before comparison of RepeatedField types
| * handle sanity check for repeating enums correctly@rubynerd2016-12-301-3/+11
| |
| * unwrap descriptor class before comparison of RepeatedField types@rubynerd2016-12-191-1/+1
| | | | | | | | | | | | | | self->field_type_class returns the correct Ruby class, get_def_obj returns the Descriptor object used to generate the Ruby class via msgclass, so to compare the two types we get the msgclass from the descriptor.
* | Allow initializing a chain of protos using only a hashZachary Anker2017-09-201-1/+12
|/
* Ruby: encode and freeze strings when the are assigned or decoded.Josh Haberman2016-07-211-20/+19
|
* Fixed oneof behavior for enums and fixed JRuby.Josh Haberman2016-05-181-2/+11
|
* Ruby oneofs: return default instead of nil for unset fields.Josh Haberman2016-05-181-1/+23
|
* Conform to C89/C90 variable declaration rules.Josh Haberman2015-07-101-18/+30
| | | | | | | | | | | | While we are C99 in general, the Ruby build system for building C extensions enables several flags that throw warnings for C89/C90 variable ordering rules. To avoid spewing a million warnings (or trying to specifically override these warnings with command-line flags, which would be tricky and possibly fragile) we conform to Ruby's world of C89/C90. Change-Id: I0e03e62d95068dfdfde112df0fb16a248a2f32a0
* Ruby C extension speedup: don't re-intern constant string needlessly.Chris Fallin2015-05-191-1/+2
| | | | Also fixed lines with > 80 char length.
* allow a message field to be unsetAdam Greene2015-05-021-1/+3
|
* Updated based on code-review comments.Chris Fallin2015-02-021-13/+31
|
* Addressed code-review comments.Chris Fallin2015-01-261-7/+18
|
* Addressed code-review comments.Chris Fallin2015-01-261-2/+7
|
* Addressed code-review comments.Chris Fallin2015-01-141-40/+38
|
* Support oneofs in MRI Ruby C extension.Chris Fallin2015-01-141-59/+191
|
* Addressed code-review comments.Chris Fallin2015-01-091-6/+8
|
* Addressed code-review comments.Chris Fallin2015-01-061-4/+12
|
* Support for maps in the MRI C Ruby extension.Chris Fallin2015-01-061-38/+135
| | | | | | | | This adds the Map container and support for parsing and serializing maps in the protobuf wire format (as defined by the C++ implementation, with MapEntry submessages in a repeated field). JSON map serialization/parsing are not yet supported as these will require some changes to upb as well.
* Rename protobuf Ruby module to google/protobuf and rework its buildChris Fallin2014-12-121-0/+577
system. The Ruby module build now uses an amalgamated distribution of upb, and successfully builds a Ruby gem called 'google-protobuf' with module 'google/protobuf'.