aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/object/blank.rb
Commit message (Collapse)AuthorAgeFilesLines
* Short-circuit `blank?` on date and time valuesAndrew White2015-09-211-0/+11
| | | | | | | The concept of a blank date or time doesn't make sense so we can short circuit the calls for `blank?` on these classes to gain small speed boost. Fixes #21657
* File encoding is defaulted to utf-8 in Ruby >= 2.1Akira Matsuda2015-09-181-2/+0
|
* docs, make `blank?` behavior clear. Closes #21468. [ci skip]Yves Senn2015-09-021-2/+2
|
* We tenderized the wrong method! Object#try already had the yield option, ↵David Heinemeier Hansson2014-08-291-14/+2
| | | | just needed some tenderloving instance_eval to fit the bill
* Use instance_eval on @tenderlove's suggestion :trollface:David Heinemeier Hansson2014-08-291-4/+5
|
* Update examples to show real worthDavid Heinemeier Hansson2014-08-291-1/+1
|
* Added yield to Object#presenceDavid Heinemeier Hansson2014-08-291-1/+12
|
* blank? and present? commit to return singletons [Xavier Noria & Pavel Pravosud]Xavier Noria2013-12-281-18/+42
| | | | | | | | | | | | | | | | | | The contract of blank? and present? was in principle to return Object, as we generally do, the test suite and description was consistent with that, but some examples had comments like "# => true". This cannot be unclear, we either fix the examples, or update the contract. Since users may be already assuming singletons due to the examples and the fact that they were returned before 30ba7ee, the safest option seems to be to revise the contract and the implementation of String#blank? The motivation for 30ba7ee was to improve the performance of the predicate, the refactor based on === is on par regarding speed. With this commit we start documenting return types using YARD conventions. We plan to document return types gradually.
* Extracted blank matcher regexp to constantPaul Nikitochkin2013-12-281-1/+3
|
* Expand double-negative in String#blank? regexAman Gupta2013-11-201-1/+1
|
* update some AS code examples to 1.9 hash syntax [ci skip]Francesco Rodriguez2012-09-121-8/+1
|
* String quotes and trailing spacesAlexey Gaziev2012-04-291-5/+5
|
* remove unnecessary require core_ext/string/encodingSergey Nartimov2012-02-141-1/+0
|
* remove support for ruby 1.8 in AS String extensionsSergey Nartimov2011-12-211-9/+1
|
* missing require of string/encoding to have access to encoding_aware?Damien Mathieu2011-07-201-0/+1
|
* fix String#blank? on binary strings.Damien Mathieu2011-07-201-1/+6
|
* need magic commentsAkira Matsuda2011-07-141-0/+2
|
* treat fullwidth whitespace as a blank characterAkira Matsuda2011-07-141-1/+5
|
* Remove extra white spaces on ActiveSupport docs.Sebastian Martinez2011-05-231-1/+1
|
* revises comment for blank? methodVijay Dev2011-05-071-3/+3
|
* Revert "Small edit to the if statement simplification for blank? on the ↵Xavier Noria2011-05-061-1/+1
| | | | | | | | | | | | | | Object class. An Object doesn't need to be nil and empty to be blank? just one or the other." Reason: the original code is correct, see !nil && !empty -> !(nil || empty) -> !blank That said, this example has too many negations for my linking. Think should be revised to be more positive and straightforward to read. This reverts commit a4b6e3d9be338e93320606f7cb14759b26ced8df.
* Small edit to the if statement simplification for blank? on the Object ↵Caley Woods2011-05-061-1/+1
| | | | class. An Object doesn't need to be nil and empty to be blank? just one or the other.
* commit copy-edit: simplifies blank? rdoc and revises formattingXavier Noria2011-04-191-24/+23
|
* Revert "Formated docs"Xavier Noria2011-04-191-9/+9
| | | | | | | Reason: "To be blank" and "to be empty" belongs to our everyday terminology, they go in regular font. This reverts commit 280a8709923d2bf707ec4d82ac1e5cb14941da3d.
* Formated docsSebastian Martinez2011-04-181-9/+9
|
* Formatting docsSebastian Martinez2011-04-171-10/+10
|
* Formatting examplesSebastian Martinez2011-04-171-6/+12
|
* Documented String#blank?Sebastian Martinez2011-04-171-1/+7
|
* Documented Hash#blank?Sebastian Martinez2011-04-171-1/+6
|
* Documented Array#blank?Sebastian Martinez2011-04-171-1/+6
|
* Documented TrueClass#blank?Sebastian Martinez2011-04-171-1/+5
|
* Documented FalseClass#blank?Sebastian Martinez2011-04-171-1/+5
|
* Documented NilClass#blank?Sebastian Martinez2011-04-171-1/+5
|
* copy-edits 108561fXavier Noria2011-03-051-1/+1
|
* Adds link to Object.blank? from Object.present?Jonathon D. Jones2011-03-051-1/+1
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-1/+1
| | | | 's/[ \t]*$//' -i {} \;)
* Added Object#presence that returns the object if it's #present? otherwise ↵David Heinemeier Hansson2009-12-271-2/+20
| | | | returns nil [DHH/Colin Kelley]
* blank? and duplicable? are Object extensionsJeremy Kemper2009-03-211-0/+58