ruby-changes:4899
From: ko1@a...
Date: Mon, 12 May 2008 21:26:26 +0900 (JST)
Subject: [ruby-changes:4899] matz - Ruby:r16392 (trunk): * string.c (sym_to_i): really removed.
matz 2008-05-12 21:26:15 +0900 (Mon, 12 May 2008) New Revision: 16392 Modified files: trunk/string.c Log: * string.c (sym_to_i): really removed. [ruby-dev:34641] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/string.c?r1=16392&r2=16391&diff_format=u Index: string.c =================================================================== --- string.c (revision 16391) +++ string.c (revision 16392) @@ -6287,26 +6287,6 @@ /* * call-seq: - * sym.to_i => fixnum - * - * Returns an integer that is unique for each symbol within a - * particular execution of a program. - * - * :fred.to_i #=> 9809 - * "fred".to_sym.to_i #=> 9809 - */ - -static VALUE -sym_to_i(VALUE sym) -{ - ID id = SYM2ID(sym); - - return LONG2FIX(id); -} - - -/* - * call-seq: * sym.inspect => string * * Returns the representation of <i>sym</i> as a symbol literal. @@ -6663,7 +6643,6 @@ rb_define_singleton_method(rb_cSymbol, "all_symbols", rb_sym_all_symbols, 0); /* in parse.y */ rb_define_method(rb_cSymbol, "==", sym_equal, 1); - rb_define_method(rb_cSymbol, "to_i", sym_to_i, 0); rb_define_method(rb_cSymbol, "inspect", sym_inspect, 0); rb_define_method(rb_cSymbol, "to_s", rb_sym_to_s, 0); rb_define_method(rb_cSymbol, "id2name", rb_sym_to_s, 0); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/