ActiveSupport::BufferedLogger#flush is deprecated. Set sync on your
filehandle, or tune your filesystem.

Rails 3.1.4 (March 1, 2012)

No changes

Rails 3.1.3 (November 20, 2011)

No changes

Rails 3.1.2 (November 18, 2011)

No changes

Rails 3.1.1 (October 7, 2011)

ruby193: String#prepend is also unsafe Akira Matsuda

Fix obviously breakage of Time.=== for Time subclasses jeremyevans

Added fix so that file store does not raise an exception when cache dir does
not exist yet. This can happen if a delete_matched is called before anything
is saved in the cache. Philippe Huibonhoa

Fixed performance issue where TimeZone lookups would require tzinfo each time Tim Lucas

ActiveSupport::OrderedHash is now marked as extractable when using Array#extract_options! Prem Sichanugrist

Rails 3.1.0 (August 30, 2011)

ActiveSupport::Dependencies#load and ActiveSupport::Dependencies#require now
return the value from superAaron Patterson

Fixed ActiveSupport::Gzip to work properly in Ruby 1.8 Guillermo Iguaran

Kernel.require_library_or_gem was deprecated and will be removed in Rails 3.2.0 Josh Kalderimis

ActiveSupport::Duration#duplicable? was fixed for Ruby 1.8 thedarkone

ActiveSupport::BufferedLogger set log encoding to BINARY, but still use text
mode to output portable newlines. fxn

ActiveSupport::Dependencies now raises NameError if it finds an existing constant in load_missing_constant. This better reflects the nature of the error which is usually caused by calling constantize on a nested constant. Andrew White

Deprecated ActiveSupport::SecureRandom in favour of SecureRandom from the standard library Jon Leighton

New reporting method Kernel#quietly. fxn

Add String#inquiry as a convenience method for turning a string into a StringInquirer object DHH

Add Object#in? to test if an object is included in another object Prem Sichanugrist, Brian Morearty, John Reitano

LocalCache strategy is now a real middleware class, not an anonymous class
posing for pictures.

ActiveSupport::Dependencies::ClassCache class has been introduced for
holding references to reloadable classes.

ActiveSupport::Dependencies::Reference has been refactored to take direct
advantage of the new ClassCache.

Backports Range#cover? as an alias for Range#include? in Ruby 1.8 Diego Carrion, fxn

JSON decoding now uses the multi_json gem which also vendors a json engine called OkJson. The yaml backend has been removed in favor of OkJson as a default engine for 1.8.x, while the built in 1.9.x json implementation will be used by default. Josh Kalderimis

Rails 3.0.12 (March 1, 2012)

No changes.

Rails 3.0.11 (November 18, 2011)

No changes.

Rails 3.0.10 (August 16, 2011)

Delayed backtrace scrubbing in load_missing_constant until we actually
raise the exception

Removed Object#returning, Object#tap should be used instead. Santiago Pastorino

Deprecation behavior is no longer hardcoded to the name of the environment.
Instead, it is set via config.active_support.deprecation and can be one
of :log, :stderr or :notify. :notify is a new style that sends the warning
via ActiveSupport::Notifications, and is the new default for production
Yehuda Katz

Backports Date#>> from 1.9 so that calculations do the right thing around the calendar reform. fxn

Date#to_time handles properly years in the range 0..138. fxn

Deprecate {{}} as interpolation syntax for I18n in favor of %{} José Valim

Array#to_xml is more powerful and able to handle the same types as Hash#to_xml #4490 Neeraj Singh

Harmonize the caching API and refactor the backends. #4452 Brian Durand
All caches:

Add default options to initializer that will be sent to all read, write, fetch, exist?, increment, and decrement

Add support for the :expires_in option to fetch and write for all caches. Cache entries are stored with the create timestamp and a ttl so that expiration can be handled independently of the implementation.

Add support for a :namespace option. This can be used to set a global prefix for cache entries.

Deprecate expand_cache_key on ActiveSupport::Cache and move it to ActionController::Caching and ActionDispatch::Http::Cache since the logic in the method used some Rails specific environment variables and was only used by ActionPack classes. Not very DRY but there didn't seem to be a good shared spot and ActiveSupport really shouldn't be Rails specific.

Add support for :race_condition_ttl to fetch. This setting can prevent race conditions on fetch calls where several processes try to regenerate a recently expired entry at once.

Add support for :compress option to fetch and write which will compress any data over a configurable threshold.

Nil values can now be stored in the cache and are distinct from cache misses for fetch.

Easier API to create new implementations. Just need to implement the methods read_entry, write_entry, and delete_entry instead of overwriting existing methods.

Since all cache implementations support storing objects, update the docs to state that ActiveCache::Cache::Store implementations should store objects. Keys, however, must be strings since some implementations require that.

Increase test coverage.

Document methods which are provided as convenience but which may not be universally available.

MemoryStore:

MemoryStore can now safely be used as the cache for single server sites.

Make thread safe so that the default cache implementation used by Rails is thread safe. The overhead is minimal and it is still the fastest store available.

Provide :size initialization option indicating the maximum size of the cache in memory (defaults to 32Mb).

Add prune logic that removes the least recently used cache entries to keep the cache size from exceeding the max.

Deprecated SynchronizedMemoryStore since it isn't needed anymore.

FileStore:

Escape key values so they will work as file names on all file systems, be consistent, and case sensitive

Use a hash algorithm to segment the cache into sub directories so that a large cache doesn't exceed file system limits.

FileStore can be slow so implement the LocalCache strategy to cache reads for the duration of a request.

Add cleanup method to keep the disk from filling up with expired entries.

Fix increment and decrement to use file system locks so they are consistent between processes.

JSON: encode objects that don't have a native JSON representation using to_hash, if available, instead of instance_values (the old fallback) or to_s (other encoders' default). Encode BigDecimal and Regexp encode as strings to conform with other encoders. Try to transcode non-UTF-8 strings. Jeremy Kemper

All internal Rails JSON encoding is now handled by ActiveSupport::JSON.encode(). Use of #to_json is not recommended, as it may clash with other libraries that overwrite it. However, you can recover Rails specific functionality
if you really want to use #to_json.

require 'active_support' no longer orders the whole menu of core extensions. Ask for just what you need: e.g. require 'active_support/core/time' to use timezones, durations, and stdlib date/time extensions. Jeremy Kemper

Make TimeWithZone#to_formatted_s an alias to TimeWithZone#to_s #1796 Levin Alexander

Introduce Array.wrap(foo) to wrap the argument in an array unless it's already an array. Wraps nil as an empty array. Use instead of Array(foo) and foo.to_a since they treat String as Enumerable. Jeremy Kemper

Move the test related core_ext stuff out of core_ext so it's only loaded by the test helpers. Michael Koziarski

Add Inflection rules for String#humanize. #535 Dan Manges

ActiveSupport::Inflector.inflections do |inflect|
inflect.human(/_cnt$/i, '\1_count')
end

'jargon_cnt'.humanize # => 'Jargon count'

TimeWithZone: when crossing DST boundary, treat Durations of days, months or years as variable-length, and all other values as absolute length. A time + 24.hours will advance exactly 24 hours, but a time + 1.day will advance 23-25 hours, depending on the day. Ensure consistent behavior across all advancing methods Geoff Buesing

Removing unnecessary uses_tzinfo helper from tests, given that TZInfo is now bundled Geoff Buesing

Bundling abbreviated version of TZInfo gem 0.3.8: only the classes and zone definitions required to support Rails time zone features are included. If a recent version of the full TZInfo gem is installed, this will take precedence over the bundled version Geoff Buesing

Ensure that TimeWithZone#to_yaml works when passed a YAML::Emitter. Rick Olson

