Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use Thread.pass instead of Kernel.sleep to trigger race condition | Guilherme Mansur | 2019-08-05 | 1 | -14/+7 |
| | |||||
* | Able to initalize default value for thread_mattr_* | Guilherme Mansur | 2019-08-05 | 1 | -11/+27 |
| | | | | | | | | | | | | | | | | | Added the ability to initialize `thread_mattr_*` methods with default values like so: ``` ruby class MyClass thread_attr_reader :foo, default: :foo thread_attr_writer :bar, default: :bar thread_attr_accessor: baz do "baz" end end ``` This is consistent with the api exposed by `mattr_accessor`. | ||||
* | Remove deprecated `Module#reachable?` method | Rafael Mendonça França | 2019-01-17 | 1 | -51/+0 |
| | |||||
* | Prefix Module#parent, Module#parents, and Module#parent_name with module | Gannon McGibbon | 2018-10-02 | 1 | -11/+29 |
| | |||||
* | Change the empty block style to have space inside of the block | Rafael Mendonça França | 2018-09-25 | 1 | -1/+1 |
| | |||||
* | Replace `assert !` with `assert_not` | Daniel Colson | 2018-04-19 | 2 | -7/+7 |
| | | | | | This autocorrects the violations after adding a custom cop in 3305c78dcd. | ||||
* | Use assert_predicate and assert_not_predicate | Daniel Colson | 2018-01-25 | 3 | -21/+21 |
| | |||||
* | Use respond_to test helpers | Daniel Colson | 2018-01-25 | 4 | -14/+14 |
| | |||||
* | removed unnecessary returns | Shuhei Kitagawa | 2017-10-28 | 1 | -4/+4 |
| | |||||
* | Deprecate `Module#reachable?` method | bogdanvlviv | 2017-09-17 | 1 | -10/+18 |
| | |||||
* | [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment` | Koichi ITO | 2017-07-11 | 9 | -0/+9 |
| | |||||
* | Use frozen-string-literal in ActiveSupport | Kir Shatrov | 2017-07-09 | 9 | -0/+9 |
| | |||||
* | Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" | Matthew Draper | 2017-07-02 | 9 | -9/+0 |
| | | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa. | ||||
* | Enforce frozen string in Rubocop | Kir Shatrov | 2017-07-01 | 9 | -0/+9 |
| | |||||
* | Implement mattr_acessor :default option | Genadi Samokovarov | 2017-06-03 | 1 | -1/+37 |
| | |||||
* | Correct spelling | Benjamin Fleischer | 2017-02-05 | 1 | -2/+2 |
| | | | | | | | ``` go get -u github.com/client9/misspell/cmd/misspell misspell -w -error -source=text . ``` | ||||
* | Adjust `Module.parent_name` to work when frozen; fixes #27637 | Corey Ward | 2017-01-17 | 1 | -0/+37 |
| | |||||
* | assert_equal takes expectation first | Akira Matsuda | 2016-12-26 | 1 | -3/+3 |
| | |||||
* | Remove deprecated Module.qualified_const_get/set/defined? | Andrew White | 2016-11-14 | 1 | -118/+0 |
| | |||||
* | improve error message when include assertions fail | Michael Grosser | 2016-09-16 | 1 | -3/+3 |
| | | | | | | assert [1, 3].includes?(2) fails with unhelpful "Asserting failed" message assert_includes [1, 3], 2 fails with "Expected [1, 3] to include 2" which makes it easier to debug and more obvious what went wrong | ||||
* | Add three new rubocop rules | Rafael Mendonça França | 2016-08-16 | 3 | -9/+9 |
| | | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository. | ||||
* | Merge pull request #25681 from willnet/fix-thread_mattr_accessor | Yves Senn | 2016-08-08 | 1 | -0/+16 |
|\ | | | | | | | Fix `thread_mattr_accessor` share variable superclass with subclass | ||||
| * | Fix `thread_mattr_accessor` share variable superclass with subclass | willnet | 2016-08-04 | 1 | -4/+24 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation of `thread_mattr_accessor` set variable sharing superclass with subclass. So the method doesn't work as documented. Precondition class Account thread_mattr_accessor :user end class Customer < Account end Account.user = "DHH" Account.user #=> "DHH" Customer.user = "Rafael" Customer.user # => "Rafael" Documented behavior Account.user # => "DHH" Actual behavior Account.user # => "Rafael" Current implementation set variable statically likes `Thread[:attr_Account_user]`, and customer also use it. Make variable name dynamic to use own thread-local variable. | ||||
* | | code gardening: removes redundant selfs | Xavier Noria | 2016-08-08 | 1 | -8/+8 |
| | | | | | | | | | | | | | | | | | | A few have been left for aesthetic reasons, but have made a pass and removed most of them. Note that if the method `foo` returns an array, `foo << 1` is a regular push, nothing to do with assignments, so no self required. | ||||
* | | applies remaining conventions across the project | Xavier Noria | 2016-08-06 | 1 | -2/+0 |
| | | |||||
* | | normalizes indentation and whitespace across the project | Xavier Noria | 2016-08-06 | 4 | -10/+10 |
| | | |||||
* | | modernizes hash syntax in activesupport | Xavier Noria | 2016-08-06 | 1 | -3/+3 |
| | | |||||
* | | applies new string literal convention in activesupport/test | Xavier Noria | 2016-08-06 | 9 | -48/+48 |
|/ | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | Fix `thread_mattr_accessor` thread-local variable naming | Michael Ryan | 2016-03-11 | 1 | -0/+6 |
| | | | | | | | | | | | | | | | | | The current implentation of `thread_mattr_accessor` is setting differently-named thread variables when defining class and instance writer methods, so the method isn't working as documented: Account.user = "DHH" Account.user # => "DHH" Account.new.user # => nil a = Account.new a.user = "ABC" # => "ABC" a.class.user # => "DHH" At this point `:attr_Account_user` and `:attr_Class_user` thread-local variables have been created. Modify the reader and writer methods to use the class name instead of 'Class'. | ||||
* | Use separate test class name | David Heinemeier Hansson | 2015-12-17 | 1 | -1/+1 |
| | |||||
* | Add thread_m/cattr_accessor/reader/writer suite of methods for declaring ↵ | David Heinemeier Hansson | 2015-12-17 | 1 | -0/+109 |
| | | | | class and module variables that live per-thread | ||||
* | Don't leak Object constants in core_ext/module/qualified_const | Genadi Samokovarov | 2015-12-16 | 1 | -60/+70 |
| | |||||
* | Make `Module#redefine_method` to keep method visibility | yui-knk | 2015-10-26 | 1 | -1/+19 |
| | | | | | | | Before this commit `Module#redefine_method` always changes visibility of redefined method to `public`. This commit changes behavior of Module#redefine_method` to keep method visibility. | ||||
* | Add Module#remove_possible_singleton_method | Andrew White | 2015-10-21 | 1 | -3/+15 |
| | | | | | This is primarily to fix method redefinition warnings in class_attribute but may be of use in other places where we define singleton methods. | ||||
* | Regex fix for mattr_accessor validation | Aliaksandr Buhayeu | 2015-10-01 | 1 | -0/+14 |
| | | | | | Change ^ and $ operators to \A and \z to prevent code injection after the line breaks | ||||
* | Only invoke the default block for mattr_accessor once so that it does not ↵ | Lachlan Sylvester | 2015-08-07 | 1 | -0/+6 |
| | | | | cause issues if it is not idempotent | ||||
* | Introduce Concern#class_methods and Kernel#concern | Jeremy Kemper | 2014-02-23 | 1 | -14/+44 |
| | |||||
* | Introduce Module#concerning | Jeremy Kemper | 2013-12-17 | 1 | -0/+35 |
| | | | | | | A natural, low-ceremony way to separate responsibilities within a class. Imported from https://github.com/37signals/concerning#readme | ||||
* | Unify cattr and mattr accessors declarations | Genadi Samokovarov | 2013-12-02 | 1 | -4/+22 |
| | |||||
* | Fix some assert_raise calls containing messages in Active Support | Carlos Antonio da Silva | 2012-10-28 | 1 | -6/+13 |
| | |||||
* | Fix ActiveSupport tests that depend on run order | Francesco Rodriguez | 2012-08-23 | 1 | -11/+18 |
| | |||||
* | validate attribute names in class and module attribute accessors | Dmitry Plashchynski | 2012-03-30 | 1 | -0/+14 |
| | |||||
* | use AS::TestCase as the base class | Aaron Patterson | 2012-01-05 | 3 | -3/+3 |
| | |||||
* | Module#synchronize is deprecated with no replacement. Please use `monitor` ↵ | Aaron Patterson | 2011-11-29 | 1 | -89/+0 |
| | | | | from ruby's standard library. | ||||
* | added remove_method core_ext tests | Anand | 2011-11-07 | 1 | -0/+29 |
| | |||||
* | defines Module#qualified_const_(defined?|get|set) and String#deconstantize | Xavier Noria | 2011-10-29 | 1 | -0/+94 |
| | | | | | | | | | | This commit also implements a faster version of #demodulize I was unable to isolate with git add --patch. Not a big fan of the name #deconstantize. It complements #demodulize getting rid of the rightmost constant, hence the name, but it is unrelated to the well-known #constantize. So unsure. Could not come with anything better, please feel free to rename. | ||||
* | Added instance_accessor: false to Module#mattr_accessor | Vijay Dev | 2011-06-14 | 1 | -0/+7 |
| | |||||
* | Removed deprecated methods and related tests from ActiveSupport | Josh Kalderimis | 2011-05-25 | 1 | -39/+0 |
| | |||||
* | Deprecate attr_accessor_with_default. | José Valim | 2011-05-16 | 1 | -4/+12 |
| | |||||
* | Don't depend on rubygems loading thread (for Mutex) | raggi | 2010-11-25 | 1 | -0/+1 |
| |