Solution

As usual, Ruby has a neat solution for it: Kernel module has a caller_locations method, which returns an array with the current execution stack. So all we need to do is to use caller_locations.first.label to get the first element from the stack and then get its label.