Skip to content

Set encoding for character literal#4982

Merged
enebo merged 1 commit intojruby:jruby-9.1from
yui-knk:jruby-9.1_fix_test_char
Jan 16, 2018
Merged

Set encoding for character literal#4982
enebo merged 1 commit intojruby:jruby-9.1from
yui-knk:jruby-9.1_fix_test_char

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