Project

General

Profile

Actions

Feature #21932

open

`MatchData#get_int`

Feature #21932: `MatchData#get_int`

Added by nobu (Nobuyoshi Nakada) 4 days ago. Updated 1 day ago.

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

Description

This is suggested by @akr (Akira Tanaka) today, $~.get_int(1) is equivalent to $1.to_i but does not create the intermediate string object.

https://github.com/nobu/ruby/tree/match-get_int


Related issues 1 (1 open0 closed)

Related to Ruby - Feature #21943: Add StringScanner#get_int to extract capture group as Integer without intermediate StringOpenActions
Actions

Also available in: PDF Atom