aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/object_and_class_ext_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Test try! with a blockAkira Matsuda2013-01-231-0/+4
|
* Add Object#try! with the old NoMethodError raising behaviorDavid Heinemeier Hansson2012-07-271-1/+25
|
* will now return nil instead of raise a NoMethodError if the receiving ↵David Heinemeier Hansson2012-07-271-4/+4
| | | | object does not implement the method
* Object#try can't call private methodsVasiliy Ermolovich2012-05-121-1/+13
|
* use AS::TestCase as the base classAaron Patterson2012-01-051-2/+2
|
* Fixed test_nonexisting_method_with_arguments to revert commit 29a5aeaYasuo Honda2011-10-061-1/+1
|
* Revert "don't raise NoMethodError the tried method doesn't exists"José Valim2011-10-061-1/+1
| | | | This reverts commit 29a5aeaae976bf8432d57ec996c7c81932a39de6.
* make sure missing method does not fail with argumentsdmathieu2011-05-221-0/+6
|
* don't raise NoMethodError the tried method doesn't existsdmathieu2011-05-211-1/+1
|
* Fix activesupport tests. These classes are not used anywherePiotr Sarnacki2010-12-221-12/+0
|
* Add support for try to just yield the object to a block if no method is to ↵raggi2010-11-141-0/+10
| | | | be called. Kind of like a tap_if_present.
* Remove unused methodSantiago Pastorino2010-11-101-31/+0
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-1/+1
| | | | 's/[ \t]*$//' -i {} \;)
* Define a convention for descendants and subclasses.José Valim2010-07-051-49/+0
| | | | | | The former should be symmetric with ancestors and include all children. However, it should not include self since ancestors + descendants should not have duplicated. The latter is symmetric to superclass in the sense it only includes direct children. By adopting a convention, we expect to have less conflict with other frameworks, as Datamapper. For this moment, to ensure ActiveModel::Validations can be used with Datamapper, we should always call ActiveSupport::DescendantsTracker.descendants(self) internally instead of self.descendants avoiding conflicts.
* moves Object#singleton_class to Kernel#singleton_class to match Ruby also ↵Xavier Noria2010-04-051-5/+0
| | | | there, same for #class_eval to simplify, and adds coverage for class_eval
* metaclass deprecated in 2.3.6Jeremy Kemper2010-02-251-7/+0
|
* Use Object#singleton_class instead of #metaclass. Prefer Ruby's choice.Jeremy Kemper2010-02-251-6/+10
|
* Reinstate Object.subclasses_of and Class#descendents for plugin compat.Jeremy Kemper2010-02-091-0/+50
| | | | This reverts commits 7d312e54bad9c39634c137caec07dfc8df471650, 5f981ff0294ba45aa44ad15aa063970b29aeec44, f85f5dfc8ffefff174b695c6363211d342f77a57, 245bfafe335ff883f7a096eab95ac22fe2848679, and ec7c642f5fe60afc857aa64f1a9b4c2be56f9d70
* removes Object#extended_byXavier Noria2010-01-261-7/+0
|
* removes unused method Object#extend_with_included_modules_fromXavier Noria2010-01-261-15/+0
|
* deletes no void files removal.rb and class_test.rbXavier Noria2010-01-261-1/+0
|
* removes unused Object#subclasses_ofXavier Noria2010-01-261-49/+0
|
* removes unused Class#remove_subclassesXavier Noria2010-01-261-21/+0
|
* Object#instance_variable_defined? is not needed for Ruby >= 1.8.7Xavier Noria2009-11-091-7/+0
|
* Remove 'core' fluff. Hookable ActiveSupport.load_all!Jeremy Kemper2009-05-201-1/+1
|
* Fix dependencies revealed by testing in isolationJeremy Kemper2009-04-221-0/+2
|
* Explicit test dependenciesJeremy Kemper2009-03-281-10/+1
|
* Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.Jeremy Kemper2009-03-081-2/+2
| | | | [#1617 state:resolved]
* Change Object#try to raise NoMethodError on private methods and always ↵Pratik Naik2009-01-131-9/+10
| | | | return nil when Object is nil [Pratik Naik, Lawrence Pit]
* Allow optional arguments and/or block for Object#try like Object#send does. ↵Eloy Duran2008-11-241-0/+7
| | | | | | | | [#1425 state:resolved] Original suggestion by Pat Nakajima. Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Added Object#try. ( Taken from http://ozmm.org/posts/try.html ) [Chris ↵Pratik Naik2008-11-191-0/+25
| | | | Wanstrath]
* Get rid of 'Object#send!'. It was originally added because it's in Ruby 1.9, ↵Jeremy Kemper2008-08-311-5/+0
| | | | | | | | | | but it has since been removed from 1.9. Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> Conflicts: actionpack/test/controller/layout_test.rb
* Added Object#metaclassJoshua Peek2008-07-151-0/+8
|
* require abstract_unit directly since test is in load pathJeremy Kemper2008-01-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: introduce instance_variable_names. Closes #10630 [Frederick ↵Jeremy Kemper2007-12-281-0/+4
| | | | | | Cheung] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8499 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Alias Object#send to send! for Ruby 1.9 forward compatibility.Jeremy Kemper2007-09-271-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7658 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Object#copy_instance_variables_from Ruby 1.9 compatJeremy Kemper2007-09-271-6/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7654 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Backport Object#instance_variable_defined? for Ruby < 1.8.6.Jeremy Kemper2007-09-271-0/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7649 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Object#instance_exec produces fewer garbage methods.Jeremy Kemper2007-09-241-2/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7621 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Object.subclasses_of includes anonymous subclasses.Jeremy Kemper2007-09-231-1/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7590 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Increase test coverage for subclasses_of. Closes #7335.Nicholas Seckar2007-01-241-1/+38
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6036 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Object#acts_like? and Time#acts_like_time? and Date#acts_like_date? to ↵Jamis Buck2007-01-151-0/+28
| | | | | | facilitate duck-typing git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5951 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Eliminate Active Support warnings.Jeremy Kemper2006-08-291-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4839 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4487@asus: jeremy | 2006-04-29 12:21:39 -0700Jeremy Kemper2006-07-081-18/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check whether @flash is defined? for warnings-safety. r4488@asus: jeremy | 2006-04-29 12:23:15 -0700 Check whether @flash is defined? for warnings-safety. Obviates nil? check. r4489@asus: jeremy | 2006-04-29 12:45:18 -0700 Check whether @session is defined? for warnings-safety. r4490@asus: jeremy | 2006-04-29 12:50:41 -0700 Check whether @rendering_runtime is defined? for warnings-safety. r4491@asus: jeremy | 2006-04-29 12:55:01 -0700 Check whether @_cycles is defined? for warnings-safety. r4492@asus: jeremy | 2006-04-29 12:59:19 -0700 Check whether instance variables are defined? for warnings-safety. r4493@asus: jeremy | 2006-04-29 13:14:09 -0700 Add nil @template to PrototypeHelperTest to suppress unitialized instance variable warning. r4494@asus: jeremy | 2006-04-29 13:31:34 -0700 Check whether @auto_index defined? for warnings-safety. r4495@asus: jeremy | 2006-04-29 13:32:24 -0700 Wrap content_columns redefinitions with silence_warnings. r4496@asus: jeremy | 2006-04-29 13:35:28 -0700 Wrap more redefinitions with silence_warnings. r4829@asus: jeremy | 2006-07-08 10:59:20 -0700 abstract unit, fix warnings r4830@asus: jeremy | 2006-07-08 11:06:12 -0700 Use parens to silence warning. r4831@asus: jeremy | 2006-07-08 11:06:48 -0700 Use parens to silence warning. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4595 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update Object.subclasses_of to locate nested classes. Update ↵Nicholas Seckar2006-03-261-2/+25
| | | | | | Object.remove_subclasses_of to use Class.remove_class. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4049 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix Object.subclasses_of to only return currently defined objects (closes ↵David Heinemeier Hansson2006-02-191-0/+9
| | | | | | #3882) [Jonathan Viney <jonathan@bluewire.net.nz>] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3607 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added reusable reloading support through the inclusion of the Relodable ↵David Heinemeier Hansson2006-01-291-1/+2
| | | | | | module that all subclasses of ActiveRecord::Base, ActiveRecord::Observer, ActiveController::Base, and ActionMailer::Base automatically gets [DHH]. Added auto-loading support for classes in modules, so Conductor::Migration will look for conductor/migration.rb and Conductor::Database::Settings will look for conductor/database/settings.rb [Nicholas Seckar]. Refactored extensions to module, class, and object in active support [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3493 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Object#instance_exec and Proc#bindSam Stephenson2006-01-231-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3469 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add ActiveSupport::JSON and Object#to_json for converting Ruby objects to ↵Sam Stephenson2005-12-271-0/+7
| | | | | | JSON strings git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3356 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3239@asus: jeremy | 2005-11-20 23:21:37 -0800Jeremy Kemper2005-11-211-5/+5
| | | | | | | Test for absence of instance vars rather than nil so we don't get a warning. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3133 5ecf4fe2-1ee6-0310-87b1-e25e094e27de