String#slice! doc bug?

The docs for String#slice! say, "The forms that take a Fixnum will raise
an IndexError if the value is out of range."

Perhaps the docs are describing what the documenter hoped would be implemented. My C is very rusty, but I don't see anything in string.c related to slice! that would raise errors for that.

I'd mention the bug on the ruby-core or ruby-doc lists (depending on whether the code or documentation is perceived to be at fault).

···

From: Daniel Berger [mailto:djberg96@gmail.com]

Gavin Kistner wrote:

From: Daniel Berger [mailto:djberg96@gmail.com]

The docs for String#slice! say, "The forms that take a Fixnum will raise
an IndexError if the value is out of range."

Perhaps the docs are describing what the documenter hoped would be implemented. My C is very rusty, but I don't see anything in string.c related to slice! that would raise errors for that.

Neither do I.

I'd mention the bug on the ruby-core or ruby-doc lists (depending on whether the code or documentation is perceived to be at fault).

Roger that. I'll file a bug report.

Regards,

Dan