Sha256: 6a25c37494738852978c5e14aa6424455d19e02290da0f5aaf81d7e432ec896f
Contents?: true
Size: 313 Bytes
Versions: 52
Compression:
Stored size: 313 Bytes
Contents
require File.expand_path('../../../spec_helper', __FILE__) describe "MatchData#offset" do it "returns a two element array with the begin and end of the nth match" do /(.)(.)(\d+)(\d)/.match("THX1138.").offset(0).should == [1, 7] /(.)(.)(\d+)(\d)/.match("THX1138.").offset(4).should == [6, 7] end end
Version data entries
52 entries across 52 versions & 2 rubygems