Project

General

Profile

Actions

Feature #20793

open

Allow Multiple Arguments for the .is_a? Method

Added by artemb (Artem Borodkin) 18 days ago. Updated 18 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