[ruby-core:93880] [Ruby master Bug#16016] Standard library `debug` is started if pass a file named `debug.rb` to Kernel#load

From: nobu@...
Date: 2019-07-23 08:48:13 UTC
List: ruby-core #93880
Issue #16016 has been updated by nobu (Nobuyoshi Nakada).

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 <code>$:</code>.

Load with `./` explicitly.

----------------------------------------
Bug #16016: Standard library `debug` is started if pass a file named `debug.rb` to Kernel#load
https://bugs.ruby-lang.org/issues/16016#change-79845

* Author: binaryta (Takuya Narita)
* Status: Rejected
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0preview1 (2019-05-31 trunk c55db6aa271df4a689dc8eb0039c929bf6ed43ff) [x86_64-darwin18]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
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
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)
```


```bash
$ cat ./debug.rb
puts 'hoge'
```



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next