Project

General

Profile

Actions

Bug #11557

closed

Capturing Limits

Added by ronald.petty (Ronald Petty) over 8 years ago. Updated over 8 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:<unknown>]

Description

Ruby 2.2

In IRB and via normal ruby file.rb, you can create unexpected behavior via capture groups.

Via IRB

"asdf".match(/(.)/)
$1
 => "a" 
$2000000
 => nil 
$2000000000000000
RangeError: integer 2467954688 too big to convert to `int'
$999999999999999999999999999999999999
 => "a" 

Via ruby

ruby a.rb (
"a"
ruby a.rb 
a.rb: integer 2467954690 too big to convert to `int' (RangeError)
ruby a.rb 
"a"

Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #11192: capture group special variable with large index invokes UBClosedActions
Actions #1

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

  • Is duplicate of Bug #11192: capture group special variable with large index invokes UB added
Actions #2

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

  • Description updated (diff)
  • Status changed from Open to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0