From ce054bd078168bf9a6fa41031b1bcd25a0b3f040 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 3 May 2021 08:26:20 +0900 Subject: symbol.c: remove `Symbol#id2sym`. In the ancient Ruby, symbols are represented by integers. In that era, to get string representation from integers, we used `Integer#id2sym` method. Later, `Symbol` was introduced, and `id2sym` was used for compatibility. Today, no one uses `id2sym` any longer. It is described in ISO 30170:2012 standard but I consider it as a mistake. --- test/t/symbol.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'test') diff --git a/test/t/symbol.rb b/test/t/symbol.rb index 5c674a9cb..4cb210757 100644 --- a/test/t/symbol.rb +++ b/test/t/symbol.rb @@ -17,10 +17,6 @@ assert('Symbol#===', '15.2.11.3.1') do assert_false :abc === :cba end -assert('Symbol#id2name', '15.2.11.3.2') do - assert_equal 'abc', :abc.id2name -end - assert('Symbol#to_s', '15.2.11.3.3') do assert_equal 'abc', :abc.to_s end -- cgit v1.2.3