[Solved] How to check whether a string includes a given string variable?


You should try this

number.include?(digit.to_s)

You didn’t convert the digit to string.

Hope this solves your problem.

1

solved How to check whether a string includes a given string variable?