Skip to content

Commit a557972

Browse files
Fix passing regex to start_with?
1 parent 90833bb commit a557972

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/better_errors/exception_hint.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def hint
1010
/\Aundefined method `(?<method>[^']+)' for (?<val>[^:]+):(?<klass>\w+)/.match(exception.message) do |match|
1111
if match[:val] == "nil"
1212
return "Something is `nil` when it probably shouldn't be."
13-
elsif !match[:klass].start_with? /\A0x/
13+
elsif !match[:klass].start_with? '0x'
1414
return "`#{match[:method]}` is being called on a `#{match[:klass]}` object, "\
1515
"which might not be the type of object you were expecting."
1616
end

0 commit comments

Comments
 (0)