From: Nasir Khan [mailto:
[email protected]]=20
# irb(main):012:0> nil =3D~ /foo/
# =3D> false
#=20
# Should'nt it return nil instead?
depends on the beholder.
:~$ qri =3D~
---------------------------- Multiple choices:
Gem:
ependency#=3D~, Gem:
latform#=3D~, Object#=3D~,
REXML::Light::Node#=3D~, RegAnd#=3D~, RegOr#=3D~, Regexp#=3D~, =
String#=3D~
:~$ qri object#=3D~
--------------------------------Object#=3D~
obj =3D~ other =3D> false
--------------------------------
Pattern Match---Overridden by descendents (notably Regexp and
String) to provide meaningful pattern-match semantics.
so you probably want,
=3D> nil
and if failing is divine, try #match
=3D> nil
NoMethodError: undefined method `match' for nil:NilClass