From 69bf71f5e9b537f88acc0d4492a057336e7305d1 Mon Sep 17 00:00:00 2001 From: Marcel Molina Date: Mon, 21 Nov 2005 02:15:32 +0000 Subject: Add Symbol#to_proc, which allows for, e.g. [:foo, :bar].map(&:to_s). git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3118 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/test/core_ext/symbol.rb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 activesupport/test/core_ext/symbol.rb (limited to 'activesupport/test/core_ext') diff --git a/activesupport/test/core_ext/symbol.rb b/activesupport/test/core_ext/symbol.rb new file mode 100644 index 0000000000..ae2c585fc2 --- /dev/null +++ b/activesupport/test/core_ext/symbol.rb @@ -0,0 +1,8 @@ +require 'test/unit' +require File.dirname(__FILE__) + '/../../lib/active_support/core_ext/symbol' + +class TestSymbol < Test::Case::TestUnit + def test_to_proc + assert_equal %w(one two three), [:one, :two, :three].map &:to_s + end +end -- cgit v1.2.3