| OLD | NEW |
| 1 # Protocol Buffers - Google's data interchange format | 1 # Protocol Buffers - Google's data interchange format |
| 2 # Copyright 2008 Google Inc. All rights reserved. | 2 # Copyright 2008 Google Inc. All rights reserved. |
| 3 # https://developers.google.com/protocol-buffers/ | 3 # https://developers.google.com/protocol-buffers/ |
| 4 # | 4 # |
| 5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
| 6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
| 7 # met: | 7 # met: |
| 8 # | 8 # |
| 9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
| 10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 # replace | 62 # replace |
| 63 # length, size | 63 # length, size |
| 64 # == | 64 # == |
| 65 # to_ary, to_a | 65 # to_ary, to_a |
| 66 # also all enumerable | 66 # also all enumerable |
| 67 # | 67 # |
| 68 # NOTE: using delegators rather than method_missing to make the | 68 # NOTE: using delegators rather than method_missing to make the |
| 69 # relationship explicit instead of implicit | 69 # relationship explicit instead of implicit |
| 70 def_delegators :to_ary, | 70 def_delegators :to_ary, |
| 71 :&, :*, :-, :'<=>', | 71 :&, :*, :-, :'<=>', |
| 72 :assoc, :bsearch, :combination, :compact, :count, :cycle, | 72 :assoc, :bsearch, :bsearch_index, :combination, :compact, :count, |
| 73 :drop, :drop_while, :eql?, :fetch, :find_index, :flatten, | 73 :cycle, :dig, :drop, :drop_while, :eql?, :fetch, :find_index, :flatten, |
| 74 :include?, :index, :inspect, :join, | 74 :include?, :index, :inspect, :join, |
| 75 :pack, :permutation, :product, :pretty_print, :pretty_print_cycle, | 75 :pack, :permutation, :product, :pretty_print, :pretty_print_cycle, |
| 76 :rassoc, :repeated_combination, :repeated_permutation, :reverse, | 76 :rassoc, :repeated_combination, :repeated_permutation, :reverse, |
| 77 :rindex, :rotate, :sample, :shuffle, :shelljoin, :slice, | 77 :rindex, :rotate, :sample, :shuffle, :shelljoin, :slice, |
| 78 :to_s, :transpose, :uniq, :| | 78 :to_s, :transpose, :uniq, :| |
| 79 | 79 |
| 80 | 80 |
| 81 def first(n=nil) | 81 def first(n=nil) |
| 82 n ? self[0..n] : self[0] | 82 n ? self[0..n] : self[0] |
| 83 end | 83 end |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 end | 179 end |
| 180 end | 180 end |
| 181 results | 181 results |
| 182 end | 182 end |
| 183 end | 183 end |
| 184 | 184 |
| 185 | 185 |
| 186 end | 186 end |
| 187 end | 187 end |
| 188 end | 188 end |
| OLD | NEW |