[ruby-core:72869] [Ruby trunk - Bug #11992] [Feedback] Regexp match data

From: nobu@...
Date: 2016-01-15 06:17:33 UTC
List: ruby-core #72869
Issue #11992 has been updated by Nobuyoshi Nakada.

Description updated
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?

----------------------------------------
Bug #11992: Regexp match data
https://bugs.ruby-lang.org/issues/11992#change-56102

* Author: James Rinkevich
* Status: Feedback
* Priority: Normal
* Assignee: 
* ruby -v: 
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
~~~ruby
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]



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next