End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Symbol.all_symbols
Symbol.all_symbols => array
string.c
View on GitHub ↗
static VALUE
sym_all_symbols(VALUE _)
{
return rb_sym_all_symbols();
}
Returns an array of all the symbols currently in Ruby’s symbol table.
Symbol.all_symbols.size #=> 903
Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink,
:chown, :EOFError, :$;, :String,
:LOCK_SH, :"setuid?", :$<,
:default_proc, :compact, :extend,
:Tms, :getwd, :$=, :ThreadGroup,
:wait2, :$>]