Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Truffle] String#rindex error from CGI specs #2802

Closed
bjfish opened this issue Apr 3, 2015 · 4 comments
Closed

[Truffle] String#rindex error from CGI specs #2802

bjfish opened this issue Apr 3, 2015 · 4 comments
Assignees
Milestone

Comments

@bjfish
Copy link
Contributor

bjfish commented Apr 3, 2015

Example

string = <<-eos
<HTML>
<BODY>
</BODY>
</HTML>


eos
element = "BODY"
string.rindex(/(?i-mx:^\s*<#{element})/i, 14)

Error

core:/core/rubinius/common/type.rb:559:in `initialize': undefined conversion for '"<HTML>\n<BODY>\n</BODY>\n</HTML>\n\n\n"' from UTF-8 to  (Encoding::CompatibilityError)
    from core:/core/rubinius/common/type.rb:559:in `raise'
    from core:/core/rubinius/common/type.rb:559:in `compatible_encoding'
    from core:/core/rubinius/common/string.rb:2317:in `rindex'
    from rindex.rb:10:in `<main>'
@chrisseaton chrisseaton added this to the truffle-dev milestone Apr 4, 2015
@chrisseaton
Copy link
Contributor

Can I assign this to you, @nirvdrum, please?

@nirvdrum
Copy link
Contributor

nirvdrum commented Apr 4, 2015

This looks more encoding related, but I'm happy to take a look.

@nirvdrum
Copy link
Contributor

The problem here is our Regexp implementation and its very incomplete support for encodings and MBC encodings in particular. Fixing this will require an overhaul of Regexp.

@bjfish
Copy link
Contributor Author

bjfish commented Apr 27, 2015

Fixed at Fixed at 8bb41db

@bjfish bjfish closed this as completed Apr 27, 2015
@enebo enebo added this to the Non-Release milestone Dec 7, 2017
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

No branches or pull requests

4 participants