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

Add support for escape sequences in double quoted rbs strings #501

Merged
merged 1 commit into from
Dec 3, 2020

Conversation

johansenja
Copy link
Contributor

I came across these earlier:

class A
  B = "a\nb"
end
class A
  B: "a\nb"
end

They were incompatible because rbs appeared to be handling double-quoted strings differently to ruby. This PR aims to bring support for newlines and other relatively common escape sequences

# rbs - existing workaround (for new lines at least)
class A
  B: "a
b"
end

Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

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

Thanks! 🙌

@soutaro soutaro merged commit 5e7cf2a into ruby:master Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants