Project

General

Profile

Actions

Feature #20793

open

Allow Multiple Arguments for the .is_a? Method

Added by artemb (Artem Borodkin) 26 days ago. Updated 26 days ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:119502]

Description

I propose allowing multiple arguments to be passed to the .is_a? Method imply "OR" semantics:

name.is_a? String, Symbol

Currently, we need to write the following to achieve the same functionality:

[String, Symbol].include?(name.class)
Actions

Also available in: Atom PDF

Like0
Like0Like4Like0