Skip to content

Expect escaped backslashes in expressions to inspect#68

Merged
os97673 merged 6 commits intoruby-debug:masterfrom
valich:master
Mar 6, 2015
Merged

Expect escaped backslashes in expressions to inspect#68
os97673 merged 6 commits intoruby-debug:masterfrom
valich:master

Conversation

@valich
Copy link
Contributor

@valich valich commented Mar 2, 2015

Currently there is no way to differ newline (\n) from escaped (\\n) since backslashes are not escaped. I propose to escape backslashes when querying ruby-debug-ide and expect these escapes while parsing input.

Copy link
Member

Choose a reason for hiding this comment

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

the code doesn't work for 1.8.7 :(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure this type of continuation is allowed in 1.8
Please double-check.

Copy link
Member

Choose a reason for hiding this comment

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

I'd replace code from L18 till L30 with
set_io_encoding(io, string_to_parse.encoding) if string_to_parse.respond_to?(:encoding)
this way the code will be a little bit more clear.
What do you think?

os97673 added a commit that referenced this pull request Mar 6, 2015
Expect escaped backslashes in expressions to inspect
@os97673 os97673 merged commit fc77d61 into ruby-debug:master Mar 6, 2015
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

Successfully merging this pull request may close these issues.

2 participants