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

Version Path
picky-4.31.3 lib/picky/platforms/macruby.rb
picky-4.31.2 lib/picky/platforms/macruby.rb
picky-4.31.1 lib/picky/platforms/macruby.rb
picky-4.31.0 lib/picky/platforms/macruby.rb
picky-4.30.0 lib/picky/platforms/macruby.rb
picky-4.29.0 lib/picky/platforms/macruby.rb
picky-4.28.1 lib/picky/platforms/macruby.rb
picky-4.27.1 lib/picky/platforms/macruby.rb
picky-4.27.0 lib/picky/platforms/macruby.rb
picky-4.26.2 lib/picky/platforms/macruby.rb
picky-4.26.1 lib/picky/platforms/macruby.rb
picky-4.26.0 lib/picky/platforms/macruby.rb
picky-4.25.3 lib/picky/platforms/macruby.rb
picky-4.25.2 lib/picky/platforms/macruby.rb
picky-4.25.1 lib/picky/platforms/macruby.rb
picky-4.25.0 lib/picky/platforms/macruby.rb
picky-4.24.0 lib/picky/platforms/macruby.rb
picky-4.23.2 lib/picky/platforms/macruby.rb
picky-4.23.1 lib/picky/platforms/macruby.rb
picky-4.23.0 lib/picky/platforms/macruby.rb