Ruby - Variables and Data Types
Identify the mistake in this Ruby code:
def check_nil(val)
if val = nil
"No value"
else
"Has value"
end
end
puts check_nil(nil)