Skip to content

Instantly share code, notes, and snippets.

@bil-bas
Created January 31, 2012 15:28
Show Gist options
  • Save bil-bas/44a5bdb522dbdb96ba70 to your computer and use it in GitHub Desktop.
Save bil-bas/44a5bdb522dbdb96ba70 to your computer and use it in GitHub Desktop.
finding method with pry
C:\Users\Spooner>pry
[2] pry(main)> cd Object
[3] pry(Object):1> show-method define_method
From: proc.c in Ruby Core (C Method):
Number of lines: 59
Owner: Module
Visibility: private
static VALUE
rb_mod_define_method(int argc, VALUE *argv, VALUE mod)
{
ID id;
VALUE body;
int noex = NOEX_PUBLIC;
if (argc == 1) {
id = rb_to_id(argv[0]);
body = rb_block_lambda();
etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment