File: irb.rb

package info (click to toggle)
ruby-fakefs 3.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 544 kB
  • sloc: ruby: 7,622; makefile: 5
file content (16 lines) | stat: -rw-r--r-- 582 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

require 'irb'

# Make the original file system classes available in IRB.
::IRB::File = ::File
::IRB::FileUtils = ::FileUtils
::IRB::Dir = ::Dir
::IRB::Pathname = ::Pathname

# We need to setup IRB early, because the setup process itself requires locale files.
# Otherwise we'll get an error from Budler
#   Bundler::GemspecError: The gemspec for GEM_NAME was missing or broken.
#     Try running `gem pristine GEM_NAME -v GEM_VERSION` to fix the cached spec.
# because file sytem in bundler is stubbed.
IRB.setup(binding.source_location[0], argv: [])