aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/object/inclusion.rb
Commit message (Collapse)AuthorAgeFilesLines
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* code gardening: removes redundant selfsXavier Noria2016-08-081-1/+1
| | | | | | | | | 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.
* Improve readability of docs by using code tag [ci skip]amitkumarsuroliya2015-09-241-2/+2
|
* Go with #presence_in instead of #present_in -- it doesnt sound quite as ↵David Heinemeier Hansson2014-02-241-2/+2
| | | | good, but the closer relationship to #presence over #present is ultimately worth it
* Added Object#present_in to simplify value whitelistingDavid Heinemeier Hansson2014-02-181-0/+12
|
* Revert "Object#in? also accepts multiple parameters"Brian Morearty2013-05-011-19/+9
| | | | | | | | | | | | | | | | | | This reverts commit ebf69ab1636df74c76332c53bcd3d8494fb91b45. `in?` must not take multiple parameters because its behavior would be ambiguous: # Test if "B" is included in a list of names with `"B".in?(*names)`: names = ["BMorearty"] "B".in?(*names) # => true names = ["BMorearty","rubyduo"] "B".in?(*names) # => false Conflicts: activesupport/lib/active_support/core_ext/object/inclusion.rb activesupport/test/core_ext/object/inclusion_test.rb
* String quotes and trailing spacesAlexey Gaziev2012-04-291-4/+4
|
* AS core_ext refactoringAlexey Gaziev2012-04-291-2/+2
|
* Object#in? also accepts multiple parametersTadas Tamošauskas2011-11-261-7/+17
|
* Grammar fixes for Object#in? documentation.Cheah Chu Yeow2011-04-221-2/+2
|
* Only rescue a thrown NoMethodError, don't preemptively check for #include?; ↵Jared McFarland2011-04-151-1/+4
| | | | added tests
* added an exception to Object#in? to match the methods documentationJared McFarland2011-04-151-0/+1
|
* Remove `#among?` from Active SupportPrem Sichanugrist2011-04-131-9/+0
| | | | | | After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now. It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
* Change Object#either? to Object#among? -- thanks to @jamesarosen for the ↵David Heinemeier Hansson2011-04-121-2/+2
| | | | suggestion!
* Add support for Object#in? and Object#either? in Active Support [#6321 ↵Prem Sichanugrist, Brian Morearty, John Reitano2011-04-111-0/+20
state:committed] This will allow you to check if an object is included in another object or the list of objects or not. This patch is derived from patch by Brian Morearty and John Reitano on Lighthouse ticket. I've rewrite it and make sure that we support both 'another object' and 'list of objects' version, as it surely be useful to support both.