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

Set encoding for character literal #4982

Merged
merged 1 commit into from
Jan 16, 2018

Conversation

yui-knk
Copy link
Contributor

@yui-knk yui-knk commented Jan 16, 2018

MRI sets source encoding to character literal.
This commit will fix #test_char.

p "a".encoding
p ?a.encoding
p ?\M-a.encoding
$ ruby -v /tmp/enc.rb
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin14]
#<Encoding:UTF-8>
#<Encoding:UTF-8>
#<Encoding:UTF-8>

MRI sets source encoding to character literal.
This commit will fix `#test_char`.

```ruby
p "a".encoding
p ?a.encoding
p ?\M-a.encoding
```

```shell
$ ruby -v /tmp/enc.rb
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin14]
#<Encoding:UTF-8>
#<Encoding:UTF-8>
#<Encoding:UTF-8>
```
@enebo enebo added this to the JRuby 9.1.16.0 milestone Jan 16, 2018
@enebo enebo added the parser label Jan 16, 2018
@enebo enebo merged commit c10386e into jruby:jruby-9.1 Jan 16, 2018
@yui-knk yui-knk deleted the jruby-9.1_fix_test_char branch January 16, 2018 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants