Skip to content

Commit

Permalink
Update regex test for error message
Browse files Browse the repository at this point in the history
This fixes build under ruby 3.2 which apparently changed the message template
  • Loading branch information
flash-gordon committed Aug 27, 2023
1 parent 077aec1 commit fbc0fcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dry/system/loader.rb
Expand Up @@ -67,7 +67,7 @@ def constant(component)
inflector.constantize(const_name)
rescue NameError => e
# Ensure it's this component's constant, not any other NameError within the component
if e.message =~ /#{const_name}( |\n)/
if e.message =~ /#{const_name}( |\n|$)/
raise ComponentNotLoadableError.new(component, e)
else
raise e
Expand Down

0 comments on commit fbc0fcf

Please sign in to comment.