Skip to content

Commit

Permalink
Merge pull request #1081 from herwinw/matchdata_valuesat_beginingless…
Browse files Browse the repository at this point in the history
…_range

Fix beginningless Range in MatchData#values_at
  • Loading branch information
andrykonchin authored Sep 25, 2023
2 parents 42ff6ab + 1ecde10 commit db5f026
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/matchdata/values_at_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
end

it "supports beginningless Range" do
/(.)(.)(\d+)(\d)/.match("THX1138: The Movie").values_at(0..2).should == ["HX1138", "H", "X"]
/(.)(.)(\d+)(\d)/.match("THX1138: The Movie").values_at(..2).should == ["HX1138", "H", "X"]
end

it "returns an empty Array when Range is empty" do
Expand Down

0 comments on commit db5f026

Please sign in to comment.