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

Ruby 2.3 support #3479

Closed
headius opened this Issue Nov 20, 2015 · 1 comment

Comments

Projects
None yet
1 participant
@headius
Member

headius commented Nov 20, 2015

Here's the living checklist of changes needed to support Ruby 2.3.

These changes will go on the 2.3 branch at https://github.com/jruby/jruby/tree/ruby-2.3 and then we will merge to master when we're ready to release 2.3 support in JRuby 9.1.0.0.

Pull requests should be made against the ruby-2.3 branch please!

This list is currently based on https://github.com/ruby/ruby/blob/v2_3_0_preview2/NEWS.

Language changes

  • frozen-string-literal pragma:
  • safe navigation operator:
    • new method call syntax, object&.foo', method #foo is called onobject' if it is not nil.
      this is similar to `try!' in Active Support, except:
      • method name is syntactically required
        obj.try! {} # valid
        obj&. {} # syntax error
      • arguments are evaluated only if a call is made:
        obj.try!(:foo, bar()) # bar() is always evaluated
        obj&.foo(bar()) # bar() is conditionally evaluated
      • attribute assignment is valid
        obj&.attr += 1
      • (https://bugs.ruby-lang.org/issues/11537)
  • indented here document:
  • Additional parser changes
    • class Foo end is no longer a syntax error (see tagged specs in 0304cc7).
  • Changes in how super works for methods copied from parent to child. See https://bugs.ruby-lang.org/issues/3351 and rspec/rspec-mocks#1042

Core classes updates (outstanding ones only)

Core classes compatibility issues (excluding feature bug fixes)

Stdlib updates (outstanding ones only)

Only items relevant to JRuby

  • Update .rb parts of stdlib to 2.3 (delay until 2.3.0 final, probably) 66570f0
  • Bundle did_you_mean gem #3480
  • Socket
    • Socket#connect_nonblock, Socket#accept_nonblock,
      TCPServer#accept_nonblock, UNIXServer#accept_nonblock,
      BasicSocket#recv_nonblock, BasicSocket#recvmsg_nonblock,
      BasicSocket#sendmsg_nonblock all support exception: false to return
      :wait_readable or :wait_writable symbols instead of raising
      IO::WaitReadable or IO::WaitWritable exceptions (b27a2b0)
    • BasicSocket#recv and BasicSocket#recv_nonblock allow an output
      String buffer argument like IO#read and IO#read_nonblock to reduce
      GC overhead
  • OpenSSL
    • OpenSSL::SSL::SSLSocket#accept_nonblock and
      OpenSSL::SSL::SSLSocket#connect_nonblock supports exception: false.
    • update OpenSSL's .rb parts to match changes in 2.3
    • test & update jruby-openssl to be >= 0.9.13 (to incorporate above updates)
  • Pathname
  • io/wait
    • IO#wait_readable no longer checks FIONREAD, it may be used for
      non-bytestream IO such as listen sockets. (975dcc7 and 64638d0)
  • timeout
    • Object#timeout is now warned as deprecated when called. (a042a39)

Stdlib compatibility issues (excluding feature bug fixes)

Only items relevant to JRuby

  • ext/coverage/coverage.c
    • Coverage.peek_result: new method to allow coverage to be captured without
      stopping the coverage tool. #3481

@headius headius added this to the JRuby 9.1.0.0 milestone Nov 20, 2015

headius added a commit that referenced this issue Dec 12, 2015

"Optimize" Proc#call to not show in backtrace.
MRI 2.3 optimizes Proc#call to not allocate a stack frame and not
show up in backtraces. In JRuby, we already did not allocate a
frame, so all that was needed was to omit the call from backtrace.

See https://bugs.ruby-lang.org/issues/11569

For #3479.

@headius headius referenced this issue Apr 20, 2016

Open

Remaining 2.3 checklist items not in JRuby 9.1 #3816

8 of 23 tasks complete
@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Apr 20, 2016

Member

We have completed everything we're likely to finish from this list for 9.1. I've filed #3816 for remaining and late-breaking items from MRI's final 2.3.0 NEWS file.

Member

headius commented Apr 20, 2016

We have completed everything we're likely to finish from this list for 9.1. I've filed #3816 for remaining and late-breaking items from MRI's final 2.3.0 NEWS file.

@headius headius closed this Apr 20, 2016

paulgoetze added a commit to paulgoetze/jar-dependencies that referenced this issue Oct 20, 2017

Revert &. auto corrections and use Ruby v2.0 for Rubocop
The save navigation operator (&.) is supported since Ruby v2.3.0
(JRuby v9.1.0.0, see jruby/jruby#3479).
So these autocorrection would fail for lower versions, like 9.0.5.0,
which is e.g. used by Travis CI.

mkristian added a commit to mkristian/jar-dependencies that referenced this issue Oct 24, 2017

Revert &. auto corrections and use Ruby v2.0 for Rubocop
The save navigation operator (&.) is supported since Ruby v2.3.0
(JRuby v9.1.0.0, see jruby/jruby#3479).
So these autocorrection would fail for lower versions, like 9.0.5.0,
which is e.g. used by Travis CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment