Project

General

Profile

Actions

Feature #20793

closed

Allow Multiple Arguments for the .is_a? Method

Added by artemb (Artem Borodkin) about 1 month ago. Updated 15 days ago.

Status:
Rejected
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

Like1
Like0Like4Like0Like0