module MethodSource::SourceLocation::MethodExtensions

Public Instance Methods

source_location() click to toggle source

JRuby version #source_location hack @return [Array] A two element array containing the source location of the method

# File lib/method_source/source_location.rb, line 20
def source_location
  to_java.source_location(Thread.current.to_java.getContext())
end
trace_func(event, file, line, id, binding, classname) click to toggle source
# File lib/method_source/source_location.rb, line 26
def trace_func(event, file, line, id, binding, classname)
  return unless event == 'call'
  set_trace_func nil

  @file, @line = file, line
  raise :found
end