From: Austin Ziegler Date: 2020-07-03T16:16:12-04:00 Subject: [ruby-core:99048] Re: [Ruby master Bug#16988] Kernel.load loads file from current directory without '.' in path --===============0666841616== Content-Type: multipart/alternative; boundary="00000000000037ea2c05a98f3318" --00000000000037ea2c05a98f3318 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable No, because `Kernel#load` doesn=E2=80=99t work like require anyway (it does= n=E2=80=99t look to see if a resource is already loaded when it=E2=80=99s run; it always loa= ds the resource). -a On Mon, Jun 29, 2020 at 9:49 AM wrote: > Issue #16988 has been updated by TheSmartnik (Nikita Misharin). > > > nobu (Nobuyoshi Nakada) wrote in #note-1: > > I don=E2=80=99t this is an implementation bug, but a documentation issu= e. > > Shouldn't behavior be consistent with require, though? > > ---------------------------------------- > Bug #16988: Kernel.load loads file from current directory without '.' in > path > https://bugs.ruby-lang.org/issues/16988#change-86372 > > * Author: TheSmartnik (Nikita Misharin) > * Status: Open > * Priority: Normal > * ruby -v: 2.7.1 > * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN > ---------------------------------------- > Ruby allows to load files using ```Kernel.load``` without explicitly > specifying the relative path with ```.``` I'm not sure it's a bug or a > feature, but since documentation in master doesn't say anything about it > and the behavior differs from require where it was changed intentionally,= I > consider it a bug > > ## Reproduction steps > > 1. Have a file (```file.rb```) in a directory > 2. Start irb session in the directory > 3. Load a file: ```load 'file.rb'``` > > ## Tested in versions > - 2.7.1 > - 2.6.6 > - 2.5.3 > > > > -- > https://bugs.ruby-lang.org/ > > Unsubscribe: > > --=20 Austin Ziegler =E2=80=A2 halostatue@gmail.com =E2=80=A2 austin@halostatue.c= a http://www.halostatue.ca/ =E2=80=A2 http://twitter.com/halostatue --00000000000037ea2c05a98f3318 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
No, because `Kernel#load` doesn=E2=80=99t work like requir= e anyway (it doesn=E2=80=99t look to see if a resource is already loaded wh= en it=E2=80=99s run; it always loads the resource).

-a

On Mon, Jun 29, 2020 at 9:49 AM <misharinn@gmail.com> wrote:
Issue #169= 88 has been updated by TheSmartnik (Nikita Misharin).


nobu (Nobuyoshi Nakada) wrote in #note-1:
> I don=E2=80=99t this is an implementation bug, but a documentation iss= ue.

Shouldn't behavior be consistent with require, though?

----------------------------------------
Bug #16988: Kernel.load loads file from current directory without '.= 9; in path
https://bugs.ruby-lang.org/issues/16988#change-8= 6372

* Author: TheSmartnik (Nikita Misharin)
* Status: Open
* Priority: Normal
* ruby -v: 2.7.1
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
Ruby allows to load files using ```Kernel.load``` without explicitly specif= ying the relative path with ```.``` I'm not sure it's a bug or a fe= ature, but since documentation in master doesn't say anything about it = and the behavior differs from require where it was changed intentionally, I= consider it a bug

## Reproduction steps

1. Have a file (```file.rb```) in a directory
2. Start irb session in the directory
3. Load a file: ```load 'file.rb'```

## Tested in versions
- 2.7.1
- 2.6.6
- 2.5.3



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

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=3Dunsubscribe= >
<http://lists.ruby-lang.org/cgi-bin/m= ailman/options/ruby-core>


--
--00000000000037ea2c05a98f3318-- --===============0666841616== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline Unsubscribe: --===============0666841616==--