diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-09-04 22:18:59 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-04 22:18:59 +0900 |
commit | eb67c603ca7e435181684857e650b4633fda5bb6 (patch) | |
tree | 2a7079315d7143010d9f561a2bb322f6378a96e9 /test/ruby | |
parent | d7406ccc2c99009cc2af56d5b01c411f8bb673f6 (diff) | |
download | ruby-eb67c603ca7e435181684857e650b4633fda5bb6.tar.gz |
Added Symbol#name
https://bugs.ruby-lang.org/issues/16150#change-87446
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_symbol.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb index f6ef70f3df..f7f17b8d67 100644 --- a/test/ruby/test_symbol.rb +++ b/test/ruby/test_symbol.rb @@ -105,6 +105,12 @@ class TestSymbol < Test::Unit::TestCase end end + def test_name + assert_equal("foo", :foo.name) + assert_same(:foo.name, :foo.name) + assert_predicate(:foo.name, :frozen?) + end + def test_to_proc assert_equal %w(1 2 3), (1..3).map(&:to_s) [ |