Nil.match vs nil.=~

a = nil

if a =~ /a/
end

if a.match /a/
#why error ?
end

Because match is not defined on NilClass, but =~ is defined on Object,
which is the superclass of NilClass.