Skip to content

Conversation

lopopolo
Copy link
Contributor

strscan_concat_fixnum sends :concat to an empty String with a Fixnum argument and expects a TypeError.

This is incorrect because Fixnum is a valid argument to String#concat. It is only StringScanner that disallows it.

`strscan_concat_fixnum` sends `:concat` to an empty `String` with a `Fixnum` argument and expects a `TypeError`.

This is incorrect because `Fixnum` is a valid argument to `String#concat`. It is only `StringScanner` that disallows it.
Copy link
Member

@eregon eregon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

It passes before because String#<< doesn't seem to try to call to_int either.

@eregon eregon merged commit 594d411 into ruby:master Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants