Skip to content

Commit

Permalink
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -234,9 +234,8 @@ public Object getIndexString(DynamicObject matchData, DynamicObject index, NotPr
}

@Specialization(guards = {"!isRubySymbol(index)", "!isRubyString(index)", "!isIntegerFixnumRange(index)"})
@TruffleBoundary
public Object getIndex(VirtualFrame frame, DynamicObject matchData, Object index, NotProvided length) {
CompilerDirectives.transferToInterpreter();

if (toIntNode == null) {
CompilerDirectives.transferToInterpreter();
toIntNode = insert(ToIntNodeGen.create(getContext(), getSourceSection(), null));
Original file line number Diff line number Diff line change
@@ -1580,8 +1580,8 @@ public OrdNode(RubyContext context, SourceSection sourceSection) {
}

@Specialization(guards = "isEmpty(string)")
@TruffleBoundary
public int ordEmpty(DynamicObject string) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(coreLibrary().argumentError("empty string", this));
}

0 comments on commit bad3d2e

Please sign in to comment.