17 Mar
2026
17 Mar
'26
10:40 a.m.
Issue #21932 has been updated by matz (Yukihiro Matsumoto). I agree with adding `integer_at(n)` to `MatchData`, and `StringScanner` too (#21943). Matz. ---------------------------------------- Feature #21932: `MatchData#get_int` https://bugs.ruby-lang.org/issues/21932#change-116746 * Author: nobu (Nobuyoshi Nakada) * Status: Open ---------------------------------------- This is suggested by @akr 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 -- https://bugs.ruby-lang.org/