Skip to content

Make Regexp with n flag compile#2621

Open
janbiedermann wants to merge 1 commit intoopal:masterfrom
janbiedermann:reg_n_exp
Open

Make Regexp with n flag compile#2621
janbiedermann wants to merge 1 commit intoopal:masterfrom
janbiedermann:reg_n_exp

Conversation

@janbiedermann
Copy link
Copy Markdown
Member

Required to compile Rack

@hmdne hmdne added the stable-backport This PR should be backported to stable versions label Dec 7, 2023
Comment thread lib/opal/nodes/literal.rb
static_as_dynamic(value)
else
if flags.include?('n')
value.encode!('ASCII-8BIT')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

encode! may not work under Opal

@hmdne
Copy link
Copy Markdown
Member

hmdne commented Jan 18, 2024

Other than the comment, can you add a simple test? I know encodings are a mess, but just a test to prove n is now accepted by Opal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stable-backport This PR should be backported to stable versions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants