diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-20 17:59:34 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-20 18:12:45 -0700 |
commit | 428829fc38d06be63082e261d59f478a4b7dd354 (patch) | |
tree | 404c257cf330580caa31a59aaaffd6b28618b1cd /activesupport | |
parent | 886aa2f0e1a1a95a5b518d918fefaa526755ad34 (diff) | |
download | rails-428829fc38d06be63082e261d59f478a4b7dd354.tar.gz rails-428829fc38d06be63082e261d59f478a4b7dd354.tar.bz2 rails-428829fc38d06be63082e261d59f478a4b7dd354.zip |
Single-require forward compatibility with new Ruby features like Object#tap, Enumerable#group_by, and Process.daemon. Code with the latest but run anywhere.
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/ruby/shim.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/ruby/shim.rb b/activesupport/lib/active_support/ruby/shim.rb new file mode 100644 index 0000000000..37c57c485a --- /dev/null +++ b/activesupport/lib/active_support/ruby/shim.rb @@ -0,0 +1,24 @@ +# Backported Ruby builtins so you can code with the latest & greatest +# but still run on any Ruby 1.8.x. +# +# Date next_year, next_month +# DateTime to_date, to_datetime, xmlschema +# Enumerable group_by, each_with_object, none? +# Integer even?, odd? +# Object tap +# Process Process.daemon +# REXML security fix +# String ord +# Symbol to_proc +# Time to_date, to_time, to_datetime +require 'active_support' +require 'active_support/core_ext/date/calculations' +require 'active_support/core_ext/date_time/conversions' +require 'active_support/core_ext/enumerable' +require 'active_support/core_ext/integer/even_odd' +require 'active_support/core_ext/object/tap' +require 'active_support/core_ext/process/daemon' +require 'active_support/core_ext/string/conversions' +require 'active_support/core_ext/rexml' +require 'active_support/core_ext/symbol/to_proc' +require 'active_support/core_ext/time/conversions' |