Ensure correct TimeWithZone#to_date Geoff Buesing

Make TimeWithZone work with tzinfo 0.2.x: use TZInfo::Timezone#zone_identifier alias for #abbreviation, silence warnings on tests. Raise LoadError when TZInfo version is < 0.2 by sniffing for TZInfo::TimeOrDateTime constant. Move all tzinfo-dependent TimeZone tests into uses_tzinfo block Geoff Buesing

TimeWithZone caches TZInfo::TimezonePeriod used for time conversion so that it can be reused, and enforces DST rules correctly when instance is created from a local time Geoff Buesing

Fixed that BufferedLogger should create its own directory if one doesn't already exist #11285 lotswholetime

Fix Numeric time tests broken by DST change by anchoring them to fixed times instead of Time.now. Anchor TimeZone#now DST test to time specified with Time.at instead of Time.local to work around platform differences with Time.local and DST representation Geoff Buesing

Time.days_in_month defaults to current year if no year is supplied as argument #10799 [Radar], uses Date.gregorian_leap? to determine leap year, and uses constant lookup to determine days in month Geoff Buesing

Adding Time and DateTime #compare_with_coercion, which layers behavior on #<=> so that any combination of Time, DateTime and ActiveSupport::TimeWithZone instances can be chronologically compared Geoff Buesing

TimeZone#now returns an ActiveSupport::TimeWithZone Geoff Buesing

Time #in_current_time_zone and #change_time_zone_to_current return self when Time.zone is nil Geoff Buesing

Remove unneeded #to_datetime_default_s alias for DateTime#to_s, given that we inherit a #to_default_s from Date that does exactly the same thing Geoff Buesing

Refactor Time and DateTime #to_formatted_s: use ternary instead of nested if/else Geoff Buesing

Introduce ActiveSupport::TimeWithZone, for wrapping Time instances with a TimeZone. Introduce instance methods to Time for creating TimeWithZone instances, and class methods for managing a global time zone. Geoff Buesing

Replace non-dst-aware TimeZone class with dst-aware class from tzinfo_timezone plugin. TimeZone#adjust and #unadjust are no longer available; tzinfo gem must now be present in order to perform time zone calculations, via #local_to_utc and #utc_to_local methods. Geoff Buesing

TestCase: introduce declared setup and teardown callbacks. Pass a list of methods and an optional block to call before setup or after teardown. Setup callbacks are run in the order declared; teardown callbacks are run in reverse. Jeremy Kemper

Added ActiveSupport::Gzip.decompress/compress(source) as an easy wrapper for Zlib Tobias Lütke

Included MemCache-Client to make the improved ActiveSupport::Cache::MemCacheStore work out of the box Bob Cottrell, Eric Hodel

Added ActiveSupport::Cache:: framework as an extraction from ActionController::Caching::Fragments:: David Heinemeier Hansson

Fixed String#titleize to work for strings with 's too #10571 trek

Changed the implementation of Enumerable#group_by to use a double array approach instead of a hash such that the insert order is honored David Heinemeier Hansson/Marcel Molina Jr.

BufferedLogger#auto_flushing = N flushes the log every N messages. Buffers with an array instead of string. Disabling auto_flushing still flushes when the buffer hits a maximum size, as a failsafe against memory-gobbling. Jeremy Kemper

Fixed Date#xmlschema for dates outside the range of what can be created with Time #9744 Geoff Buesing

Fixed that La Paz was included in -25200 and -14400 offsets when it should only be in -14400 #9735 bermi

