From: Love U Ruby Date: 2013-05-19T19:30:19+09:00 Subject: Re: Need help for Kernel methods Matthew Kerwin wrote in post #1109455: > On May 18, 2013 8:33 PM, "Love U Ruby" wrote: > > Hint: define a function that calls it. Then define a function that calls > the first function. Thanks for your hints,i tried and understood: def test caller_locations(1,2) end def chk test end test #=> ["/home/kirti/ruby/test.rb:7:in `
'"] chk #=> ["/home/kirti/ruby/test.rb:5:in `chk'", "/home/kirti/ruby/test.rb:8:in `
'"] def test caller_locations(1,1) end def chk test end p chk #=> ["/home/kirti/ruby/test.rb:14:in `chk'"] The only thing I do not understand is - ***The optional start parameter determines the number of initial stack entries to omit from the top of the stack.** - I used in my example `optional start parameter` as `1`. But not seen any effect of its. I am sure i don't understand about the usefulness of that parameter. please help. -- Posted via http://www.ruby-forum.com/.