Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Added Examples in docs for internal behavior of Array#to_formatted_s [ci skip] | Ronak Jangir | 2015-09-19 | 1 | -1/+3 |
| | |||||
* | Correct ArgumentError message in ActiveSupport conversions docs [ci skip] | amitkumarsuroliya | 2015-09-18 | 1 | -1/+1 |
| | | | This was happened after this commit https://github.com/rails/rails/commit/2ebf47aea21ff8ac10681e53e78dd7a0e5c31c6e | ||||
* | Merge pull request #19814 from y-yagi/array_inquiry | Rafael Mendonça França | 2015-04-19 | 1 | -0/+2 |
|\ | | | | | add missing require for ArrayInquirer | ||||
| * | add missing require for ArrayInquirer | yuuji.yaginuma | 2015-04-19 | 1 | -0/+2 |
| | | |||||
* | | Merge pull request #19799 from yui-knk/fix/wrap_doc2 | Arthur Nogueira Neves | 2015-04-19 | 1 | -3/+4 |
|\ \ | |/ |/| | [ci skip] Fix docs and guide about 'Array.wrap' | ||||
| * | [ci skip] Fix docs and guide about 'Array.wrap' | yui-knk | 2015-04-19 | 1 | -3/+4 |
| | | |||||
* | | [ci skip] Replace `list` with `array` | yui-knk | 2015-04-18 | 1 | -1/+1 |
|/ | |||||
* | Revert "Remove Array#inquiry" | Rafael Mendonça França | 2015-03-30 | 1 | -0/+15 |
| | | | | | | This reverts commit 9420de59f5b7f5ceac77e28e6c326ec145f71f80. Reason: Turns out we want to keep this method. | ||||
* | Remove Array#inquiry | Rafael Mendonça França | 2015-03-27 | 1 | -15/+0 |
| | | | | | We are promoting too much a feature that will not be widler used. So for now lets keep just the ArrayInquirer constructor. | ||||
* | Add ActiveSupport::ArrayInquirer and Array#inquiry | George Claghorn | 2015-03-24 | 1 | -0/+15 |
| | | | | | | | | | | | | | | | | | | | | | | Wrapping an array in an `ArrayInquirer` gives a friendlier way to check its string-like contents. For example, `request.variant` returns an `ArrayInquirer` object. To check a request's variants, you can call: request.variant.phone? request.variant.any?(:phone, :tablet) ...instead of: request.variant.include?(:phone) request.variant.any? { |v| v.in?([:phone, :tablet]) } `Array#inquiry` is a shortcut for wrapping the receiving array in an `ArrayInquirer`: pets = [:cat, :dog] pets.cat? # => true pets.ferret? # => false pets.any?(:cat, :ferret} # => true | ||||
* | Make sure Array#to_sentence always returns a String | David Cornu | 2015-03-23 | 1 | -1/+1 |
| | |||||
* | Move Array#without from Grouping to Access concern and add dedicated test ↵ | David Heinemeier Hansson | 2015-03-02 | 2 | -12/+12 |
| | | | | (relates to #19157) | ||||
* | Add Enumerable#without | Todd Bealmear | 2015-03-01 | 1 | -0/+12 |
| | |||||
* | A little performance improvement using 'take' method over 'first' | Santosh Wadghule | 2015-01-16 | 1 | -1/+1 |
| | |||||
* | Pass symbol as an argument instead of a block | Erik Michaels-Ober | 2014-11-29 | 1 | -1/+1 |
| | |||||
* | Avoid creating range objects (take II) | Akira Matsuda | 2014-10-25 | 1 | -1/+5 |
| | |||||
* | Raise a descriptive error if non-positive integer passed to in_groups_of. | Xavier Shay | 2014-07-30 | 1 | -0/+5 |
| | | | | | | | | | | This is more consistent than the current behaviour of raising a `ZeroDivisionError: divided by 0` error when 0 is given, which can be non-obvious especially if `in_groups_of` is part of a longer chain of methods. The negative case was ok - "ArgumentError: invalid slice size" - but this error is clearer still. | ||||
* | Revert "remove unnecssary require of `to_param`, as `to_query` is already ↵ | Rafael Mendonça França | 2014-06-11 | 1 | -0/+1 |
| | | | | | | | | | | | | | | | | | | | | | require `to_param`" Revert "No need to require to_param, it is already required in to_query.rb" This reverts commits ccdd97662e1fb00c23c90d59f65c091904959561 and d697ee14264a90a39cdbe87857656d8b314ac9b7. Reason by @jeremy: These requires are not for implementation dependency. They ensure that requiring array conversions provides to_query, to_param, and other array conversion behaviors. The fact that to_query is implemented in terms of to_param is just a coincidence. If to_query removed its to_param require, then someone requiring array conversions would no longer have to_param available. This change removes these intentional dependencies on to_param in favor of implementation side effects—an undesirable move that's susceptible to regression. | ||||
* | remove unnecssary require of `to_param`, as `to_query` is already require ↵ | Kuldeep Aggarwal | 2014-06-12 | 1 | -1/+0 |
| | | | | `to_param` | ||||
* | Merge pull request #15276 from kuldeepaggarwal/fix-array-to | Rafael Mendonça França | 2014-05-23 | 1 | -1/+3 |
|\ | | | | | Array#to now accept negative position also. | ||||
| * | revert 96525d63 | Kuldeep Aggarwal | 2014-05-23 | 1 | -1/+3 |
| | | | | | | | | `Array#to` is working for negative position | ||||
* | | add test cases for negative position in Array#from | Kuldeep Aggarwal | 2014-05-23 | 1 | -0/+2 |
|/ | |||||
* | Typo fixes [ci skip] | Akshay Vishnoi | 2013-11-30 | 1 | -2/+2 |
| | |||||
* | Merge pull request #12842 from kuldeepaggarwal/array_split | Guillermo Iguaran | 2013-11-11 | 1 | -3/+3 |
|\ | | | | | Speed up Array#split when block is passed | ||||
| * | Speed up Array#split | KD | 2013-11-11 | 1 | -3/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | Ruby 2.0.0p247 Rehearsal --------------------------------------- old 10.670000 0.150000 10.820000 ( 10.822651) new 8.520000 0.050000 8.570000 ( 8.571825) ----------------------------- total: 19.390000sec user system total real old 10.620000 0.170000 10.790000 ( 10.790409) new 8.570000 0.110000 8.680000 ( 8.686051) | ||||
* | | Merge pull request #12841 from kuldeepaggarwal/in-group-documentation | Yves Senn | 2013-11-10 | 1 | -1/+1 |
|\ \ | |/ |/| | Array#in_groups: documentation updated [ci skip] | ||||
| * | Array#in_groups: documentation updated | KD | 2013-11-11 | 1 | -1/+1 |
| | | |||||
* | | Array#split preserving the calling array | KD | 2013-11-11 | 1 | -2/+2 |
|/ | |||||
* | Add Rdoc document for Array#forty_two | utenmiki | 2013-10-31 | 1 | -0/+2 |
| | |||||
* | Merge branch 'master' of github.com:rails/docrails | Vijay Dev | 2013-07-21 | 1 | -17/+2 |
|\ | |||||
| * | Array#to_formatted_s does not call each element's to_s anymore | Akira Matsuda | 2013-07-11 | 1 | -17/+2 |
| | | | | | | | | Array#to_s calls each element's inspect since ruby 1.9 | ||||
* | | Simplify Array#in_groups_of code | Akira Matsuda | 2013-07-10 | 1 | -3/+1 |
| | | |||||
* | | Speed up Array#split | Akira Matsuda | 2013-07-10 | 1 | -6/+20 |
|/ | | | | | | | Benchmark: user system total real old 0.510000 0.000000 0.510000 ( 0.506749) new 0.330000 0.000000 0.330000 ( 0.336187) | ||||
* | Remove deprecated Array#uniq_by and Array#uniq_by! | Carlos Antonio da Silva | 2013-07-01 | 1 | -19/+0 |
| | | | | Use native Array#uniq and Array#uniq! instead. | ||||
* | Use faster Array.new instead of []*padding | Vipul A M | 2013-05-02 | 1 | -1/+1 |
| | |||||
* | documentation fixes for Array.wrap and AR::Validations::AssociatedValidator | Hrvoje Šimić | 2013-04-17 | 1 | -6/+6 |
| | |||||
* | fix Array#uniq_by! docs [ci skip] | Francesco Rodriguez | 2013-04-04 | 1 | -2/+2 |
| | |||||
* | fix broken format in Array#to_sentence [ci skip] | Francesco Rodriguez | 2013-04-04 | 1 | -3/+5 |
| | |||||
* | Updating Array access docs more consistent | Matt Bridges | 2013-01-10 | 1 | -4/+4 |
| | | | | [ci skip] | ||||
* | prefer american spelling of 'behavior' | Gosha Arinich | 2013-01-07 | 1 | -1/+1 |
| | |||||
* | Remove Reference to Ruby 1.8.7 | John Kelly | 2012-12-20 | 1 | -2/+1 |
| | |||||
* | Replace comments' non-breaking spaces with spaces | claudiob | 2012-12-04 | 1 | -3/+3 |
| | | | | | | | | | | Sometimes, on Mac OS X, programmers accidentally press Option+Space rather than just Space and don’t see the difference. The problem is that Option+Space writes a non-breaking space (0XA0) rather than a normal space (0x20). This commit removes all the non-breaking spaces inadvertently introduced in the comments of the code. | ||||
* | Simplify (and optimize) | Marc-Andre Lafortune | 2012-11-16 | 1 | -3/+3 |
| | |||||
* | Use Integer#div instead of Integer#/ to avoid side effects from mathn | Marc-Andre Lafortune | 2012-11-16 | 1 | -1/+1 |
| | |||||
* | Use `tag!` instead of `method_missing` in `to_xml` conversions. | Nikita Afanasenko | 2012-11-04 | 1 | -3/+3 |
| | | | | Since version `3.0.x` `Builder` caches method passed to `method_missing` each time. This commit replaces `method_missing` call with `tag!` call to prevent method redefinition on each `to_xml` call with the same builder. | ||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-11-03 | 1 | -1/+1 |
|\ | | | | | | | | | | | | | Conflicts: actionpack/lib/action_controller/metal/mime_responds.rb activerecord/lib/active_record/attribute_methods.rb guides/source/working_with_javascript_in_rails.md | ||||
| * | fix output messages - docs [ci skip] | Francesco Rodriguez | 2012-10-22 | 2 | -2/+2 |
| | | |||||
| * | More changes around 1.9 hash syntax | AvnerCohen | 2012-10-21 | 1 | -1/+1 |
| | | | | | | | | Added missing space in previous hash related commit | ||||
* | | Make caller attribute in deprecation methods optional | Alexey Gaziev | 2012-10-30 | 1 | -2/+2 |
|/ | |||||
* | Hash Syntax changes to 1.9 format | AvnerCohen | 2012-10-20 | 1 | -1/+1 |
| |