Sha256: 55f47f0dbd735e037fd82ed0061dfd333089983679673d65cd91dbf33d9eadc3

Contents?: true

Size: 616 Bytes

Versions: 6

Compression:

Stored size: 616 Bytes

Contents

# frozen_string_literal: true

# This file setup LOAD_PATH to load Ruby Next own transpiled paths
# (we cannot use language/setup here, 'cause it requires Core to be loaded)

version = RubyNext.next_version
next_dirname = File.join(__dir__, "..", ".rbnext")
lib_path = File.realpath(File.join(__dir__, ".."))
current_index = $LOAD_PATH.index(lib_path)

loop do
  break unless version

  version_dir = File.join(next_dirname, version.segments[0..1].join("."))

  if File.exist?(version_dir)
    $LOAD_PATH.insert current_index, version_dir
    current_index += 1
  end

  version = RubyNext.next_version(version)
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruby-next-core-0.10.5 lib/ruby-next/setup_self.rb
ruby-next-core-0.10.4 lib/ruby-next/setup_self.rb
ruby-next-core-0.10.3 lib/ruby-next/setup_self.rb
ruby-next-core-0.10.2 lib/ruby-next/setup_self.rb
ruby-next-core-0.10.1 lib/ruby-next/setup_self.rb
ruby-next-core-0.10.0 lib/ruby-next/setup_self.rb