1. 14 Aug, 2019 1 commit
    • Joshua Haberman's avatar
      Roll forward Ruby upb changes now that protobuf Ruby build is fixed (#5866) · 63f324a9
      Joshua Haberman authored
      * Rolled forward again with "Updated upb from defcleanup branch..."
      
      Revert "Revert "Updated upb from defcleanup branch and modified Ruby to use it (#5539)" (#5848)"
      
      This reverts commit 1568deab.
      
      * A few more merge fixes.
      
      * Updated for defcleanup2 branch.
      
      * Fixed upb to define upb_decode().
      
      * Fixed names of nested messages.
      
      * Revert submodule.
      
      * Set -std=gnu90 and fixed warnings/errors.
      
      Some of our Kokoro tests seem to run with this level of warnings,
      and the source strives to be gnu90 compatible.  Enforcing it for
      every build removes the possibility of some errors showing up in
      Kokoro/Travis tests only.
      
      * Fixed remaining warnings with gnu90 mode.
      
      I tried to match warning flags with what Ruby appears to do
      in our Kokoro tests.
      
      * Initialize values registered by rb_gc_register_address().
      
      * Fixed subtle GC bug.
      
      We need to initialize this marked value before creating the instance.
      
      * Truly fix the GC bug.
      
      * Updated upb for mktime() fix.
      
      * Removed XOPEN_SOURCE as we are not using strptime().
      
      * Removed fixed tests from the conformance failure list for Ruby.
      
      * Fixed memory error related to oneof def names.
      
      * Picked up new upb changes re: JSON printing.
      
      * Uncomment concurrent decoding test.
      63f324a9
  2. 10 Jul, 2019 1 commit
    • Chris Gaffney's avatar
      ruby: Improve performance of Google::Protobuf::Timestamp#to_time (#6360) · 7da7bec4
      Chris Gaffney authored
      This changes to_time to use Ruby's built in Time.at with nanos support
      rather than calculating a float and passing it to Time.at. The new
      version runs about 3 times faster than the original version and
      allocates fewer objects.
      
      Warming up --------------------------------------
          protobuf#to_time    57.296k i/100ms
            faster#to_time   133.229k i/100ms
      Calculating -------------------------------------
          protobuf#to_time    635.361k (± 2.1%) i/s -      3.209M in   5.052169s
            faster#to_time      1.873M (± 3.3%) i/s -      9.459M in   5.055169s
      
      Comparison:
            faster#to_time:  1873368.8 i/s
          protobuf#to_time:   635361.4 i/s - 2.95x  slower
      
      Calculating -------------------------------------
          protobuf#to_time   326.000  memsize (   126.000  retained)
                               7.000  objects (     2.000  retained)
                               0.000  strings (     0.000  retained)
            faster#to_time    86.000  memsize (     0.000  retained)
                               1.000  objects (     0.000  retained)
                               0.000  strings (     0.000  retained)
      
      Comparison:
            faster#to_time:         86 allocated
          protobuf#to_time:        326 allocated - 3.79x more
      7da7bec4
  3. 14 May, 2019 1 commit
  4. 13 May, 2019 1 commit
  5. 06 Mar, 2019 2 commits
  6. 08 Jan, 2019 1 commit
  7. 26 Dec, 2018 1 commit
  8. 21 Dec, 2018 1 commit
  9. 29 Oct, 2018 1 commit
  10. 27 Jun, 2018 1 commit
    • Erik Benoist's avatar
      Adds a base class for all explicitly raised TypeErrors (#4255) · 74f8e242
      Erik Benoist authored
      * 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.
      74f8e242
  11. 19 Jun, 2018 1 commit
  12. 25 May, 2018 1 commit
  13. 22 May, 2018 1 commit
  14. 30 Apr, 2018 1 commit
  15. 17 Nov, 2017 1 commit
  16. 28 Jun, 2017 2 commits
  17. 13 May, 2017 1 commit
  18. 07 Dec, 2016 1 commit
  19. 24 Aug, 2016 1 commit
  20. 01 Aug, 2016 1 commit
  21. 29 Jul, 2016 1 commit
  22. 03 Jul, 2016 1 commit
  23. 27 Apr, 2016 1 commit
  24. 04 Feb, 2016 1 commit
  25. 17 Jul, 2015 1 commit
  26. 16 Jul, 2015 1 commit
    • Josh Haberman's avatar
      Added Ruby to conformance tests. · 181c7f26
      Josh Haberman authored
      This involved fixing a few important bugs in the
      Ruby implementation -- mostly cases of mixing
      upb field types and descriptor types (upb field
      types do not distinguish between int/sint/fixed/sfixed
      like descriptor types do).
      
      Also added protobuf-specific exceptions so parse
      errors can be caught specifically.
      
      Change-Id: Ib49d3db976900b2c6f3455c8b88af52cfb86e036
      181c7f26
  27. 14 May, 2015 1 commit
  28. 13 May, 2015 1 commit
    • Adam Greene's avatar
      adding and simplifying encoders/decoders · d1b52a00
      Adam Greene authored
      * make consistent between mri and jruby
      * create a #to_h and have it use symbols for keys
      * add #to_json and #to_proto helpers on the Google::Protobuf message classes
      d1b52a00
  29. 01 May, 2015 1 commit
    • Adam Greene's avatar
      add size alias for length · c70b6058
      Adam Greene authored
      starting to make `RepeatedField` quack like an array
      
      additional changes:
      * make sure gemspec gets all ruby code files
      * add homepage in gem spec removes one of the warnings, and the gem spec authors are pushing
      everyone to include a homepage in the gem
      * remove excess whitespace in test suite to bring formatting inline with the rest of the file
      c70b6058
  30. 10 Mar, 2015 1 commit
  31. 12 Dec, 2014 1 commit