Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Revert all the stuff to do with disallowing non-public methods for ↵ | Jon Leighton | 2011-08-25 | 1 | -6/+2 |
| | | | | Module#delegate | ||||
* | prefer ends_with? over slicing | Xavier Noria | 2011-08-16 | 1 | -1/+2 |
| | |||||
* | Add a test for delegating a method ending in '=' as this is a special case. | Jon Leighton | 2011-08-15 | 1 | -0/+1 |
| | |||||
* | Need to include public_send | Arun Agrawal | 2011-08-15 | 1 | -0/+1 |
| | |||||
* | Split up the definitions in Module#delegate depending on :allow_nil, and ↵ | Jon Leighton | 2011-08-15 | 1 | -17/+22 |
| | | | | don't use exceptions for flow control in the :allow_nil => true case. | ||||
* | Fix the line number in the backtrace when Module#delegate raises | Jon Leighton | 2011-08-15 | 1 | -1/+1 |
| | |||||
* | Just do the method call directly in Module#delegate, if we can (we cannot ↵ | Jon Leighton | 2011-08-15 | 1 | -1/+4 |
| | | | | for method names ending in '='). Two reasons: 1) it's faster, see https://gist.github.com/1089783 and 2) more importantly, delegate should not allow you to accidentally call private or protected methods. | ||||
* | Refactored to more closely resemble idiom applied for on_nil | Evan Light | 2011-08-05 | 1 | -5/+11 |
| | |||||
* | Remove unnecessary require (happened after fcbde454f6) | Dmitriy Kiriyenko | 2011-08-01 | 1 | -2/+0 |
| | |||||
* | Don't do remove_possible_method when delegate is used. Two reasons: 1) ↵ | Jon Leighton | 2011-07-18 | 1 | -4/+0 |
| | | | | warnings should be shown, and fixed at the source and 2) the code is slow. Fixes #1937. | ||||
* | Simplify boolean logic into ternary. | Ben Orenstein | 2011-06-08 | 1 | -1/+1 |
| | |||||
* | delegate method should treat :prefix => false same as :prefix => nil | Neeraj Singh | 2010-09-01 | 1 | -1/+1 |
| | | | | | | [#5375 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | fisting stack trace [#4349 state:resolved] | Aaron Patterson | 2010-04-08 | 1 | -1/+1 |
| | | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Merge branch 'master' into docrails | wycats | 2010-03-26 | 1 | -1/+7 |
|\ | |||||
| * | Singleton classes returns parent's methods with instance_methods(false) and ↵ | José Valim | 2010-03-19 | 1 | -1/+3 |
| | | | | | | | | this makes remove_method in Module#delegate fail. Add a test case and fix the bug. | ||||
| * | Eliminate warnings for AM on 1.8 | wycats | 2010-03-16 | 1 | -1/+5 |
| | | |||||
* | | reformats an example in the rdoc of delegate | Xavier Noria | 2010-02-06 | 1 | -2/+7 |
| | | |||||
* | | removes that beloved typo you only catch in github colored diff | Xavier Noria | 2010-01-21 | 1 | -1/+1 |
| | | |||||
* | | rewords rdoc about :allow_nil in Module#delegate | Xavier Noria | 2010-01-21 | 1 | -4/+4 |
| | | |||||
* | | a hash has no final key | Xavier Noria | 2010-01-21 | 1 | -2/+2 |
|/ | |||||
* | Allow delegating to nil, because the method might actually exist on it | Bryan Helmkamp | 2009-08-10 | 1 | -4/+9 |
| | |||||
* | Friendlier runtime exception if delegatee is nil | Jeremy Kemper | 2009-06-18 | 1 | -3/+9 |
| | |||||
* | Delegated methods report the expected file/line in backtraces | Jeremy Kemper | 2009-06-18 | 1 | -2/+3 |
| | |||||
* | Refactor ActionView::Template | Yehuda Katz + Carl Lerche | 2009-04-27 | 1 | -1/+3 |
| | | | | | | | | ActionView::Template is now completely independent from template storage, which allows different back ends such as the database. ActionView::Template's only responsibility is to take in the template source (passed in from ActionView::Path), compile it, and render it. | ||||
* | Inline code comments for class_eval/module_eval [#1657 state:resolved] | Xavier Noria | 2008-12-28 | 1 | -3/+3 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Add :allow_nil option to delegate [#1127 state:resolved] | Sergio Gil | 2008-12-21 | 1 | -1/+27 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Ensure only delegations to methods can have an automatic prefix. [#1235 ↵ | Daniel Schierbeck | 2008-11-21 | 1 | -0/+4 |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Simplified the implementation of the :prefix option. | Daniel Schierbeck | 2008-10-19 | 1 | -1/+1 |
| | | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#984 state:committed] | ||||
* | Added documentation of the new :prefix option. | Daniel Schierbeck | 2008-10-19 | 1 | -0/+25 |
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Made the :prefix option on Module#delegate accept a custom prefix. | Daniel Schierbeck | 2008-10-19 | 1 | -1/+1 |
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Added :prefix option to Module#delegate. | Daniel Schierbeck | 2008-10-19 | 1 | -1/+3 |
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Improve documentation coverage and markup | Xavier Noria | 2008-05-02 | 1 | -3/+5 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Document that the delegate method can delegate to things other than just ↵ | Marcel Molina | 2007-12-05 | 1 | -0/+20 |
| | | | | | | methods. Closes #7184 [dcmanges, jeremymcanally] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8311 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | tiny doc patches [lifo] | Rick Olson | 2007-07-25 | 1 | -0/+1 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7236 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Trim typo. | Jeremy Kemper | 2006-05-08 | 1 | -1/+1 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4330 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Document Active Support's Module::delegate. Closes #5002. | Jeremy Kemper | 2006-05-08 | 1 | -2/+27 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4329 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Added delegation support to Module that allows multiple delegations at once ↵ | David Heinemeier Hansson | 2006-02-04 | 1 | -0/+16 |
(unlike Forwardable in the stdlib) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3535 5ecf4fe2-1ee6-0310-87b1-e25e094e27de |