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

Some escape sequence failures #2331

Closed
kddnewton opened this issue Feb 1, 2024 · 1 comment
Closed

Some escape sequence failures #2331

kddnewton opened this issue Feb 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kddnewton
Copy link
Collaborator

kddnewton commented Feb 1, 2024

assert_equal "\x13", "\c\x33"
assert_equal "\x13", "\C-\x33"
assert_equal "\xB3", "\M-\x33"

Right now all 3 of these are failing. It looks like \x sequences aren't being escaped with the flags.

# coding: US-ASCII
    assert_equal("\xe1", [0x00, 0xe1, 0xff].pack("C*")[/\M-a/])
    assert_equal("\xdc", [0x00, 0xdc, 0xff].pack("C*")[/\M-\\/])
    assert_equal("\x8a", [0x00, 0x8a, 0xff].pack("C*")[/\M-\n/])
    assert_equal("\x89", [0x00, 0x89, 0xff].pack("C*")[/\M-\t/])
    assert_equal("\x8d", [0x00, 0x8d, 0xff].pack("C*")[/\M-\r/])
    assert_equal("\x8c", [0x00, 0x8c, 0xff].pack("C*")[/\M-\f/])
    assert_equal("\x8b", [0x00, 0x8b, 0xff].pack("C*")[/\M-\v/])
    assert_equal("\x87", [0x00, 0x87, 0xff].pack("C*")[/\M-\a/])
    assert_equal("\x9b", [0x00, 0x9b, 0xff].pack("C*")[/\M-\e/])
    assert_equal("\x01", [0x00, 0x01, 0xff].pack("C*")[/\C-a/])

These are also failing for regexps.

@kddnewton kddnewton added bug Something isn't working hackdays labels Feb 1, 2024
@kddnewton kddnewton added this to the Ruby 3.3.1 milestone Feb 1, 2024
@kddnewton kddnewton modified the milestones: Ruby 3.3.1, CRuby unblocked Feb 14, 2024
@kddnewton
Copy link
Collaborator Author

Fixed on master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant