summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-13 07:02:24 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-13 07:02:24 +0000
commit7cb1d35e230bcab0e440c2198b367c7c8b8cac1d (patch)
tree8c6e591a314c1c19e6018d1764392f56b2338728 /test
parentb4c621b641f912cbc27fab01a73fcb84743c9d99 (diff)
* object.c (sym_to_proc): new method Symbol#to_proc; backported from 1.9. bug#19012
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_symbol.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb
index 2ccfe64c92..f53e615766 100644
--- a/test/ruby/test_symbol.rb
+++ b/test/ruby/test_symbol.rb
@@ -74,4 +74,8 @@ class TestSymbol < Test::Unit::TestCase
assert_inspect_evaled(':$0')
assert_inspect_evaled(':$1')
end
+
+ def test_to_proc
+ assert_equal %w(1 2 3), (1..3).map(&:to_s)
+ end
end