Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ext/strscan/strscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ strscan_get_pos(VALUE self)
struct strscanner *p;

GET_SCANNER(self, p);
return INT2FIX(p->curr);
return LONG2NUM(p->curr);
}

/*
Expand Down Expand Up @@ -554,7 +554,7 @@ strscan_set_pos(VALUE self, VALUE v)
long i;

GET_SCANNER(self, p);
i = NUM2INT(v);
i = NUM2LONG(v);
if (i < 0) i += S_LEN(p);
if (i < 0) rb_raise(rb_eRangeError, "index out of range");
if (i > S_LEN(p)) rb_raise(rb_eRangeError, "index out of range");
Expand Down