Skip to content

Commit

Permalink
Added dig and bsearch_index to RepeatedField methods forwarded to array
Browse files Browse the repository at this point in the history
This fixes the test_acts_likes_an_array test in RepeatedFieldTest, which
checks that repeated fields respond to the same methods as regular Ruby
arrays. The bsearch_index and dig array methods seem to be new in Ruby
2.3 and so we should support those.
  • Loading branch information
acozzette committed Apr 27, 2016
1 parent 66f0745 commit bbb68fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ruby/lib/google/protobuf/repeated_field.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class RepeatedField
# relationship explicit instead of implicit
def_delegators :to_ary,
:&, :*, :-, :'<=>',
:assoc, :bsearch, :combination, :compact, :count, :cycle,
:drop, :drop_while, :eql?, :fetch, :find_index, :flatten,
:assoc, :bsearch, :bsearch_index, :combination, :compact, :count,
:cycle, :dig, :drop, :drop_while, :eql?, :fetch, :find_index, :flatten,
:include?, :index, :inspect, :join,
:pack, :permutation, :product, :pretty_print, :pretty_print_cycle,
:rassoc, :repeated_combination, :repeated_permutation, :reverse,
Expand Down

0 comments on commit bbb68fe

Please sign in to comment.