Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ruby:master re: ruby/feature/18285 #47457

Merged
merged 1 commit into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion actionview/test/template/render_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def test_render_sub_template_with_errors

def test_undefined_method_error_references_named_class
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It not longer references the named class in Ruby 3.3 🤔

e = assert_raises(ActionView::Template::Error) { @view.render(inline: "<%= undefined %>") }
assert_match(/`undefined' for #<ActionView::Base:0x[0-9a-f]+>/, e.message)
assert_match(/undefined local variable or method `undefined'/, e.message)
end

def test_render_renderable_object
Expand Down
2 changes: 1 addition & 1 deletion activesupport/test/core_ext/time_with_zone_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ def test_no_method_error_has_proper_context
e = assert_raises(NoMethodError) {
@twz.this_method_does_not_exist
}
assert_match "undefined method `this_method_does_not_exist' for Fri, 31 Dec 1999 19:00:00.000000000 EST -05:00:ActiveSupport::TimeWithZone", e.message
assert_match(/undefined method `this_method_does_not_exist' for.*ActiveSupport::TimeWithZone/, e.message)
assert_no_match "rescue", e.backtrace.first
end
end
Expand Down
2 changes: 1 addition & 1 deletion railties/test/railties/railtie_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class Foo < Rails::Railtie
Foo.instance.abc
end

assert_equal("undefined method `abc' for #<RailtiesTest::RailtieTest::Foo>", error.original_message)
assert_match(/undefined method `abc' for.*RailtiesTest::RailtieTest::Foo/, error.original_message)
end
end
end