Project

General

Profile

Actions

Patch #32527

closed

Fix ruby 2.7 warning: given argument is nil; this will raise a TypeError in the next release

Added by Seiei Miyagi over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Ruby support
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

the `request.env['HTTP_USER_AGENT']` may `nil`.

e.g. `curl -A '' http://localhost:3000`

Quote from ruby 2.7 preview3 NEWS file:

Regexp#match and Regexp#match? with a nil argument are deprecated and will raise a TypeError in the next release. [Feature \#13083]

https://github.com/ruby/ruby/blob/v2_7_0_preview3/NEWS#core-classes-updates-outstanding-ones-only

cf. https://bugs.ruby-lang.org/issues/13083


Files


Related issues

Related to Redmine - Feature #31500: Ruby 2.7 supportClosedGo MAEDA

Actions
Actions

Also available in: Atom PDF