Changeset 8340
- Timestamp:
- 12/09/07 22:10:40 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activesupport/lib/active_support/core_ext/array/conversions.rb
r8301 r8340 17 17 "" 18 18 when 1 19 self[0] 19 self[0].to_s 20 20 when 2 21 21 "#{self[0]} #{options[:connector]}#{self[1]}" trunk/activesupport/test/core_ext/array_ext_test.rb
r8251 r8340 34 34 assert_equal "one and two", ['one', 'two'].to_sentence 35 35 assert_equal "one, two, and three", ['one', 'two', 'three'].to_sentence 36 37 36 end 38 37 … … 58 57 end 59 58 59 def test_one_non_string_element 60 assert_equal '1', [1].to_sentence 61 end 60 62 end 61 63