Sha256: becddbbbec216ae47f8dd4593e2ae2bfc484f1e1fd56314424a852153a0bd69d

Contents?: true

Size: 374 Bytes

Versions: 16

Compression:

Stored size: 374 Bytes

Contents

module Kernel
  alias_method :__callee__, :__method__  unless (__callee__ || true rescue false)
  
  def require_relative(relative_feature)
    file = caller.first.split(/:\d/,2).first
    if /\A\((.*)\)/ =~ file # eval, etc. 
      raise LoadError, "require_relative is called in #{$1}" 
    end 
    require File.expand_path(relative_feature, File.dirname(file))
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
marcandre-backports-1.8.0 lib/backports/1.9/kernel.rb
marcandre-backports-1.8.1 lib/backports/1.9/kernel.rb
marcandre-backports-1.8.2 lib/backports/1.9/kernel.rb
marcandre-backports-1.8.3 lib/backports/1.9/kernel.rb
marcandre-backports-1.8.4 lib/backports/1.9/kernel.rb
marcandre-backports-1.9.0 lib/backports/1.9/kernel.rb
backports-1.10.3 lib/backports/1.9/kernel.rb
backports-1.10.2 lib/backports/1.9/kernel.rb
backports-1.10.1 lib/backports/1.9/kernel.rb
backports-1.10.0 lib/backports/1.9/kernel.rb
backports-1.8.3 lib/backports/1.9/kernel.rb
backports-1.9.0 lib/backports/1.9/kernel.rb
backports-1.8.4 lib/backports/1.9/kernel.rb
backports-1.8.0 lib/backports/1.9/kernel.rb
backports-1.8.2 lib/backports/1.9/kernel.rb
backports-1.8.1 lib/backports/1.9/kernel.rb