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: c5313a0f0b88
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ba1883374939
Choose a head ref
  • 13 commits
  • 16 files changed
  • 2 contributors

Commits on Dec 16, 2017

  1. Update the MRI ripper spec excludes

    First, this ignores the entire file that relies on the MRI file structure, as it seems unlikely that any of those tests will ever be applicable.
    
    Second, it adds the test_sexp.rb file which was absent from the index for some unknown reason. It also introduces a couple of excludes for failing tests in that file.
    
    Third, it clears the excludes for a couple of tests that are currently passing, and updates the description for one of the excludes.
    grddev committed Dec 16, 2017
    Copy the full SHA
    8b6fb5e View commit details
  2. Return false on tokadd_mbchar failure

    Otherwise, an invalid byte sequence inside an identifier causes Ripper to continuously parse the same invalid byte sequence over and over.
    grddev committed Dec 16, 2017
    Copy the full SHA
    935adf2 View commit details
  3. Call tokadd_mbchar from tokenAddMBC

    They are identical (after fixing tokadd_mbchar)
    grddev committed Dec 16, 2017
    Copy the full SHA
    707c950 View commit details
  4. Copy the full SHA
    dbfea8c View commit details
  5. Use current scope in is_id_var

    Otherwise, it doesn't recognize variables introduced in the block (parameters), resulting in vcall nodes instead of var_ref
    grddev committed Dec 16, 2017
    Copy the full SHA
    9a978da View commit details
  6. Rework Ripper scope variable analysis

    The previous implementation called assignable on a bunch of things that were unlikely to be strings, while only supporting string arguments. This changes the logic so that it relies on getting the identifier value from the lexer instead.
    
    In addition, this inlines the logic from assignable in all cases where the implementation is known, and splits the cases for identifiers and constants, as they have very little to do with each other. Given that the parser has inlined the definition of MRI's user_varaible and keyword variable, it seems to make sense to also inline the assignable actions.
    
    While inlining the assignable implementation, it seamed to make sense to also inline is_id_var (and remove its unused argument).
    grddev committed Dec 16, 2017
    Copy the full SHA
    68aa0d6 View commit details
  7. Add command-args-state begin to Ripper

    The corresponding construct was in the main parser, and allowed it correctly parse "m x do; end", where Ripper would fail and assign the block to x rather than m.
    grddev committed Dec 16, 2017
    Copy the full SHA
    93dd144 View commit details
  8. Reset the cmd-args-state from Ripper push-local-scope

    It seems like MRI is doing this.
    grddev committed Dec 16, 2017
    Copy the full SHA
    162fa52 View commit details
  9. Clear command-args-state in brace blocks

    It might not be important, but MRI seems to do this.
    grddev committed Dec 16, 2017
    Copy the full SHA
    f92ca05 View commit details
  10. Rework handling of heredoc end

    Instead of ending the heredoc before emitting the final string content part, this instead just emits the final string content part and positions the cursor right before the end marker, such that the next call to the heredoc term should end the heredoc using the early return.
    
    The motivation for doing this was that with ripper the final string content of a heredoc wouldn't be dispatched to any token handler, but instead just propagated.
    
    The old behavior was clearly wrong for this corner-case, but this approach might have other problems.
    grddev committed Dec 16, 2017
    Copy the full SHA
    64fa14c View commit details
  11. Copy the full SHA
    5d83209 View commit details
  12. Dispatch on_magic_comment for Ripper

    As an added bonus, the parsing of magic comment key values no longer stops at the first unrecognized key, and thus writing
    
    # -*- warn_past_scope: true; coding: ISO-8859-1 -*-
    
    will now apply the encoding even if JRuby doesn't support the magic comment attribute warn_past_scope.
    grddev committed Dec 16, 2017
    Copy the full SHA
    f12cd27 View commit details

Commits on Dec 18, 2017

  1. Merge pull request #4900 from grddev/ripper-fixes-9.1

    Improve compatibility with MRI's Ripper for JRuby 9.1
    enebo authored Dec 18, 2017
    Copy the full SHA
    ba18833 View commit details
Loading