unknown wrote in post #1116913:
> Am 27.07.2013 22:43, schrieb Love U Ruby:
>> Hi,

> 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."

===============================================================
File : so.rb

class Foo
    def sam1
        caller_locations
    end
    def sam2
        sam1
    end
end
foo = Foo.new
p foo.sam2

I ran the code as below :

kirti@kirti-Aspire-5733Z:~/Ruby$ ruby so.rb
["so.rb:6:in `sam2'", "so.rb:10:in `<main>'"]
kirti@kirti-Aspire-5733Z:~/Ruby$
===============================================================

Now I change the method to `caller` and ran the code again as below :

class Foo
    def sam1
        caller
    end
    def sam2
        sam1
    end
end
foo = Foo.new
p foo.sam2

I ran the code as below :

kirti@kirti-Aspire-5733Z:~/Ruby$ ruby so.rb
["so.rb:6:in `sam2'", "so.rb:10:in `<main>'"]
kirti@kirti-Aspire-5733Z:~/Ruby$
================================================================

In both case I am getting the same output.I am trying to understand the differences,but in my code I am not able to catch it. I am doing probably something wrong.. Could you point me out there ?