Project

General

Profile

« Previous | Next » 

Revision 2a22a6b2

Added by kachick (Kenichi Kamiya) over 4 years ago

Regexp#match{?} with nil raises TypeError as String, Symbol (#1506)

  • {String|Symbol}#match{?} with nil returns falsy

To improve consistency with Regexp#match{?}

  • String#match(nil) returns nil instead of TypeError

  • String#match?(nil) returns false instead of TypeError

  • Symbol#match(nil) returns nil instead of TypeError

  • Symbol#match?(nil) returns false instead of TypeError

  • Prefer exception

  • Follow empty ENV

  • Drop outdated specs

  • Write ruby/spec for above

https://github.com/ruby/ruby/pull/1506/files#r183242981

  • Fix merge miss