Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | applies new string literal convention in activesupport/lib | Xavier Noria | 2016-08-06 | 3 | -6/+6 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | Update class_attribute docs | John Gesimondo | 2016-07-10 | 1 | -1/+1 |
| | |||||
* | Support for unified Integer class in Ruby 2.4+ | Jeremy Daer | 2016-05-18 | 1 | -2/+0 |
| | | | | | | | | Ruby 2.4 unifies Fixnum and Bignum into Integer: https://bugs.ruby-lang.org/issues/12005 * Forward compat with new unified Integer class in Ruby 2.4+. * Backward compat with separate Fixnum/Bignum in Ruby 2.2 & 2.3. * Drops needless Fixnum distinction in docs, preferring Integer. | ||||
* | Test if each_object(singleton_class) works, since JRuby added it. | Charles Oliver Nutter | 2015-11-23 | 1 | -2/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #22376. JRuby 9.0.5.0 will support ObjectSpace.each_object against a class's singleton class, since that's essentially just walking an internal subclasses structure we already maintain. This test was too narrow, requiring that each_object support an arbitrary class but only actually needing it to work against a class's singleton. This improves performance of Class.descendants by nearly two orders of magnitude when run against JRuby 9.0.5.0: ```ruby 5.times { puts Benchmark.measure { 100_000.times { Numeric.descendants } } } ``` Before: ``` 11.510000 0.140000 11.650000 ( 10.082384) 9.990000 0.020000 10.010000 ( 9.931233) 10.520000 0.040000 10.560000 ( 10.502978) 10.290000 0.030000 10.320000 ( 10.276027) 10.000000 0.030000 10.030000 ( 9.942429) ``` After: ``` 1.380000 0.040000 1.420000 ( 0.365850) 0.210000 0.000000 0.210000 ( 0.149574) 0.180000 0.020000 0.200000 ( 0.141094) 0.140000 0.000000 0.140000 ( 0.140634) 0.190000 0.010000 0.200000 ( 0.147962) ``` | ||||
* | Add Module#remove_possible_singleton_method | Andrew White | 2015-10-21 | 1 | -1/+10 |
| | | | | | This is primarily to fix method redefinition warnings in class_attribute but may be of use in other places where we define singleton methods. | ||||
* | Remove `.superclass_delegating_accessor`. Refer #14271 | Akshay Vishnoi | 2015-05-24 | 1 | -45/+0 |
| | |||||
* | singleton_class? is already pressent at Ruby 2.2 | Rafael Mendonça França | 2015-01-04 | 1 | -8/+0 |
| | |||||
* | Deprecate Class#superclass_delegating_accessor | Akshay Vishnoi | 2014-03-20 | 1 | -0/+4 |
| | |||||
* | Remove deprecation on active_support/core_ext/class/attribute_accessors ↵ | Jeremy Kemper | 2014-03-15 | 1 | -5/+3 |
| | | | | requires. Appropriate to keep this, users don't care that the implementation got unified. | ||||
* | Prevent creation of instance methods when `instance_reader = false`, Grammar ↵ | Akshay Vishnoi | 2013-12-19 | 1 | -8/+9 |
| | | | | checks, Conditional statements combined | ||||
* | Unify cattr and mattr accessors declarations | Genadi Samokovarov | 2013-12-02 | 1 | -180/+5 |
| | |||||
* | Merge remote-tracking branch 'docrails/master' | Xavier Noria | 2013-11-24 | 1 | -1/+1 |
|\ | | | | | | | | | | | Conflicts: activesupport/lib/active_support/core_ext/hash/deep_merge.rb activesupport/lib/active_support/core_ext/hash/keys.rb | ||||
| * | Change syntax format for example returned values | Prem Sichanugrist | 2013-11-11 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | According to our guideline, we leave 1 space between `#` and `=>`, so we want `# =>` instead of `#=>`. Thanks to @fxn for the suggestion. [ci skip] | ||||
* | | Unify `cattr_*` interface: allow to pass a block to `cattr_reader`. | Alexey Chernenkov | 2013-11-15 | 1 | -0/+11 |
|/ | | | | | | | | | Example: class A cattr_reader(:defr) { 'default_reader_value' } end A.defr # => 'default_reader_value' | ||||
* | Fix `singleton_class?` | Vipul A M | 2013-10-15 | 1 | -2/+5 |
| | | | | | Due to changes from http://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/39628 current `singleton_class?` implementation fails. Changed based on reference from http://bugs.ruby-lang.org/issues/7609 | ||||
* | Remove a comment related to 920753f | Robin Dupret | 2013-06-26 | 1 | -1/+0 |
| | | | Since 920753f, double assignment isn't used anymore | ||||
* | this variable is used, so we don't have to use double assignments | Aaron Patterson | 2013-05-15 | 1 | -1/+1 |
| | |||||
* | more descriptive NameError's messages for class attributes | Hrvoje Šimić | 2013-04-17 | 1 | -2/+2 |
| | |||||
* | Add option to Class#class_attribute for skipping the query method | Agis- | 2013-04-06 | 1 | -3/+5 |
| | |||||
* | removing out of date comment. ↵ | Aaron Patterson | 2013-03-12 | 1 | -3/+0 |
| | | | | :heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart: @pixeltrix | ||||
* | drop memory consumption and startup speed by switching to define_method | Aaron Patterson | 2013-03-12 | 1 | -23/+28 |
| | |||||
* | Change Class#subclasses doc example | Dalibor Nasevic | 2013-02-06 | 1 | -2/+2 |
| | |||||
* | Remove 'assigned but unused variable' warning | Arun Agrawal | 2012-12-28 | 1 | -1/+2 |
| | |||||
* | Add comment about implementation of class_attribute | Andrew White | 2012-12-06 | 1 | -0/+3 |
| | | | | | | | To prevent future pull requests like #8435 add a comment about the implementation of class_attribute using class_eval for performance. [ci skip] | ||||
* | Replace comments' non-breaking spaces with spaces | claudiob | 2012-12-04 | 1 | -1/+1 |
| | | | | | | | | | | 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. | ||||
* | update AS/core_ext docs [ci skip] | Francesco Rodriguez | 2012-09-12 | 1 | -3/+3 |
| | |||||
* | Revert "DRY class_attribute code" | José Valim | 2012-07-30 | 1 | -3/+6 |
| | | | | | | | class_attribute is a building block and using define_method can be much slower for such basic method definitions. This reverts commit d59208d7032e2be855a89ad8d4685cc08dd7cdb3. | ||||
* | DRY class_attribute code | Aleksandr Zykov | 2012-07-29 | 1 | -6/+3 |
| | |||||
* | remove :nodoc: from Class#subclasses [ci skip] | Francesco Rodriguez | 2012-05-28 | 1 | -4/+10 |
| | |||||
* | Add instance_accessor option to class_attribute | Alexey Vakhov | 2012-05-22 | 1 | -2/+4 |
| | |||||
* | cut some duplication and minor edits [ci skip] | Vijay Dev | 2012-05-08 | 1 | -37/+4 |
| | |||||
* | added docs to cattr_reader | Francesco Rodriguez | 2012-05-07 | 1 | -0/+27 |
| | |||||
* | better docs for cattr_accessor and cattr_writer | Francesco Rodriguez | 2012-05-07 | 1 | -2/+14 |
| | |||||
* | added docs and examples to cattr_writer method | Francesco Rodriguez | 2012-05-07 | 1 | -5/+41 |
| | |||||
* | added docs to cattr_accessor method | Francesco Rodriguez | 2012-05-07 | 1 | -12/+50 |
| | |||||
* | adding example about using cattr_accessor with subclasses | Francesco Rodriguez | 2012-05-07 | 1 | -0/+8 |
| | |||||
* | String quotes and trailing spaces | Alexey Gaziev | 2012-04-29 | 1 | -2/+2 |
| | |||||
* | Indentation for private methods | Alexey Gaziev | 2012-04-29 | 2 | -20/+18 |
| | | | | https://github.com/rails/rails/commit/e7d55f734aae204115d0a04a2db774ac364c1312 | ||||
* | AS core_ext refactoring | Alexey Gaziev | 2012-04-29 | 1 | -1/+1 |
| | |||||
* | validate attribute names in class and module attribute accessors | Dmitry Plashchynski | 2012-03-30 | 1 | -0/+2 |
| | |||||
* | remove unused require from AS/core_ext/class/delegating_att.rb | Vishnu Atrai | 2012-03-10 | 1 | -2/+0 |
| | |||||
* | simplify Class#descendants using singleton_class method | Sergey Nartimov | 2012-01-04 | 1 | -1/+1 |
| | |||||
* | use correct variant of checking whether class is a singleton | Sergey Nartimov | 2012-01-03 | 1 | -1/+1 |
| | |||||
* | Revert "Merge pull request #4220 from bensie/singleton-class-master" | Jon Leighton | 2011-12-28 | 1 | -1/+14 |
| | | | | | | | This reverts commit 90df0d4f687596943bda108ab0b98dd99cacd46b, reversing changes made to 5e6fc81d63837559a393c173eade281ddeb687dd. Reason: build breakage | ||||
* | Further simplify singleton_class checking in class_attribute | James Miller | 2011-12-28 | 1 | -14/+1 |
| | |||||
* | simplify singleton_class? method | Aaron Patterson | 2011-07-23 | 1 | -7/+1 |
| | |||||
* | Ugh, the class_attribute pull request broke the build. fix it. | José Valim | 2011-06-19 | 1 | -7/+4 |
| | |||||
* | Add option to omit creating an instance reader method on class_attribute | James Miller | 2011-06-18 | 1 | -7/+20 |
| | |||||
* | Added instance_accessor: false as an option to Class#cattr_accessor and ↵ | David Heinemeier Hansson | 2011-06-13 | 1 | -2/+3 |
| | | | | friends [DHH] | ||||
* | Removed deprecated methods and related tests from ActiveSupport | Josh Kalderimis | 2011-05-25 | 1 | -178/+0 |
| |