aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
Commit message (Collapse)AuthorAgeFilesLines
* removing out of date comment. ↵Aaron Patterson2013-03-121-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_methodAaron Patterson2013-03-121-23/+28
|
* Call String#gsub with Hash directlyAman Gupta2013-03-041-2/+2
|
* Keep second fraction when DateTime#change is called.Chris Baynes2013-02-251-1/+1
|
* Correct comment for (beginning|end)_of_minuteGert Goet2013-02-222-4/+4
|
* Added beginning_of_minute support to core_ext calculations for Time and DateTimeGagan Awhad2013-02-212-0/+27
|
* Change Class#subclasses doc exampleDalibor Nasevic2013-02-061-2/+2
|
* revamps the RDoc of Object#tryXavier Noria2013-01-281-22/+30
|
* no need for \Z, \z is more conciseXavier Noria2013-01-281-1/+1
|
* Merge pull request #8830 from antoinelyset/masterXavier Noria2013-01-281-2/+5
|\ | | | | Improve String#squish whitespaces matching
| * Improve String#squish whitespaces matchingAntoine Lyset2013-01-221-2/+5
| |
* | Merge remote-tracking branch 'docrails/master'Xavier Noria2013-01-261-1/+1
|\ \ | |/ |/| | | | | | | Conflicts: actionpack/lib/action_view/helpers/form_options_helper.rb guides/code/getting_started/app/controllers/comments_controller.rb
| * Clarified the minute option on DateTime#changeJakob Waller2013-01-101-1/+1
| |
* | Use `DateTime.parse` inside `String#to_datetime`Andrew White2013-01-211-8/+1
| | | | | | | | | | | | | | | | | | | | Use the standard library's `DateTime.parse` because it's marginally faster and supports partial date/time strings. Benchmark: user system total real old 3.980000 0.000000 3.980000 ( 3.987606) new 3.640000 0.010000 3.650000 ( 3.641342)
* | Standardise the return value of `to_time`Andrew White2013-01-211-17/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit standardises the return value of `to_time` to an instance of `Time` in the local system timezone, matching the Ruby core and standard library behavior. The default form for `String#to_time` has been changed from :utc to :local but research seems to suggest the latter is the more common form. Also fix an edge condition with `String#to_time` where the string has a timezone offset in it and the mode is :local. e.g: # Before: >> "2000-01-01 00:00:00 -0500".to_time(:local) => 2000-01-01 05:00:00 -0500 # After: >> "2000-01-01 00:00:00 -0500".to_time(:local) => 2000-01-01 00:00:00 -0500 Closes #2453
* | remove_possible_method -> remove_methodNihad Abbasov2013-01-111-2/+2
| | | | | | | | Date#to_time and Date#xmlschema methods defined in Ruby 1.9.3
* | Updating Array access docs more consistentMatt Bridges2013-01-101-4/+4
| | | | | | | | [ci skip]
* | CVE-2013-0156: Safe XML params parsing. Doesn't allow symbols or yaml.Jeremy Kemper2013-01-081-4/+23
| |
* | Revert "Merge branch 'master-sec'"Jeremy Kemper2013-01-081-23/+4
| | | | | | | | | | This reverts commit 88cc1688d0cb828c17706b41a8bd27870f2a2beb, reversing changes made to f049016cd348627bf8db0d72382d7580bf802a79.
* | Merge branch 'master-sec'Aaron Patterson2013-01-081-4/+23
|\ \ | |/ |/| | | | | | | * master-sec: CVE-2013-0156: Safe XML params parsing. Doesn't allow symbols or yaml. * Strip nils from collections on JSON and XML posts. [CVE-2013-0155] * dealing with empty hashes. Thanks Damien Mathieu
| * CVE-2013-0156: Safe XML params parsing. Doesn't allow symbols or yaml.Jeremy Kemper2013-01-081-4/+23
| |
* | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2013-01-093-6/+6
|\ \ | |/ |/| | | | | Conflicts: guides/source/getting_started.md
| * Correct method notation for #acts_like? [ci skip]Doug Yun2013-01-071-4/+4
| |
| * Instance_variable_names are strings. That is the most important information IMOAkira Matsuda2013-01-081-1/+1
| |
| * prefer american spelling of 'behavior'Gosha Arinich2013-01-071-1/+1
| |
* | Revert some warning removals related to Ruby 2.0Carlos Antonio da Silva2013-01-072-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These warnings were actually a bug in Ruby 2.0, the accessors should not be raising such warnings, they are only meant for ivars. - Revert "fix warnings in Ruby 2.0" This reverts commit 26702a6d3461f4a1c75165030b96886514ecb877. - Revert "Merge pull request #8282 from arunagw/warning_removed_for_ruby2" This reverts commit f63d6544e45e78cda29c0c56fbdf3d9e1f405340, reversing changes made to 3a890681fad8218305585036abed6d7463a44e41.
* | Require 'active_support/core_ext/module/aliasing' in the infinite_comparable ↵Diogo Mafra2013-01-061-0/+1
| | | | | | | | module
* | Remove unnecessary begin..rescue..end, use only rescueAkira Matsuda2013-01-062-17/+14
| |
* | Better error message for String#to_dateKelly Stannard2013-01-041-5/+1
| | | | | | | | | | | | | | | | | | | | I did this because to_date gives a very unhelpful error message if you do not pass in a correct date. In the process I think this cleans up the code nicely and even better it tends to be slightly faster than the current implementation. Benchmark https://gist.github.com/4440875
* | Refactor infinite comparable definition a bitCarlos Antonio da Silva2013-01-041-15/+19
| |
* | Remove unnecessary requiresRafael Mendonça França2013-01-031-2/+0
| |
* | Added ability to compare date/time with infinitybUg2013-01-0410-7/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Date, DateTime, Time and TimeWithZone can now be compared to infinity, so it's now possible to create ranges with one infinite bound and date/time object as another bound. Ex.: @range = Range.new(Date.today, Float::INFINITY) Also it's possible to check inclusion of date/time in range with conversion. Ex.: @range.include?(Time.now + 1.year) # => true @range.include?(DateTime.now + 1.year) # => true Ability to create date/time ranges with infinite bound is required for handling postgresql range types.
* | Change docs to use update instead of update_attributesAmparo Luna + Guillermo Iguaran2013-01-031-1/+1
| |
* | remove meaningless AS::FrozenObjectErrorAkira Matsuda2013-01-021-3/+0
|/
* Remove 'assigned but unused variable' warningArun Agrawal2012-12-281-1/+2
|
* Remove warning of intance variable not initializedRafael Mendonça França2012-12-231-1/+5
|
* Merge pull request #8471 from kytrinyx/refactor-xml-to-hashSteve Klabnik2012-12-211-50/+100
|\ | | | | WIP Refactor xml conversion to hash
| * Refactor Hash.from_xml.Steve Klabnik + Katrina Owen2012-12-211-50/+100
| | | | | | | | | | | | | | | | | | | | | | | | Three basic refactors in this PR: * We extracted the logic into a method object. We now don't define a tone of extraneous methods on Hash, even if they were private. * Extracted blocks of the case statement into methods that do the work. This makes the logic more clear. * Extracted complicated if clauses into their own query methods. They often have two or three terms, this makes it much easier to see what they _do_. We took care not to refactor too much as to not break anything, and put comments where we suspect tests are missing. We think ActiveSupport::XMLMini might be a good candidate to move to a plugin in the future.
* | BufferedLogger is deprecated too.Rafael Mendonça França2012-12-211-1/+1
| |
* | Revert "Make sure that ActiveSupport::Logger includes the Logger extensions ↵David Heinemeier Hansson2012-12-211-19/+2
| | | | | | | | | | | | from core_ext/logger" (some confusion over deprecation) This reverts commit d00f568a83a5159ed93618b1081bd17858536d1c.
* | Make sure that ActiveSupport::Logger includes the Logger extensions from ↵David Heinemeier Hansson2012-12-211-2/+19
| | | | | | | | core_ext/logger
* | Add ActiveSupport::Logger#silence that works the same as the old ↵David Heinemeier Hansson2012-12-211-20/+3
| | | | | | | | Logger#silence extension
* | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-12-211-2/+1
|\ \
| * | Remove Reference to Ruby 1.8.7John Kelly2012-12-201-2/+1
| | |
* | | Fix doc pointing to non existent logger class [ci skip]Carlos Antonio da Silva2012-12-211-1/+1
| | |
* | | Merge pull request #8560 from u16suzu/masterRafael Mendonça França2012-12-201-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix document for String#humanize Conflicts: activesupport/lib/active_support/core_ext/string/inflections.rb
| * | | Fix: documentation for String#humanizeYuichiro Suzuki2012-12-201-2/+2
| | | |
* | | | Add missing requires to core_ext/integer/timePablo Torres2012-12-161-0/+3
| |/ / |/| |
* | | Backport thread-local variables from Ruby 2.0Rafael Mendonça França2012-12-111-0/+70
| | |
* | | Deprecate obsolete Time to DateTime fallback methodsAndrew White2012-12-113-2/+12
| | | | | | | | | | | | | | | | | | | | | The Time.time_with_datetime_fallback, Time.utc_time and Time.local_time methods were added to handle the limitations of Ruby's native Time implementation. Those limitations no longer apply so we are deprecating them in 4.0 and they will be removed in 4.1.