Skip to content

Instantly share code, notes, and snippets.

@vishnugopal
Created October 28, 2009 10:39
Show Gist options
  • Save vishnugopal/220409 to your computer and use it in GitHub Desktop.
Save vishnugopal/220409 to your computer and use it in GitHub Desktop.
>> Kernel.methods - Object.methods
=> ["exit!", "chomp!", "print", "fail", "binding", "split", "Array", "readlines", "format", "chop", "iterator?", "catch", "trap", "getc", "putc", "caller", "proc", "chomp", "block_given?", "throw", "p", "sub!", "loop", "trace_var", "syscall", "exec", "Integer", "callcc", "puts", "exit", "load", "lambda", "srand", "global_variables", "gsub!", "untrace_var", "open", "`", "Float", "method_missing", "system", "gets", "sub", "abort", "require", "rand", "test", "warn", "eval", "local_variables", "chop!", "scan", "raise", "set_trace_func", "printf", "fork", "sleep", "select", "String", "at_exit", "readline", "sprintf", "gsub", "__method__"]
>> module Kernel
>> def iloveyou
>> puts "I Love you"
>> end
>> end
=> nil
>> iloveyou
I Love you
=> nil
>> module Kernel
>> def Array
>> nil
>> end
>> end
=> nil
>> Array
=> Array
>> Array 2
ArgumentError: wrong number of arguments (1 for 0)
from (irb):20:in `Array'
from (irb):20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment