Sha256: c238d05eb826244b159e20eff1173555ba800e2bd73b7b134be2c5bcc104d2db
Contents?: true
Size: 800 Bytes
Versions: 36
Compression:
Stored size: 800 Bytes
Contents
module Cistern::Coverage unless Kernel.respond_to? :caller_locations abort <<-ABORT Cannot enable Cistern coverage reporting Your ruby version ruby is: #{RUBY_VERSION rescue 'unknown'} `Kernel` does not have the required method `caller_locations` Try a newer ruby (should be > 2.0) ABORT end # returns the first caller_locations entry before entries in `file` def self.find_caller_before(file) enum = caller_locations.each call = nil # seek to the first entry from within `file` while(call = enum.next) do break if call.path.end_with? file end # seek to the first entry thats not within `file` while(call = enum.next) do break unless call.path.end_with? file end # the call location that called in to `file` call end end
Version data entries
36 entries across 36 versions & 1 rubygems