Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | 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 |
| | |||||
* | let (array|hash)/conversions.rb load the extensions in ↵ | Xavier Noria | 2012-10-09 | 1 | -0/+2 |
| | | | | object/to_(param|query).rb | ||||
* | Fix indentation and update documentation for Array#wrap for Ruby 1.9 | Jo Liss | 2012-09-20 | 1 | -9/+10 |
| | |||||
* | update AS/core_ext docs [ci skip] | Francesco Rodriguez | 2012-09-12 | 5 | -10/+9 |
| | |||||
* | Ensure Array#to_sentence does not modify given hash | Carlos Antonio da Silva | 2012-06-26 | 1 | -8/+3 |
| | | | | | Also simplify I18n logic for Array#to_sentence, doing only one lookup for all keys and using merge!, instead of one lookup for each option key. | ||||
* | some copy edits [ci skip] | Vijay Dev | 2012-05-30 | 1 | -4/+4 |
| | |||||
* | Updates Array conversions method documentations and clean ups | Alvaro Pereyra | 2012-05-28 | 1 | -4/+0 |
| | |||||
* | fix empty lines [ci skip] | Francesco Rodriguez | 2012-05-28 | 1 | -1/+0 |
| | |||||
* | Merge branch 'master' of github.com:lifo/docrails | Alvaro Pereyra | 2012-05-28 | 4 | -22/+82 |
|\ | |||||
| * | add :locale option to Array#to_sentence documentation [ci skip] | Francesco Rodriguez | 2012-05-28 | 1 | -0/+27 |
| | | |||||
| * | add examples to Array#to_sentence [ci skip] | Francesco Rodriguez | 2012-05-28 | 1 | -4/+24 |
| | | |||||
| * | update documentation of array/access methods [ci skip] | Francesco Rodriguez | 2012-05-28 | 1 | -8/+16 |
| | | |||||
| * | Update examples of Array #in_groups and #in_groups_of | Alexey Vakhov | 2012-05-25 | 1 | -10/+13 |
| | | | | | | | | | | Examples should be not square to visually underline a difference between Array#in_groups and Array#in_groups_of. | ||||
* | | Updates documentation with cleaner examples and texts [ci skip] | Alvaro Pereyra | 2012-05-28 | 1 | -1/+14 |
| | | |||||
* | | Remove blank trailing comments | Henrik Hodne | 2012-05-20 | 2 | -2/+0 |
|/ | | | | | | | For future reference, this is the regex I used: ^\s*#\s*\n(?!\s*#). Replace with the first match, and voilà! Note that the regex matches a little bit too much, so you probably want to `git add -i .` and go through every single diff to check if it actually should be changed. | ||||
* | remove docs related to ruby 1.8 from Array#wrap | Vasiliy Ermolovich | 2012-05-12 | 1 | -3/+0 |
| | |||||
* | Keep all methods in object/deep_dup | Piotr Sarnacki | 2012-05-06 | 1 | -6/+0 |
| |