Changeset 8224
- Timestamp:
- 11/27/07 19:42:30 (9 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activesupport/CHANGELOG
r8202 r8224 1 1 *SVN* 2 3 * Added Array#from and Array#to that behaves just from String#from and String#to [DHH] 2 4 3 5 * Fix that empty collections should be treated as empty arrays regardless of whitespace for Hash#from_xml #10255 [adamj] trunk/activesupport/lib/active_support/core_ext/array.rb
r7719 r8224 1 require 'active_support/core_ext/array/access' 1 2 require 'active_support/core_ext/array/conversions' 2 3 require 'active_support/core_ext/array/extract_options' … … 5 6 6 7 class Array #:nodoc: 8 include ActiveSupport::CoreExtensions::Array::Access 7 9 include ActiveSupport::CoreExtensions::Array::Conversions 8 10 include ActiveSupport::CoreExtensions::Array::ExtractOptions trunk/activesupport/test/core_ext/array_ext_test.rb
r7486 r8224 1 1 require File.dirname(__FILE__) + '/../abstract_unit' 2 2 require 'bigdecimal' 3 4 class ArrayExtAccessTests < Test::Unit::TestCase 5 def test_from 6 assert_equal %w( a b c d ), %w( a b c d ).from(0) 7 assert_equal %w( c d ), %w( a b c d ).from(2) 8 assert_nil %w( a b c d ).from(10) 9 end 10 11 def test_to 12 assert_equal %w( a ), %w( a b c d ).to(0) 13 assert_equal %w( a b c ), %w( a b c d ).to(2) 14 assert_equal %w( a b c d ), %w( a b c d ).to(10) 15 end 16 end 3 17 4 18 class ArrayExtToParamTests < Test::Unit::TestCase