Project

General

Profile

Actions

Feature #15211

closed

Integer.try_convert

Added by nobu (Nobuyoshi Nakada) about 6 years ago. Updated over 3 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:89301]

Description

I found Integer doesn't have try_convert method, which converts the argument by to_int method without explicit conversions like Integer().
This is useful to treat an Integer-like argument like as methods written in C.

https://github.com/nobu/ruby/tree/feature/Integer.try_convert

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0