Standard Method Names
The names in Table D.2 are not reserved words. They are, however, names of standard methods provided by the Kernel module and the Class and Object classes, and nearly every possible Ruby script depends on one or more of them. Using them in a way inconsistent with their conventional meanings can be dangerous.
autoload | at_exit | ancestors |
abort | block_given? | binding |
chomp! | class_eval | const_get |
const_set | catch | caller |
chomp | chop | class_variables |
const_defined? | constants | callcc |
clone | chop! | class |
dup | display | equal? |
eval | exit! | eql? |
exec | extend | exit |
freeze | format | frozen? |
fail | fork | gsub! |
getc | gets | global_variables |
gsub | hash | included_modules |
id | include? | __id__ |
is_a? | instance_variables | instance_of? |
instance_methods ... |
Get Sams Teach Yourself Ruby in 21 Days now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.