Skip to content

Commit 27c4a79

Browse files
committed
Change coerce_to to rb_to_int to get expected error
1 parent b290733 commit 27c4a79

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

spec/tags/core/matchdata/byteoffset_tags.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/main/ruby/truffleruby/core/match_data.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def backref_from_arg(index)
155155
end
156156
names_to_backref[index.to_sym].last
157157
else
158-
Truffle::Type.coerce_to(index, Integer, :to_int)
158+
Primitive.rb_to_int(index)
159159
end
160160
end
161161
end

0 commit comments

Comments
 (0)