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.15.0 lib/picky/platforms/macruby.rb
picky-4.14.0 lib/picky/platforms/macruby.rb
picky-4.13.1 lib/picky/platforms/macruby.rb
picky-4.13.0 lib/picky/platforms/macruby.rb
picky-4.12.13 lib/picky/platforms/macruby.rb
picky-4.12.12 lib/picky/platforms/macruby.rb
picky-4.12.11 lib/picky/platforms/macruby.rb
picky-4.12.10 lib/picky/platforms/macruby.rb
picky-4.12.8 lib/picky/platforms/macruby.rb
picky-4.12.7 lib/picky/platforms/macruby.rb
picky-4.12.6 lib/picky/platforms/macruby.rb
picky-4.12.5 lib/picky/platforms/macruby.rb
picky-4.12.4 lib/picky/platforms/macruby.rb
picky-4.12.3 lib/picky/platforms/macruby.rb
picky-4.12.2 lib/picky/platforms/macruby.rb
picky-4.12.1 lib/picky/platforms/macruby.rb
picky-4.12.0 lib/picky/platforms/macruby.rb
picky-4.11.3 lib/picky/platforms/macruby.rb
picky-4.11.2 lib/picky/platforms/macruby.rb
picky-4.11.1 lib/picky/platforms/macruby.rb