Issue #15839 has been updated by nobu (Nobuyoshi Nakada).


Thank you, but it doesn't work for the reverse order, `\u` followed by `\x`.


----------------------------------------
Bug #15839: mixed encoding heredoc should be a syntax error regardless the order
https://bugs.ruby-lang.org/issues/15839#change-78019

* Author: nobu (Nobuyoshi Nakada)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.4: REQUIRED, 2.5: REQUIRED, 2.6: REQUIRED
----------------------------------------
This heredoc isn't a syntax error,
```ruby
#encoding: cp932

p <<-STR
\xe9\x9d
\u1234
STR
```

whereas this is.
```ruby
#encoding: cp932
"
\xe9\x9d
\u1234
"
```

---Files--------------------------------
mixed-encoding-heredoc-fix.patch (5.28 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>