Skip to content

Missing invalid multibyte escape SyntaxError for Regexp #2104

@andrykonchin

Description

@andrykonchin

Combination of Regexp encoding options and forced encodings (I suppose) should lead to the SyntaxError:

# encoding: us-ascii
p /\xFF/u.encoding
ruby script.rb
script.rb: --> script.rb
invalid multibyte escape: /\xFF/
> 3  p /\xFF/u.encoding
script.rb:3: invalid multibyte escape: /\xFF/ (SyntaxError)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions