Sha256: 0ec290113f02c0cee8210c8b77a2220f5763f95442d9e25c522a3069cedd9c12
Contents?: true
Size: 260 Bytes
Versions: 3
Compression:
Stored size: 260 Bytes
Contents
module Kernel def detect_caller # Remove the line number from backtraces making sure we don't leave anything behind call_stack = caller.map { |p| p.sub(/:\d+.*/, '') } File.dirname(call_stack.detect { |p| p !~ %r[jax[\w.-]*/lib/jax] }) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
jax-1.1.1 | lib/jax/core_ext/kernel.rb |
jax-1.1.0 | lib/jax/core_ext/kernel.rb |
jax-1.1.0.rc1 | lib/jax/core_ext/kernel.rb |