Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 23783ceb3bf1
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c10386ef6c87
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Jan 16, 2018

  1. Set encoding for character literal

    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>
    ```
    yui-knk committed Jan 16, 2018
    Copy the full SHA
    43c7d90 View commit details
  2. Merge pull request #4982 from yui-knk/jruby-9.1_fix_test_char

    Set encoding for character literal
    enebo authored Jan 16, 2018
    Copy the full SHA
    c10386e View commit details
Showing with 1 addition and 1 deletion.
  1. +1 −0 core/src/main/java/org/jruby/lexer/yacc/RubyLexer.java
  2. +0 −1 test/mri/excludes/TestStringchar.rb
1 change: 1 addition & 0 deletions core/src/main/java/org/jruby/lexer/yacc/RubyLexer.java
Original file line number Diff line number Diff line change
@@ -1883,6 +1883,7 @@ private int questionMark() throws IOException {
}

ByteList oneCharBL = new ByteList(1);
oneCharBL.setEncoding(getEncoding());
oneCharBL.append(c);
yaccValue = new StrNode(getPosition(), oneCharBL);
setState(EXPR_END);
1 change: 0 additions & 1 deletion test/mri/excludes/TestStringchar.rb

This file was deleted.