summaryrefslogtreecommitdiffhomepage
path: root/test/t/symbol.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/t/symbol.rb')
-rw-r--r--test/t/symbol.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/t/symbol.rb b/test/t/symbol.rb
new file mode 100644
index 000000000..325c8d990
--- /dev/null
+++ b/test/t/symbol.rb
@@ -0,0 +1,23 @@
+##
+# Symbol ISO Test
+
+assert('Symbol', '15.2.11') do
+ Symbol.class == Class
+end
+
+assert('Symbol#===', '15.2.11.3.1') do
+ :abc === :abc and not :abc === :cba
+end
+
+assert('Symbol#id2name', '15.2.11.3.2') do
+ :abc.id2name == 'abc'
+end
+
+assert('Symbol#to_s', '15.2.11.3.3') do
+ :abc.to_s == 'abc'
+end
+
+assert('Symbol#to_sym', '15.2.11.3.4') do
+ :abc.to_sym == :abc
+end
+