Let us have a following simple example:
lineNumber = __LINE__ # this gives me the current line number
You can use
caller_locations which has been added recently. It returns an array of
Location objects. See http://ruby-doc.org/core-2.2.3/Thread/Backtrace/Location.html for details.
No need to parse the return of