Sha256: ff7fe1991eb84af8986aa33f3991e4a44951147c801a83d48c22ea644d9bae64
Contents?: true
Size: 458 Bytes
Versions: 72
Compression:
Stored size: 458 Bytes
Contents
# This tests if we are using MacRuby. # If yes, it checks if we already have require_relative. # if RUBY_ENGINE == 'macruby' && !Kernel.respond_to?(:require_relative) module Kernel def require_relative relative_feature file = caller.first.split(/:\d/,2).first raise LoadError, "require_relative is called in #{$1}" if /\A\((.*)\)/ =~ file require File.expand_path relative_feature, File.dirname(file) end end end
Version data entries
72 entries across 72 versions & 1 rubygems