Added ActiveSupport::BufferedLogger as a duck-typing alternative (albeit with no formatter) to the Ruby Logger, which provides a very nice speed bump (inspired by Ezra's buffered logger) David Heinemeier Hansson

Removed breakpointer and Binding.of_caller in favor of relying on ruby-debug by Kent Sibilev since the breakpointer has been broken since Ruby 1.8.4 and will not be coming back David Heinemeier Hansson

Added parsing of file type in Hash.xml_in so you can easily do file uploads with base64 from an API David Heinemeier Hansson

Use XSD-compatible type names for Hash#to_xml and make the converters extendable #8047 Tim Pope

Added yielding of builder in Hash#to_xml David Heinemeier Hansson

Hash#with_indifferent_access now also converts hashes kept in arrays to indifferent access (makes it easier to treat HTML and XML parameters the same) David Heinemeier Hansson

Hash#to_xml supports YAML attributes. #7502 jonathan

Refactor ActiveSupport::JSON to be less obtuse. Add support for JSON decoding by way of Syck with ActiveSupport::JSON.decode(json_string). Prevent hash keys that are JavaScript reserved words from being unquoted during encoding. Sam Stephenson

Update dependencies to allow constants to be defined alongside their siblings. A common case for this is AR model classes with STI; user.rb might define User, Administrator and Guest for example. Nicholas Seckar

Strip out punctuation on predicates or bang methods being aliased with alias_method_chain since target?_without_feature is not a valid method name. Add tests for Module#alias_method_chain. Marcel Molina Jr.

All classes/modules which include Reloadable can define reloadable? for fine grained control of reloading

Class.remove_class uses Module#parent to access the parent module

Class.remove_class expanded to handle multiple classes in a single call

LoadingModule.clear! has been removed as it is no longer required

Module#remove_classes_including has been removed in favor of Reloadable.reloadable_classes

Added reusable reloading support through the inclusion of the Relodable module that all subclasses of ActiveRecord::Base, ActiveRecord::Observer, ActiveController::Base, and ActionMailer::Base automatically gets. This means that these classes will be reloaded by the dispatcher when Dependencies.mechanism = :load. You can make your own models reloadable easily:

class Setting
include Reloadable
end

Reloading a class is done by removing its constant which will cause it to be loaded again on the next reference. David Heinemeier Hansson

Added auto-loading support for classes in modules, so Conductor::Migration will look for conductor/migration.rb and Conductor::Database::Settings will look for conductor/database/settings.rb Nicholas Seckar

Add Object#instance_exec, like instance_eval but passes its arguments to the block. (Active Support will not override the Ruby 1.9 implementation of this method.) Sam Stephenson

Add Proc#bind(object) for changing a proc or block's self by returning a Method bound to the given object. Based on why the lucky stiff's "cloaker" method. Sam Stephenson

Fix merge and dup for hashes with indifferent access #3404 Ken Miller

Fix the requires in option_merger_test to unbreak AS tests. Sam Stephenson

Introduce Dependencies.warnings_on_first_load setting. If true, enables warnings on first load of a require_dependency. Otherwise, loads without warnings. Disabled (set to false) by default. Jeremy Kemper

Active Support is warnings-safe. #1792 Eric Hodel

Introduce enable_warnings counterpart to silence_warnings. Turn warnings on when loading a file for the first time if Dependencies.mechanism == :load. Common mistakes such as redefined methods will print warnings to stderr. Jeremy Kemper

Fixed problem with classes being required twice. Object#const_missing now uses require_dependency to load files. It used to use require_or_load which would cause models to be loaded twice, which was not good for validations and other class methods #971 Nicholas Seckar

Fixed an exception when using Ajax based requests from Safari because Safari appends a \000 to the post body. Symbols can't have \000 in them so indifferent access would throw an exception in the constructor. Indifferent hashes now use strings internally instead. #746 Tobias Lütke

Added String#to_time and String#to_date for wrapping ParseDate

1.0.0 (24th February, 2005)

Added TimeZone as the first of a number of value objects that among others Active Record can use rich value objects using composed_of #688 Jamis Buck

Added Date::Conversions for getting dates in different convenient string representations and other objects

Added Time::Conversions for getting times in different convenient string representations and other objects