Project

General

Profile

Actions

Bug #11992

closed

Regexp match data

Added by rinkevichjm (James Rinkevich) over 8 years ago. Updated over 4 years ago.

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

Description

m="  M.S. Math \n M.S. Computer Eng. \n".match /M\.S\./
m.offset 0
[1,5]
m.offset 1
[1,5] # should be [13,17]

Updated by rinkevichjm (James Rinkevich) over 8 years ago

Found in jruby too

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

  • Description updated (diff)
  • Status changed from Open to Feedback

I can't reproduce it, with any of 1.8..2.3, nor jruby-9.0.1.0.

$ ruby -e 'm="  M.S. Math \n M.S. Computer Eng. \n".match /M\.S\./; p m.offset(0), m.offset(1)'
-e:1:in `offset': index 1 out of matches (IndexError)
	from -e:1:in `<main>'

What version do you use?

Actions #3

Updated by jeremyevans0 (Jeremy Evans) over 4 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0