Project

General

Profile

Actions

Bug #16016

closed

Standard library `debug` is started if pass a file named `debug.rb` to Kernel#load

Bug #16016: Standard library `debug` is started if pass a file named `debug.rb` to Kernel#load

Added by Anonymous over 6 years ago. Updated over 6 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.7.0preview1 (2019-05-31 trunk c55db6aa271df4a689dc8eb0039c929bf6ed43ff) [x86_64-darwin18]
[ruby-core:93879]

Description

When I do this:

  1. Write program to debug.rb on the current directory
  2. Start irb
  3. Kernel.load('debug.rb')
  4. Happen this problem
$ irb
irb(main):001:0> Kernel.load("debug.rb")
/Users/tatumaki/.rbenv/versions/2.7.0-preview1/lib/ruby/2.7.0/x86_64-darwin18/continuation.bundle: warning: callcc is obsolete; use Fiber instead
Debug.rb
Emacs support available.

/Users/tatumaki/.rbenv/versions/2.7.0-preview1/lib/ruby/2.7.0/irb/context.rb:297:      @last_value = value
(rdb:1)
$ cat ./debug.rb
puts 'hoge'

Updated by nobu (Nobuyoshi Nakada) over 6 years ago Actions #1 [ruby-core:93880]

  • Status changed from Open to Rejected

It is a documented feature of Kernel#load:

If the filename does not resolve to an absolute path, the file is searched for in the library directories listed in $:.

Load with ./ explicitly.

Actions

Also available in: PDF Atom