From: sto.mar@... Date: 2013-07-28T06:15:33+09:00 Subject: Re: Difference between Kernel#caller and Kernel#caller_locations Am 27.07.2013 22:43, schrieb Love U Ruby: > Hi, > > I am bit confused with the methods > `Kernel#caller`(http://www.ruby-doc.org/core-2.0/Kernel.html#method-i-caller) > and > `Kernel#caller_locations`(http://www.ruby-doc.org/core-2.0/Kernel.html#method-i-caller_locations). > Are there any differences between these 2 methods? Yes. Read the first sentences in the docs again! caller: "Returns the current execution stack—an array containing strings in the form file:line or file:line: in `method'." caller-locations: "Returns the current execution stack—an array containing backtrace location objects." And see: 2.0.0-p247 :002 > caller_locations.first.class => Thread::Backtrace::Location 2.0.0-p247 :003 > caller.first.class => String Regards, Marcus -- GitHub: https://github.com/stomar/ PGP: 0x6B3A101A