Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/prism/polyfill/append_as_bytes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
String.include(
Module.new {
def append_as_bytes(*args)
args.each { self.<<(_1.b) } # steep:ignore
args.each do |arg|
arg = Integer === arg ? [arg].pack("C") : arg.b
self.<<(arg) # steep:ignore
end
end
}
)
Expand Down
2 changes: 1 addition & 1 deletion lib/prism/translation/parser/lexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ def simplify_string?(value, quote)
def escape_build(value, control, meta)
value &= 0x9f if control
value |= 0x80 if meta
value.chr
value
end

# Read an escape out of the string scanner, given the control and meta
Expand Down
2 changes: 2 additions & 0 deletions test/prism/fixtures/strings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ baz

"ち\xE3\x81\xFF"

"\777"

%[abc]

%(abc)
Expand Down
118 changes: 62 additions & 56 deletions test/prism/snapshots/strings.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading