c - Where does pretty_print function come from if I pry Array in Ruby -


I am playing with nervousness and some hits that confuse me.

  irb pry CD Array Pee (array): & gt;   

show-method returns:

  def pretty_print ... def pretty_print_cycle ...   

Where are those methods? I looked at Ruby Array and did not know the methods. I went and saw Array.c and could not get Array.rb. However, I can not find beautiful_print in Array C

Can anyone understand me?

Thank you!

try it:

  []. Method (: beautiful_print) .source_location = & gt; ["/home/joel/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/pp.rb", 328]   

show-method sounds It gives the same information:

  show-method []. From utility_print: /home/joel/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/ PP. RB @ Line 328: Owner: Array Visibility: Number of Public Lines: 7 DF Beautiful_print (q) q.group (1, '[', ']') {q.seplist (self) {| V | Q.pp v}} and   

pry.rb should be a PP:



Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -