[#114703] [Ruby master Bug#19875] Ruby 2.7 -> 3.1 Performance regression in String#count — "iz (Illia Zub) via ruby-core" <ruby-core@...>

Issue #19875 has been reported by iz (Illia Zub).

18 messages 2023/09/12

[#114774] [Ruby master Feature#19884] Make Safe Navigation Operator work on classes — "p8 (Petrik de Heus) via ruby-core" <ruby-core@...>

Issue #19884 has been reported by p8 (Petrik de Heus).

13 messages 2023/09/15

[#114796] [Ruby master Feature#19889] Let `Kernel.#require` search for files relative to the current working directory for non ./, ../ relative paths — "sawa (Tsuyoshi Sawada) via ruby-core" <ruby-core@...>

Issue #19889 has been reported by sawa (Tsuyoshi Sawada).

6 messages 2023/09/18

[#114803] [Ruby master Bug#19890] File#realine(chomp: true) slower/more allocations than readline.chomp! — "segiddins (Samuel Giddins) via ruby-core" <ruby-core@...>

Issue #19890 has been reported by segiddins (Samuel Giddins).

12 messages 2023/09/18

[#114817] [Ruby master Bug#19892] Build failure with 8f1b688177 — "vo.x (Vit Ondruch) via ruby-core" <ruby-core@...>

Issue #19892 has been reported by vo.x (Vit Ondruch).

8 messages 2023/09/19

[#114915] [Ruby master Feature#19905] Introduce `Queue#peek` — "hi@... (Joao Fernandes) via ruby-core" <ruby-core@...>

Issue #19905 has been reported by [email protected] (Joao Fernandes).

8 messages 2023/09/28

[ruby-core:114756] [Ruby master Feature#19849] Requiring file with autoload results in confusing error if file doesn't exist

From: "mame (Yusuke Endoh) via ruby-core" <ruby-core@...>
Date: 2023-09-14 14:17:21 UTC
List: ruby-core #114756
Issue #19849 has been updated by mame (Yusuke Endoh).


Briefly discussed at the dev meeting.

We understand the problem, but doesn't find a good solution. Since the call line of autoload does not exist in the call stack when the exception occurs, it cannot be displayed as a backtrace.
It may be possible to include it in an error message or `Exception#cause`. If there are specific suggestions on how to actually implement it and how to display it, it could be considered.

----------------------------------------
Feature #19849: Requiring file with autoload results in confusing error if file doesn't exist
https://bugs.ruby-lang.org/issues/19849#change-104593

* Author: p8 (Petrik de Heus)
* Status: Open
* Priority: Normal
----------------------------------------
Given the following file that calls the `Example` constant:
```ruby
# example.rb
require_relative 'autoload_example.rb'

Example.new
```

and an autoload to define the `Example` constant, with an unknown path:
```ruby
# autoload_example.rb
autoload "Example", "path_unknown"
```

Running `ruby example.rb` results in the following error:

```
<internal:~/.rubies/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- path_unknown (LoadError)
	from <internal:~/.rubies/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from example.rb:4:in `<main>'
```

The error is somewhat confusing as it doesn't show the location of the `autoload` which caused the error.
This can be especially confusing if the autoload is called somewhere deep in a gem.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- [email protected]
 To unsubscribe send an email to [email protected]
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

In This Thread

Prev Next