Project

General

Profile

Actions

Bug #20227

closed

Unexpected "<internal:array>" appears since c84237f9531aed3b204d3fdacc2dd9d2bd4c7d81

Added by yahonda (Yasuo Honda) 4 months ago. Updated 4 months ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.4.0dev (2024-01-23T20:09:57Z master c84237f953) [x86_64-linux]
[ruby-core:116503]

Description

Unexpected "internal:array" appears since c84237f9531aed3b204d3fdacc2dd9d2bd4c7d81

Rails CI against Ruby master branch gets failed
https://buildkite.com/rails/rails-nightly/builds/85#018d3dec-4a38-41cb-9ebf-1cbc78a697ba/1147-1156

Failure:
ActionDispatch::Routing::RoutesInspectorTest#test_routes_when_expanded [test/dispatch/routing/inspector_test.rb:365]:
--- expected
+++ actual
@@ -1 +1 @@
-["--[ Route 1 ]----------", "Prefix            | custom_assets", "Verb              | GET", "URI               | /custom/assets(.:format)", "Controller#Action | custom_assets#show", "Source Location   | /home/yahonda/src/github.com/rails/rails/actionpack/test/dispatch/routing/inspector_test.rb:333", "--[ Route 2 ]----------", "Prefix            | custom_furnitures", "Verb              | GET", "URI               | /custom/furnitures(.:format)", "Controller#Action | custom_furnitures#show", "Source Location   | /home/yahonda/src/github.com/rails/rails/actionpack/test/dispatch/routing/inspector_test.rb:334", "--[ Route 3 ]----------", "Prefix            | blog", "Verb              | ", "URI               | /blog", "Controller#Action | Blog::Engine", "Source Location   | /home/yahonda/src/github.com/rails/rails/actionpack/test/dispatch/routing/inspector_test.rb:335", "", "[ Routes for Blog::Engine ]", "--[ Route 1 ]----------", "Prefix            | cart", "Verb              | GET", "URI               | /cart(.:format)", "Controller#Action | cart#show", "Source Location   | /home/yahonda/src/github.com/rails/rails/actionpack/test/dispatch/routing/inspector_test.rb:329"]
+["--[ Route 1 ]----------", "Prefix            | custom_assets", "Verb              | GET", "URI               | /custom/assets(.:format)", "Controller#Action | custom_assets#show", "Source Location   | <internal:array>:52", "--[ Route 2 ]----------", "Prefix            | custom_furnitures", "Verb              | GET", "URI               | /custom/furnitures(.:format)", "Controller#Action | custom_furnitures#show", "Source Location   | <internal:array>:52", "--[ Route 3 ]----------", "Prefix            | blog", "Verb              | ", "URI               | /blog", "Controller#Action | Blog::Engine", "Source Location   | <internal:array>:52", "", "[ Routes for Blog::Engine ]", "--[ Route 1 ]----------", "Prefix            | cart", "Verb              | GET", "URI               | /cart(.:format)", "Controller#Action | cart#show", "Source Location   | <internal:array>:52"]

This diff is longer, the difference is that the "Source Location" shows <internal:array> while the path to the route file like /rails/actionpack/test/dispatch/routing/inspector_test.rb expected. FYI, "Source Location" feature has been added to Rails via https://github.com/rails/rails/commit/a00e548da7a

I can reproduce this failure locally as follows.

  • Steps to reproduce
git clone https://github.com/rails/rails
cd rails
rm Gemfile.lock
bundle install
cd actionpack
bin/test test/dispatch/routing/inspector_test.rb -n test_routes_when_expanded
  • Actual result
$ bin/test test/dispatch/routing/inspector_test.rb -n test_routes_when_expanded
... snip ...
Run options: -n test_routes_when_expanded --seed 20764

# Running:

F

Failure:
ActionDispatch::Routing::RoutesInspectorTest#test_routes_when_expanded [test/dispatch/routing/inspector_test.rb:365]:
--- expected
+++ actual
@@ -1 +1 @@
-["--[ Route 1 ]----------", "Prefix            | custom_assets", "Verb              | GET", "URI               | /custom/assets(.:format)", "Controller#Action | custom_assets#show", "Source Location   | /home/yahonda/src/github.com/rails/rails/actionpack/test/dispatch/routing/inspector_test.rb:333", "--[ Route 2 ]----------", "Prefix            | custom_furnitures", "Verb              | GET", "URI               | /custom/furnitures(.:format)", "Controller#Action | custom_furnitures#show", "Source Location   | /home/yahonda/src/github.com/rails/rails/actionpack/test/dispatch/routing/inspector_test.rb:334", "--[ Route 3 ]----------", "Prefix            | blog", "Verb              | ", "URI               | /blog", "Controller#Action | Blog::Engine", "Source Location   | /home/yahonda/src/github.com/rails/rails/actionpack/test/dispatch/routing/inspector_test.rb:335", "", "[ Routes for Blog::Engine ]", "--[ Route 1 ]----------", "Prefix            | cart", "Verb              | GET", "URI               | /cart(.:format)", "Controller#Action | cart#show", "Source Location   | /home/yahonda/src/github.com/rails/rails/actionpack/test/dispatch/routing/inspector_test.rb:329"]
+["--[ Route 1 ]----------", "Prefix            | custom_assets", "Verb              | GET", "URI               | /custom/assets(.:format)", "Controller#Action | custom_assets#show", "Source Location   | <internal:array>:52", "--[ Route 2 ]----------", "Prefix            | custom_furnitures", "Verb              | GET", "URI               | /custom/furnitures(.:format)", "Controller#Action | custom_furnitures#show", "Source Location   | <internal:array>:52", "--[ Route 3 ]----------", "Prefix            | blog", "Verb              | ", "URI               | /blog", "Controller#Action | Blog::Engine", "Source Location   | <internal:array>:52", "", "[ Routes for Blog::Engine ]", "--[ Route 1 ]----------", "Prefix            | cart", "Verb              | GET", "URI               | /cart(.:format)", "Controller#Action | cart#show", "Source Location   | <internal:array>:52"]



bin/test test/dispatch/routing/inspector_test.rb:319



Finished in 0.051798s, 19.3056 runs/s, 19.3056 assertions/s.
1 runs, 1 assertions, 1 failures, 0 errors, 0 skips
$
Actions

Also available in: Atom PDF

Like0
Like1Like0Like0Like0